Watch
1
0
Fork
You've already forked Seyyed_arc
0
forked from hesabix/arc
Seyyed_arc/extraScripts/migration/holoo2hesabix/Services/MigrationSession.vb
Babak Alizadeh a5875e7a3a Release Holoo2Hesabix 1.1.0 with production-ready accounting migration.
Harden Holoo-to-Hesabix document partition/mapping, sample E2E tooling, remove hardcoded SQL credentials from scripts, fix income AR account 10401, and publish Setup MSI 1.1.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 15:56:40 +03:30

60 lines
2 KiB
VB.net

Friend Class MigrationSession
Public Const DefaultApiBaseUrl As String = "https://hsxn.hesabix.ir"
Public Property ApiBaseUrl As String = DefaultApiBaseUrl
Public Property ApiKey As String = ""
Public Property CurrentUser As HesabixUser
Public Property Businesses As New List(Of HesabixBusiness)
Public Property SelectedBusiness As HesabixBusiness
Public Property SqlSettings As New SqlConnectionSettings()
Public Property AvailableDatabases As List(Of HolooDatabaseInfo)
Public Property SelectedDatabase As String
Public Property HolooProbe As HolooProbeResult
Public Property IsSqlConnected As Boolean
Public Property SelectedModules As List(Of ModuleOption)
Public Property Preflight As PreflightReport
Public Property AllowCurrencyMismatch As Boolean
Public Property SarfaslProfile As SarfaslProfile
Public Property SarfaslProfileLocked As Boolean
Public ReadOnly Property IsHesabixConnected As Boolean
Get
Return CurrentUser IsNot Nothing AndAlso Not String.IsNullOrWhiteSpace(ApiKey)
End Get
End Property
Public ReadOnly Property CanProceedFromHesabix As Boolean
Get
Return IsHesabixConnected AndAlso SelectedBusiness IsNot Nothing
End Get
End Property
Public ReadOnly Property CanProceedFromHolooSql As Boolean
Get
Return IsSqlConnected AndAlso Not String.IsNullOrWhiteSpace(SelectedDatabase)
End Get
End Property
Public Sub ResetHesabixSelection()
SelectedBusiness = Nothing
End Sub
Public Sub ClearHesabixAuth()
CurrentUser = Nothing
Businesses.Clear()
SelectedBusiness = Nothing
ApiKey = ""
End Sub
Public Sub ClearSqlSelection()
SelectedDatabase = Nothing
HolooProbe = Nothing
AvailableDatabases = Nothing
IsSqlConnected = False
If SqlSettings IsNot Nothing Then
SqlSettings.Database = ""
End If
End Sub
End Class