MS INtegration AppServer Init
This commit is contained in:
@@ -8,16 +8,20 @@ Imports DigitalData.GUIs.ZooFlow.ClassInitLoader
|
||||
Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
||||
Imports System.Threading
|
||||
Imports System.Globalization
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
|
||||
Public Class ClassInit
|
||||
Private _MainForm As frmFlowForm
|
||||
Private _Logger As Logger
|
||||
|
||||
Private _LogConfig As LogConfig
|
||||
Public Event Completed As EventHandler
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, ParentForm As frmFlowForm)
|
||||
_MainForm = ParentForm
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_LogConfig = LogConfig
|
||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub InitializeApplication()
|
||||
@@ -114,7 +118,7 @@ Public Class ClassInit
|
||||
Private Sub Initialize3rdParty(MyApplication As My.MyApplication)
|
||||
Try
|
||||
Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
|
||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql)
|
||||
Dim oDatatable As DataTable = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_3RD_PARTY_MODULES", "", "")
|
||||
|
||||
If oDatatable.Rows.Count = 0 Then
|
||||
Throw New InitException("Konfiguration konnte nicht geladen werden!")
|
||||
@@ -133,11 +137,11 @@ Public Class ClassInit
|
||||
Private Sub InitBasicData(MyApplication As My.MyApplication)
|
||||
Try
|
||||
Dim oSql = "SELECT * FROM TBGI_FUNCTION_REGEX"
|
||||
My.Application.Globix.DT_FUNCTION_REGEX = My.Database.GetDatatable(oSql)
|
||||
My.Application.Globix.DT_FUNCTION_REGEX = _DataASorDB.GetDatatable("DD_ECM", oSql, "TBGI_FUNCTION_REGEX", "", "")
|
||||
oSql = "SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1"
|
||||
My.DTCOMMON_SQL = My.DatabaseIDB.GetDatatable(oSql)
|
||||
My.DTCOMMON_SQL = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_COMMON_SQL", "", "")
|
||||
oSql = "SELECT * FROM TBIDB_CATALOG"
|
||||
My.DTCATALOG = My.DatabaseIDB.GetDatatable(oSql)
|
||||
My.DTCATALOG = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_CATALOG", "", "")
|
||||
For Each oRow As DataRow In My.DTCATALOG.Rows
|
||||
'Console.WriteLine(oRow.Item("CAT_TITLE").ToString)
|
||||
Select Case oRow.Item("CAT_TITLE").ToString
|
||||
@@ -159,7 +163,23 @@ Public Class ClassInit
|
||||
Private Sub InitializeIDBService(MyApplication As My.MyApplication)
|
||||
Try
|
||||
MyApplication.Service.Address = My.SystemConfig.AppServerConfig
|
||||
MyApplication.Service.IsActive = True
|
||||
|
||||
Dim oSplit() As String = MyApplication.Service.Address.Split(":")
|
||||
Dim oAppServerAddress As String = oSplit(0)
|
||||
Dim oAppServerPort As Integer = 9000
|
||||
If oSplit.Length = 2 Then
|
||||
oAppServerPort = oSplit(1)
|
||||
End If
|
||||
_Client = New Client(_LogConfig, oAppServerAddress, oAppServerPort)
|
||||
If Not IsNothing(_Client) Then
|
||||
If _Client.Connect() Then
|
||||
MyApplication.Service.IsActive = True
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw New InitException("Error in InitBasicData")
|
||||
|
||||
Reference in New Issue
Block a user