EDMI: Work on ClassDataASorDB
This commit is contained in:
parent
d79340d54f
commit
8e8374fc88
@ -67,16 +67,16 @@ Public Class frmAdmin_ClipboardWatcher
|
|||||||
'TODO: Diese Codezeile lädt Daten in die Tabelle "DSDD_Stammdaten.TBDD_CONNECTION". Sie können sie bei Bedarf verschieben oder entfernen.
|
'TODO: Diese Codezeile lädt Daten in die Tabelle "DSDD_Stammdaten.TBDD_CONNECTION". Sie können sie bei Bedarf verschieben oder entfernen.
|
||||||
Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DSDD_Stammdaten.TBDD_CONNECTION)
|
Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DSDD_Stammdaten.TBDD_CONNECTION)
|
||||||
Try
|
Try
|
||||||
TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
TBCW_PROFILESTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
|
TBCW_PROFILESTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROFILES, PrimaryKey)
|
||||||
|
|
||||||
TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
TBCW_PROF_DOC_SEARCHTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DOC_SEARCH, PrimaryKey)
|
TBCW_PROF_DOC_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DOC_SEARCH, PrimaryKey)
|
||||||
|
|
||||||
TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
TBCW_PROF_DATA_SEARCHTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DATA_SEARCH, PrimaryKey)
|
TBCW_PROF_DATA_SEARCHTableAdapter.Fill(DBCW_Stammdaten.TBCW_PROF_DATA_SEARCH, PrimaryKey)
|
||||||
|
|
||||||
TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
TBDD_CONNECTIONTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
TBDD_CONNECTIONTableAdapter.Fill(DSDD_Stammdaten.TBDD_CONNECTION)
|
TBDD_CONNECTIONTableAdapter.Fill(DSDD_Stammdaten.TBDD_CONNECTION)
|
||||||
|
|
||||||
' Configure the GridViews with some default options
|
' Configure the GridViews with some default options
|
||||||
@ -220,7 +220,7 @@ Public Class frmAdmin_ClipboardWatcher
|
|||||||
Dim oTextEdit As TextEdit = sender
|
Dim oTextEdit As TextEdit = sender
|
||||||
|
|
||||||
If e.Button.Tag = BUTTON_SEARCH_SQL Then
|
If e.Button.Tag = BUTTON_SEARCH_SQL Then
|
||||||
Dim oForm As New frmSQLEditor(My.LogConfig, My.Database) With {.SQLString = oTextEdit.EditValue}
|
Dim oForm As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {.SQLString = oTextEdit.EditValue}
|
||||||
Dim oResult = oForm.ShowDialog()
|
Dim oResult = oForm.ShowDialog()
|
||||||
|
|
||||||
If oResult = DialogResult.OK Then
|
If oResult = DialogResult.OK Then
|
||||||
@ -233,7 +233,7 @@ Public Class frmAdmin_ClipboardWatcher
|
|||||||
Dim oTextEdit As TextEdit = sender
|
Dim oTextEdit As TextEdit = sender
|
||||||
|
|
||||||
If e.Button.Tag = BUTTON_COUNT_SQL Then
|
If e.Button.Tag = BUTTON_COUNT_SQL Then
|
||||||
Dim oForm As New frmSQLEditor(My.LogConfig, My.Database) With {.SQLString = oTextEdit.EditValue}
|
Dim oForm As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With {.SQLString = oTextEdit.EditValue}
|
||||||
Dim oResult = oForm.ShowDialog()
|
Dim oResult = oForm.ShowDialog()
|
||||||
|
|
||||||
If oResult = DialogResult.OK Then
|
If oResult = DialogResult.OK Then
|
||||||
|
|||||||
@ -17,7 +17,7 @@ Public Class frmAdmin_Globix
|
|||||||
|
|
||||||
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmAdmin_Attribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
Try
|
Try
|
||||||
TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
Me.TBDD_DOKUMENTARTTableAdapter.Fill(Me.GlobixDataset.TBDD_DOKUMENTART, PrimaryKey)
|
Me.TBDD_DOKUMENTARTTableAdapter.Fill(Me.GlobixDataset.TBDD_DOKUMENTART, PrimaryKey)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
ShowErrorMessage(ex)
|
||||||
|
|||||||
@ -63,7 +63,7 @@ Public Class frmAdmin_Start
|
|||||||
|
|
||||||
Private Function Load_SQLData() As Boolean
|
Private Function Load_SQLData() As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oTable As DataTable = My.Database.GetDatatable("SELECT * FROM TBZF_ADMIN_SOURCE_SQL")
|
Dim oTable As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBZF_ADMIN_SOURCE_SQL")
|
||||||
DetailForm.DetailDataList.Clear()
|
DetailForm.DetailDataList.Clear()
|
||||||
|
|
||||||
For Each oRow As DataRow In oTable.Rows
|
For Each oRow As DataRow In oTable.Rows
|
||||||
@ -77,7 +77,7 @@ Public Class frmAdmin_Start
|
|||||||
}
|
}
|
||||||
|
|
||||||
Try
|
Try
|
||||||
oItem.SQLResult = My.Database.GetDatatable(oItem.SQLCommand)
|
oItem.SQLResult = My.DatabaseECM.GetDatatable(oItem.SQLCommand)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oItem.SQLResult = Nothing
|
oItem.SQLResult = Nothing
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|||||||
@ -39,4 +39,6 @@
|
|||||||
|
|
||||||
Public Const IDB_ADDED_WHEN_String_German = "Erstellt Wann"
|
Public Const IDB_ADDED_WHEN_String_German = "Erstellt Wann"
|
||||||
Public Const IDB_ADDED_WHEN_String_Englisch = "Added when"
|
Public Const IDB_ADDED_WHEN_String_Englisch = "Added when"
|
||||||
|
|
||||||
|
Public Const WM_WINDOWPOSCHANGING As Integer = &H46
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -24,7 +24,7 @@ Public Class ClassDataASorDB
|
|||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
If pDB = "DD_ECM" Then
|
If pDB = "DD_ECM" Then
|
||||||
oReturnDT = My.Database.GetDatatable(pSQL)
|
oReturnDT = My.DatabaseECM.GetDatatable(pSQL)
|
||||||
ElseIf pDB = "IDB" Then
|
ElseIf pDB = "IDB" Then
|
||||||
oReturnDT = My.DatabaseIDB.GetDatatable(pSQL)
|
oReturnDT = My.DatabaseIDB.GetDatatable(pSQL)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -4,7 +4,7 @@ Public Class ClassEnvironment
|
|||||||
Public Shared Function GetEnvironment() As Environment
|
Public Shared Function GetEnvironment() As Environment
|
||||||
Dim oEnvironment As New Environment() With {
|
Dim oEnvironment As New Environment() With {
|
||||||
.DatabaseIDB = My.DatabaseIDB,
|
.DatabaseIDB = My.DatabaseIDB,
|
||||||
.Database = My.Database,
|
.Database = My.DatabaseECM,
|
||||||
.Modules = My.Application.Modules,
|
.Modules = My.Application.Modules,
|
||||||
.Service = My.Application.Service,
|
.Service = My.Application.Service,
|
||||||
.Settings = My.Application.Settings,
|
.Settings = My.Application.Settings,
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.EDMI.API
|
||||||
|
Imports DigitalData.Modules.EDMI.API.Constants
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class ClassIDBData
|
Public Class ClassIDBData
|
||||||
Public Property DTVWIDB_BE_ATTRIBUTE As DataTable
|
Public Property DTVWIDB_BE_ATTRIBUTE As DataTable
|
||||||
@ -9,11 +11,17 @@ Public Class ClassIDBData
|
|||||||
''' <returns>Array with all Indices</returns>
|
''' <returns>Array with all Indices</returns>
|
||||||
Private _Logger As Logger
|
Private _Logger As Logger
|
||||||
Private _DataASorDB As ClassDataASorDB
|
Private _DataASorDB As ClassDataASorDB
|
||||||
|
Private _Database As DatabaseWithFallback
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig)
|
Public Sub New(LogConfig As LogConfig)
|
||||||
_Logger = LogConfig.GetLogger
|
_Logger = LogConfig.GetLogger
|
||||||
|
_Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||||
|
|
||||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||||
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageID}"
|
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE LANG_ID = {My.Application.User.LanguageID}"
|
||||||
DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
|
|
||||||
|
DTVWIDB_BE_ATTRIBUTE = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, DatabaseType.IDB, $"LANG_ID = {My.Application.User.LanguageID}")
|
||||||
|
'DTVWIDB_BE_ATTRIBUTE = _DataASorDB.GetDatatable("IDB", oSQL, "VWIDB_BE_ATTRIBUTE", $"LANG_ID = {My.Application.User.LanguageID}")
|
||||||
End Sub
|
End Sub
|
||||||
Public IDBSystemIndices As List(Of String)
|
Public IDBSystemIndices As List(Of String)
|
||||||
Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String)
|
Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String)
|
||||||
|
|||||||
@ -44,10 +44,10 @@ Public Class ClassInit
|
|||||||
_Loader = New ClassInitLoader()
|
_Loader = New ClassInitLoader()
|
||||||
|
|
||||||
' === Init Schritte definieren
|
' === Init Schritte definieren
|
||||||
_Loader.AddStep("Checking connectivity..", AddressOf CheckConnectivity, True)
|
_Loader.AddStep("Initializing Database (1/2)", AddressOf InitializeDatabase, True)
|
||||||
|
_Loader.AddStep("Initializing Service", AddressOf InitializeService, True)
|
||||||
|
_Loader.AddStep("Initializing Database (2/2)", AddressOf InitializeDatabaseWithFallback, True)
|
||||||
_Loader.AddStep("Initializing User..", AddressOf InitializeUser, True)
|
_Loader.AddStep("Initializing User..", AddressOf InitializeUser, True)
|
||||||
_Loader.AddStep("Initializing IDB Database..", AddressOf InitializeIDBDatabase, True)
|
|
||||||
_Loader.AddStep("Initializing IDB Service..", AddressOf InitializeIDBService, True)
|
|
||||||
_Loader.AddStep("Initializing Language..", AddressOf InitializeLanguage, False)
|
_Loader.AddStep("Initializing Language..", AddressOf InitializeLanguage, False)
|
||||||
_Loader.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False)
|
_Loader.AddStep("Loading 3rd-party licenses..", AddressOf Initialize3rdParty, False)
|
||||||
_Loader.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False)
|
_Loader.AddStep("Loading Basic Configs..", AddressOf InitBasicData, False)
|
||||||
@ -115,88 +115,17 @@ Public Class ClassInit
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CheckConnectivity(MyApplication As My.MyApplication)
|
Private Sub InitializeDatabase(MyApplication As My.MyApplication)
|
||||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString)
|
Dim oConnectionString = MSSQLServer.DecryptConnectionString(My.SystemConfig.ConnectionString)
|
||||||
My.Database = New MSSQLServer(My.LogConfig, oConnectionString)
|
My.DatabaseECM = New MSSQLServer(My.LogConfig, oConnectionString)
|
||||||
|
|
||||||
If My.Database.DBInitialized = False Then
|
If My.DatabaseECM.DBInitialized = False Then
|
||||||
_Logger.Warn("Could not initialize DD_ECM-Database!")
|
_Logger.Warn("Could not initialize DD_ECM-Database!")
|
||||||
Throw New InitException("Could not initialize DD_ECM-Database!")
|
Throw New InitException("Could not initialize ECM-Database!")
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Initialize3rdParty(MyApplication As My.MyApplication)
|
Else
|
||||||
Try
|
|
||||||
Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
|
|
||||||
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!")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim oRow As DataRow = oDatatable.Rows.Item(0)
|
|
||||||
|
|
||||||
MyApplication.Settings.GdPictureKey = NotNull(oRow.Item("LICENSE"), String.Empty)
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
Throw New InitException("Error initializing3rdParty!", ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
Private Sub InitBasicData(MyApplication As My.MyApplication)
|
|
||||||
Try
|
|
||||||
Dim oSql = ""
|
|
||||||
|
|
||||||
oSql = "SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1"
|
|
||||||
My.Tables.DTIDB_COMMON_SQL = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_COMMON_SQL", "", "")
|
|
||||||
oSql = "SELECT * FROM TBIDB_CATALOG"
|
|
||||||
My.Tables.DTIDB_CATALOG = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_CATALOG", "", "")
|
|
||||||
For Each oRow As DataRow In My.Tables.DTIDB_CATALOG.Rows
|
|
||||||
'Console.WriteLine(oRow.Item("CAT_TITLE").ToString)
|
|
||||||
Select Case oRow.Item("CAT_TITLE").ToString
|
|
||||||
Case "FILESTORE_ARCHIVE"
|
|
||||||
My.Filestore_Archive = oRow.Item("CAT_STRING")
|
|
||||||
Case "FILESTORE_WORK"
|
|
||||||
My.Filestore_Work = oRow.Item("CAT_STRING")
|
|
||||||
My.Filestore_Work = "Q:\DigitalData - IDB"
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
Next
|
|
||||||
oSql = "SELECT * FROM TBDD_CONNECTION"
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
Throw New InitException("Error in InitBasicData", ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub InitializeIDBService(MyApplication As My.MyApplication)
|
|
||||||
Try
|
|
||||||
MyApplication.Service.Address = My.SystemConfig.AppServerConfig
|
|
||||||
|
|
||||||
Dim oSplit() As String = MyApplication.Service.Address.Split(":"c)
|
|
||||||
Dim oAppServerAddress As String = oSplit(0)
|
|
||||||
Dim oAppServerPort As Integer = 9000
|
|
||||||
If oSplit.Length = 2 Then
|
|
||||||
oAppServerPort = oSplit(1)
|
|
||||||
End If
|
|
||||||
My.Application.Service.Client = New Client(_LogConfig, oAppServerAddress, oAppServerPort)
|
|
||||||
If Not IsNothing(My.Application.Service.Client) Then
|
|
||||||
If My.Application.Service.Client.Connect() Then
|
|
||||||
MyApplication.Service.IsActive = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
Throw New InitException("Error in InitBasicData", ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub InitializeIDBDatabase(MyApplication As My.MyApplication)
|
|
||||||
If MyApplication.ModulesActive.Contains(MODULE_ZOOFLOW) Then
|
|
||||||
If My.Database.DBInitialized Then
|
|
||||||
Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'"
|
Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'"
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQl)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl)
|
||||||
|
|
||||||
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
|
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
|
||||||
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
|
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
|
||||||
@ -209,7 +138,108 @@ Public Class ClassInit
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oDataRow As DataRow = oDatatable.Rows.Item(0)
|
Dim oDataRow As DataRow = oDatatable.Rows.Item(0)
|
||||||
Dim oConString = My.Database.GetConnectionString(
|
Dim oConString = My.DatabaseECM.GetConnectionString(
|
||||||
|
oDataRow.Item("SERVER").ToString,
|
||||||
|
oDataRow.Item("DATENBANK").ToString,
|
||||||
|
oDataRow.Item("USERNAME").ToString,
|
||||||
|
oDataRow.Item("PASSWORD").ToString)
|
||||||
|
|
||||||
|
My.DatabaseIDB = New MSSQLServer(My.LogConfig, oConString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If My.DatabaseIDB.DBInitialized = False Then
|
||||||
|
_Logger.Warn("Could not initialize IDB-Database!")
|
||||||
|
Throw New InitException("Could not initialize IDB-Database!")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Initialize3rdParty(MyApplication As My.MyApplication)
|
||||||
|
Try
|
||||||
|
Dim oSql = "Select LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE'"
|
||||||
|
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!")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oRow As DataRow = oDatatable.Rows.Item(0)
|
||||||
|
|
||||||
|
MyApplication.Settings.GdPictureKey = NotNull(oRow.Item("LICENSE"), String.Empty)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw New InitException("Error Initialize3rdParty!", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitializeDatabaseWithFallback(MyApplication As My.MyApplication)
|
||||||
|
Try
|
||||||
|
My.Database = New DatabaseWithFallback(_LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw New InitException("Error InitializeDatabaseWithFallback!", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitBasicData(MyApplication As My.MyApplication)
|
||||||
|
Try
|
||||||
|
My.Tables.DTIDB_COMMON_SQL = My.DatabaseECM.GetDatatable("SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1")
|
||||||
|
My.Tables.DTIDB_CATALOG = My.DatabaseECM.GetDatatable("SELECT * FROM TBIDB_CATALOG")
|
||||||
|
|
||||||
|
'TODO: Get FilesStores from Application Server
|
||||||
|
For Each oRow As DataRow In My.Tables.DTIDB_CATALOG.Rows
|
||||||
|
Select Case oRow.Item("CAT_TITLE").ToString
|
||||||
|
Case "FILESTORE_ARCHIVE"
|
||||||
|
My.Filestore_Archive = oRow.Item("CAT_STRING")
|
||||||
|
|
||||||
|
Case "FILESTORE_WORK"
|
||||||
|
My.Filestore_Work = oRow.Item("CAT_STRING")
|
||||||
|
My.Filestore_Work = "Q:\DigitalData - IDB"
|
||||||
|
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw New InitException("Error in InitBasicData", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitializeService(MyApplication As My.MyApplication)
|
||||||
|
Try
|
||||||
|
MyApplication.Service.Address = My.SystemConfig.AppServerConfig
|
||||||
|
Dim oServerData = Client.ParseServiceAddress(My.SystemConfig.AppServerConfig)
|
||||||
|
|
||||||
|
My.Application.Service.Client = New Client(_LogConfig, oServerData.Item1, oServerData.Item2)
|
||||||
|
|
||||||
|
If Not IsNothing(My.Application.Service.Client) Then
|
||||||
|
If My.Application.Service.Client.Connect() Then
|
||||||
|
MyApplication.Service.IsActive = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
Throw New InitException("Error in InitializeService", ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitializeIDBDatabase(MyApplication As My.MyApplication)
|
||||||
|
If MyApplication.ModulesActive.Contains(MODULE_ZOOFLOW) Then
|
||||||
|
If My.DatabaseECM.DBInitialized Then
|
||||||
|
Dim oSQl = "SELECT * FROM TBDD_CONNECTION WHERE BEZEICHNUNG = 'IDB'"
|
||||||
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQl)
|
||||||
|
|
||||||
|
If IsNothing(oDatatable) OrElse oDatatable.Rows.Count = 0 Then
|
||||||
|
_Logger.Warn("No IDB connection entries in TBDD_CONNECTION found!")
|
||||||
|
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oDatatable.Rows.Count > 1 Then
|
||||||
|
_Logger.Warn("Multiple IDB connection entries in TBDD_CONNECTION found!")
|
||||||
|
Throw New InitException("Fehler beim Laden der IDB Verbindungsdaten!")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oDataRow As DataRow = oDatatable.Rows.Item(0)
|
||||||
|
Dim oConString = My.DatabaseECM.GetConnectionString(
|
||||||
oDataRow.Item("SERVER").ToString,
|
oDataRow.Item("SERVER").ToString,
|
||||||
oDataRow.Item("DATENBANK").ToString,
|
oDataRow.Item("DATENBANK").ToString,
|
||||||
oDataRow.Item("USERNAME").ToString,
|
oDataRow.Item("USERNAME").ToString,
|
||||||
@ -230,7 +260,7 @@ Public Class ClassInit
|
|||||||
Private Sub InitializeUser(MyApplication As My.MyApplication)
|
Private Sub InitializeUser(MyApplication As My.MyApplication)
|
||||||
Try
|
Try
|
||||||
Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName)
|
Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName)
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSql)
|
||||||
|
|
||||||
If oDatatable Is Nothing Then
|
If oDatatable Is Nothing Then
|
||||||
Throw New InitException("Benutzer konnte nicht geladen werden!")
|
Throw New InitException("Benutzer konnte nicht geladen werden!")
|
||||||
|
|||||||
@ -180,7 +180,7 @@ Public Class ClassFilehandle
|
|||||||
|
|
||||||
Dim filename_only As String = Path.GetFileName(filename)
|
Dim filename_only As String = Path.GetFileName(filename)
|
||||||
Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')"
|
Dim ins As String = "INSERT INTO TBGI_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('" & filename & "','" & Environment.UserName & "','" & handleType & "','" & filename_only & "')"
|
||||||
Return My.Database.ExecuteNonQuery(ins)
|
Return My.DatabaseECM.ExecuteNonQuery(ins)
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN"
|
oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN"
|
||||||
Dim oResult As DataTable = My.Database.GetDatatable(oSQL)
|
Dim oResult As DataTable = My.DatabaseECM.GetDatatable(oSQL)
|
||||||
|
|
||||||
If oResult Is Nothing Then
|
If oResult Is Nothing Then
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
If oResult.Rows.Count = 0 Then
|
If oResult.Rows.Count = 0 Then
|
||||||
oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN"
|
oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN"
|
||||||
oResult = My.Database.GetDatatable(oSQL)
|
oResult = My.DatabaseECM.GetDatatable(oSQL)
|
||||||
|
|
||||||
If oResult Is Nothing Then
|
If oResult Is Nothing Then
|
||||||
Return Nothing
|
Return Nothing
|
||||||
|
|||||||
@ -101,7 +101,7 @@ Public Class GlobixControls
|
|||||||
|
|
||||||
AddHandler oControl.Properties.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
|
AddHandler oControl.Properties.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged
|
||||||
|
|
||||||
oConnectionString = My.Database.Get_ConnectionStringforID(conid)
|
oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(conid)
|
||||||
|
|
||||||
If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
|
If oConnectionString IsNot Nothing And oSql.Length > 0 And SQLSuggestion = True Then
|
||||||
_Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
|
_Logger.Debug("Connection String (redacted): [{0}]", oConnectionString.Substring(0, 30))
|
||||||
@ -109,7 +109,7 @@ Public Class GlobixControls
|
|||||||
If Patterns.HasComplexPatterns(oSql) Then
|
If Patterns.HasComplexPatterns(oSql) Then
|
||||||
_Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
_Logger.Debug("sql enthält Platzhalter und wird erst während der Laufzeit gefüllt!", False)
|
||||||
Else
|
Else
|
||||||
Dim oDatatable = My.Database.GetDatatableWithConnection(oSql, oConnectionString)
|
Dim oDatatable = My.DatabaseECM.GetDatatableWithConnection(oSql, oConnectionString)
|
||||||
oControl.Properties.DataSource = oDatatable
|
oControl.Properties.DataSource = oDatatable
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@ -190,7 +190,7 @@ Public Class GlobixControls
|
|||||||
Try
|
Try
|
||||||
Dim indexname = cmb.Name.Replace("cmb", "")
|
Dim indexname = cmb.Name.Replace("cmb", "")
|
||||||
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID & " ORDER BY SEQUENCE"
|
Dim sql = "SELECT GUID,NAME,SQL_RESULT FROM TBDD_INDEX_MAN where SUGGESTION = 1 AND SQL_RESULT like '%@" & indexname & "%' and DOK_ID = " & My.Application.Globix.CURRENT_DOCTYPE_ID & " ORDER BY SEQUENCE"
|
||||||
Dim DT As DataTable = My.Database.GetDatatable(sql)
|
Dim DT As DataTable = My.DatabaseECM.GetDatatable(sql)
|
||||||
If Not IsNothing(DT) Then
|
If Not IsNothing(DT) Then
|
||||||
If DT.Rows.Count > 0 Then
|
If DT.Rows.Count > 0 Then
|
||||||
Dim cmbname = "cmb" & DT.Rows(0).Item("NAME")
|
Dim cmbname = "cmb" & DT.Rows(0).Item("NAME")
|
||||||
@ -217,7 +217,7 @@ Public Class GlobixControls
|
|||||||
Dim NewDataset As New DataSet
|
Dim NewDataset As New DataSet
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
|
|
||||||
Dim DT_INDEX As DataTable = My.Database.GetDatatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID)
|
Dim DT_INDEX As DataTable = My.DatabaseECM.GetDatatable("select * FROM TBDD_INDEX_MAN WHERE GUID = " & INDEX_GUID)
|
||||||
If IsNothing(DT_INDEX) Then
|
If IsNothing(DT_INDEX) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@ -231,7 +231,7 @@ Public Class GlobixControls
|
|||||||
Dim cmb As ComboBox = ctrl
|
Dim cmb As ComboBox = ctrl
|
||||||
Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue)
|
Dim sql As String = sql_result.ToString.ToUpper.Replace("@" & SearchString.ToUpper, Resultvalue)
|
||||||
|
|
||||||
connectionString = My.Database.Get_ConnectionStringforID(conid)
|
connectionString = My.DatabaseECM.Get_ConnectionStringforID(conid)
|
||||||
If connectionString Is Nothing = False Then
|
If connectionString Is Nothing = False Then
|
||||||
'SQL Befehl füllt die Auswahlliste
|
'SQL Befehl füllt die Auswahlliste
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ Public Class GlobixControls
|
|||||||
Dim oMeta = DirectCast(Control.Tag, ControlMeta)
|
Dim oMeta = DirectCast(Control.Tag, ControlMeta)
|
||||||
Dim oIndexName As String = oMeta.IndexName
|
Dim oIndexName As String = oMeta.IndexName
|
||||||
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
|
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%'"
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQL)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
|
||||||
|
|
||||||
If Not IsNothing(oDatatable) Then
|
If Not IsNothing(oDatatable) Then
|
||||||
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name)
|
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, Control.Name)
|
||||||
@ -439,8 +439,8 @@ Public Class GlobixControls
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oConnectionString = My.Database.Get_ConnectionStringforID(SqlConnectionId)
|
Dim oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(SqlConnectionId)
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatableWithConnection(SqlCommand, oConnectionString)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatableWithConnection(SqlCommand, oConnectionString)
|
||||||
Dim oFoundControl As Control = Nothing
|
Dim oFoundControl As Control = Nothing
|
||||||
|
|
||||||
For Each oControl As Control In Panel.Controls
|
For Each oControl As Control In Panel.Controls
|
||||||
|
|||||||
@ -39,7 +39,7 @@ Public Class frmGlobixAdministration
|
|||||||
|
|
||||||
Private Sub frmGlobixAdministration_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub frmGlobixAdministration_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
Try
|
Try
|
||||||
Me.TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.Database.CurrentSQLConnectionString
|
Me.TBDD_DOKUMENTARTTableAdapter.Connection.ConnectionString = My.DatabaseECM.CurrentSQLConnectionString
|
||||||
'Me.TBDD_EINGANGSARTENTableAdapter.Connection.ConnectionString = MyConnectionString
|
'Me.TBDD_EINGANGSARTENTableAdapter.Connection.ConnectionString = MyConnectionString
|
||||||
'Me.TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString
|
'Me.TBDD_MODULESTableAdapter.Connection.ConnectionString = MyConnectionString
|
||||||
'Me.TBDD_DOKART_MODULETableAdapter.Connection.ConnectionString = MyConnectionString
|
'Me.TBDD_DOKART_MODULETableAdapter.Connection.ConnectionString = MyConnectionString
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Public Class frmGlobixBasicConfig
|
|||||||
Sub CheckFolder(pMypath As String, FOLDER_TYPE As String)
|
Sub CheckFolder(pMypath As String, FOLDER_TYPE As String)
|
||||||
Try
|
Try
|
||||||
If pMypath = "" Then
|
If pMypath = "" Then
|
||||||
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||||
If FOLDER_TYPE = "SCAN" Then
|
If FOLDER_TYPE = "SCAN" Then
|
||||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = ""
|
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = ""
|
||||||
My.UIConfig.Globix.FolderWatchScanStarted = False
|
My.UIConfig.Globix.FolderWatchScanStarted = False
|
||||||
@ -67,15 +67,15 @@ Public Class frmGlobixBasicConfig
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Dim folderwatch = My.Database.GetScalarValue("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
Dim folderwatch = My.DatabaseECM.GetScalarValue("SELECT GUID FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||||
Dim oSql As String
|
Dim oSql As String
|
||||||
If folderwatch Is Nothing Then
|
If folderwatch Is Nothing Then
|
||||||
oSql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & My.Application.User.UserId & ",'" & pMypath & "','" & FOLDER_TYPE & "','" & My.Application.User.UserName & "')"
|
oSql = "INSERT INTO TBGI_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & My.Application.User.UserId & ",'" & pMypath & "','" & FOLDER_TYPE & "','" & My.Application.User.UserName & "')"
|
||||||
Else
|
Else
|
||||||
oSql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & pMypath & "', CHANGED_WHO = '" & My.Application.User.UserName & "' where GUID = " & folderwatch
|
oSql = "UPDATE TBGI_FOLDERWATCH_USER SET FOLDER_PATH = '" & pMypath & "', CHANGED_WHO = '" & My.Application.User.UserName & "' where GUID = " & folderwatch
|
||||||
End If
|
End If
|
||||||
If My.Database.ExecuteNonQuery(oSql) Then
|
If My.DatabaseECM.ExecuteNonQuery(oSql) Then
|
||||||
folderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
folderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE USER_ID = " & My.Application.User.UserId & " AND FOLDER_TYPE = '" & FOLDER_TYPE & "'")
|
||||||
|
|
||||||
If FOLDER_TYPE = "SCAN" Then
|
If FOLDER_TYPE = "SCAN" Then
|
||||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
|
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = folderwatch
|
||||||
@ -102,12 +102,12 @@ Public Class frmGlobixBasicConfig
|
|||||||
clsFW = New ClassFolderwatcher()
|
clsFW = New ClassFolderwatcher()
|
||||||
Try
|
Try
|
||||||
oReload = True
|
oReload = True
|
||||||
Dim oFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
Dim oFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'DEFAULT' AND USER_ID = " & My.Application.User.UserId)
|
||||||
If Not oFolderwatch Is Nothing Then
|
If Not oFolderwatch Is Nothing Then
|
||||||
My.Application.Globix.CurrentFolderWatchPath = oFolderwatch
|
My.Application.Globix.CurrentFolderWatchPath = oFolderwatch
|
||||||
End If
|
End If
|
||||||
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
Me.txtFolderWatch.Text = My.Application.Globix.CurrentFolderWatchPath
|
||||||
Dim oSCANFolderwatch = My.Database.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
Dim oSCANFolderwatch = My.DatabaseECM.GetScalarValue("SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId)
|
||||||
If Not oSCANFolderwatch Is Nothing Then
|
If Not oSCANFolderwatch Is Nothing Then
|
||||||
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = oSCANFolderwatch
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -86,7 +86,7 @@ Public Class frmGlobix_Index
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
My.Application.Globix.CURRENT_ISATTACHMENT = False
|
My.Application.Globix.CURRENT_ISATTACHMENT = False
|
||||||
DropType = My.Database.GetScalarValue("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID).ToString
|
DropType = My.DatabaseECM.GetScalarValue("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID).ToString
|
||||||
|
|
||||||
My.Application.Globix.CURR_DELETE_ORIGIN = My.UIConfig.Globix.DeleteOriginalFile
|
My.Application.Globix.CURR_DELETE_ORIGIN = My.UIConfig.Globix.DeleteOriginalFile
|
||||||
SourceDeleteItem.Enabled = True
|
SourceDeleteItem.Enabled = True
|
||||||
@ -175,7 +175,7 @@ Public Class frmGlobix_Index
|
|||||||
My.Application.Globix.DTTBGI_REGEX_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "DTTBGI_REGEX_DOCTYPE", "", "")
|
My.Application.Globix.DTTBGI_REGEX_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSQL, "DTTBGI_REGEX_DOCTYPE", "", "")
|
||||||
oSQL = "SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING"
|
oSQL = "SELECT * FROM TBDD_INDEX_MAN_POSTPROCESSING"
|
||||||
My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = _DataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_INDEX_MAN_POSTPROCESSING", "", "")
|
My.Application.Globix.CURR_INDEX_MAN_POSTPROCESSING = _DataASorDB.GetDatatable("DD_ECM", oSQL, "TBDD_INDEX_MAN_POSTPROCESSING", "", "")
|
||||||
MULTIFILES = My.Database.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
MULTIFILES = My.DatabaseECM.GetScalarValue("SELECT COUNT(*) FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||||
My.Application.Globix.MULTIINDEXING_ACTIVE = False
|
My.Application.Globix.MULTIINDEXING_ACTIVE = False
|
||||||
If MULTIFILES > 0 Then
|
If MULTIFILES > 0 Then
|
||||||
If My.Application.User.Language = "de-DE" Then
|
If My.Application.User.Language = "de-DE" Then
|
||||||
@ -228,7 +228,7 @@ Public Class frmGlobix_Index
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick
|
Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick
|
||||||
My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}")
|
My.DatabaseECM.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}")
|
||||||
CancelAttempts = 2
|
CancelAttempts = 2
|
||||||
Close()
|
Close()
|
||||||
End Sub
|
End Sub
|
||||||
@ -497,7 +497,7 @@ Public Class frmGlobix_Index
|
|||||||
Dim oMeta = DirectCast(pControl.Tag, ControlMeta)
|
Dim oMeta = DirectCast(pControl.Tag, ControlMeta)
|
||||||
Dim oIndexName As String = oMeta.IndexName
|
Dim oIndexName As String = oMeta.IndexName
|
||||||
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
|
Dim oSQL = $"SELECT * FROM TBDD_INDEX_MAN WHERE SQL_RESULT LIKE '%{oIndexName}%' AND DOK_ID = {My.Application.Globix.CURRENT_DOCTYPE_ID}"
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSQL)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatable(oSQL)
|
||||||
|
|
||||||
If Not IsNothing(oDatatable) Then
|
If Not IsNothing(oDatatable) Then
|
||||||
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, pControl.Name)
|
_Logger.Debug("Found [{0}] depending controls for [{1}]", oDatatable.Rows.Count, pControl.Name)
|
||||||
@ -533,7 +533,7 @@ Public Class frmGlobix_Index
|
|||||||
Dim oConnectionString = GetConnectionString(SqlConnectionId)
|
Dim oConnectionString = GetConnectionString(SqlConnectionId)
|
||||||
|
|
||||||
|
|
||||||
Dim oDatatable As DataTable = My.Database.GetDatatableWithConnection(pSqlCommand, oConnectionString)
|
Dim oDatatable As DataTable = My.DatabaseECM.GetDatatableWithConnection(pSqlCommand, oConnectionString)
|
||||||
Dim oFoundControl As Control = Nothing
|
Dim oFoundControl As Control = Nothing
|
||||||
|
|
||||||
For Each oControl As Control In pnlIndex.Controls
|
For Each oControl As Control In pnlIndex.Controls
|
||||||
@ -596,7 +596,7 @@ Public Class frmGlobix_Index
|
|||||||
pSQLCommand = _Patterns.ReplaceInternalValues(pSQLCommand)
|
pSQLCommand = _Patterns.ReplaceInternalValues(pSQLCommand)
|
||||||
pSQLCommand = _Patterns.ReplaceUserValues(pSQLCommand, My.Application.Globix.CURRENT_DOCTYPE_ID)
|
pSQLCommand = _Patterns.ReplaceUserValues(pSQLCommand, My.Application.Globix.CURRENT_DOCTYPE_ID)
|
||||||
|
|
||||||
Dim oDatatable = My.Database.GetDatatableWithConnection(pSQLCommand, oConnectionString)
|
Dim oDatatable = My.DatabaseECM.GetDatatableWithConnection(pSQLCommand, oConnectionString)
|
||||||
Return oDatatable
|
Return oDatatable
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@ -703,7 +703,7 @@ Public Class frmGlobix_Index
|
|||||||
Try
|
Try
|
||||||
My.Application.Globix.ABORT_INDEXING = True
|
My.Application.Globix.ABORT_INDEXING = True
|
||||||
Dim sql As String = $"SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')"
|
Dim sql As String = $"SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')"
|
||||||
Dim DT As DataTable = My.Database.GetDatatable(sql)
|
Dim DT As DataTable = My.DatabaseECM.GetDatatable(sql)
|
||||||
|
|
||||||
Dim anz = DT.Rows.Count
|
Dim anz = DT.Rows.Count
|
||||||
For Each Filerow As DataRow In DT.Rows
|
For Each Filerow As DataRow In DT.Rows
|
||||||
@ -722,7 +722,7 @@ Public Class frmGlobix_Index
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'Zuerst die Daten des Ablaufs löschen
|
'Zuerst die Daten des Ablaufs löschen
|
||||||
If My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')") = True Then
|
If My.DatabaseECM.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('{My.Application.User.UserName}')") = True Then
|
||||||
If containsfw_file = True Then
|
If containsfw_file = True Then
|
||||||
If My.Application.User.Language = "de-DE" Then
|
If My.Application.User.Language = "de-DE" Then
|
||||||
MsgBox("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", MsgBoxStyle.Information, "Achtung - Hinweis:")
|
MsgBox("Der Indexierungsprozess beinhaltete (auch) Dateien per Folderwatch!" & vbNewLine & "Diese Dateien wurden nicht gelöscht und verbleiben im Folderwatch-Verzeichnis!" & vbNewLine & "Bitte verschieben Sie die Dateien ggfls.", MsgBoxStyle.Information, "Achtung - Hinweis:")
|
||||||
@ -789,7 +789,7 @@ Public Class frmGlobix_Index
|
|||||||
'Die erste Datei indexieren
|
'Die erste Datei indexieren
|
||||||
If WORK_FILE() = True Then
|
If WORK_FILE() = True Then
|
||||||
'Und nun die folgenden
|
'Und nun die folgenden
|
||||||
Dim DTFiles2Work As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & My.Application.User.UserName & "')")
|
Dim DTFiles2Work As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND GUID <> " & My.Application.Globix.CURRENT_WORKFILE_GUID & " AND UPPER(USER@WORK) = UPPER('" & My.Application.User.UserName & "')")
|
||||||
If Not DTFiles2Work Is Nothing Then
|
If Not DTFiles2Work Is Nothing Then
|
||||||
Dim err = False
|
Dim err = False
|
||||||
For Each filerow As DataRow In DTFiles2Work.Rows
|
For Each filerow As DataRow In DTFiles2Work.Rows
|
||||||
@ -876,7 +876,7 @@ Public Class frmGlobix_Index
|
|||||||
My.Application.Globix.CURRENT_LASTDOCTYPE = oDokart.Name
|
My.Application.Globix.CURRENT_LASTDOCTYPE = oDokart.Name
|
||||||
_Logger.Info("Datei '" & My.Application.Globix.CURRENT_NEWFILENAME & "' erfolgreich erzeugt.")
|
_Logger.Info("Datei '" & My.Application.Globix.CURRENT_NEWFILENAME & "' erfolgreich erzeugt.")
|
||||||
Dim oDEL As String = "DELETE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID
|
Dim oDEL As String = "DELETE FROM TBGI_FILES_USER WHERE GUID = " & My.Application.Globix.CURRENT_WORKFILE_GUID
|
||||||
My.Database.ExecuteNonQuery(oDEL)
|
My.DatabaseECM.ExecuteNonQuery(oDEL)
|
||||||
|
|
||||||
If My.Application.Globix.CURR_DELETE_ORIGIN = True Then
|
If My.Application.Globix.CURR_DELETE_ORIGIN = True Then
|
||||||
_Logger.Info("Datei [" & My.Application.Globix.CURRENT_WORKFILE & "] wird gelöscht.")
|
_Logger.Info("Datei [" & My.Application.Globix.CURRENT_WORKFILE & "] wird gelöscht.")
|
||||||
@ -1151,20 +1151,20 @@ Public Class frmGlobix_Index
|
|||||||
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
|
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
|
||||||
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
|
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
|
||||||
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')"
|
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "')"
|
||||||
My.Database.ExecuteNonQuery(Insert_String)
|
My.DatabaseECM.ExecuteNonQuery(Insert_String)
|
||||||
If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
If DropType.Contains("MSG") Or DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||||
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
||||||
Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
|
Dim max As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
|
||||||
Dim GUID = My.Database.GetScalarValue(max)
|
Dim GUID = My.DatabaseECM.GetScalarValue(max)
|
||||||
Try
|
Try
|
||||||
If GUID > 0 Then
|
If GUID > 0 Then
|
||||||
Dim sqlUpdate As String
|
Dim sqlUpdate As String
|
||||||
If DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
If DropType = "|ATTMNTEXTRACTED|" Or DropType = "|OUTLOOK_ATTACHMENT|" Then
|
||||||
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
|
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
|
||||||
My.Database.ExecuteNonQuery(sqlUpdate)
|
My.DatabaseECM.ExecuteNonQuery(sqlUpdate)
|
||||||
Else
|
Else
|
||||||
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
|
sqlUpdate = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & GUID
|
||||||
My.Database.ExecuteNonQuery(sqlUpdate)
|
My.DatabaseECM.ExecuteNonQuery(sqlUpdate)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@ -1251,19 +1251,19 @@ Public Class frmGlobix_Index
|
|||||||
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
|
Dim tempCur_WF = My.Application.Globix.CURRENT_WORKFILE.Replace("'", "''")
|
||||||
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
|
Dim tempCur_New_FN = My.Application.Globix.CURRENT_NEWFILENAME.Replace("'", "''")
|
||||||
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')"
|
Insert_String = sql_history_INSERT_INTO & ",ADDED_WHO,ADDED_WHERE) VALUES ('" & tempCur_WF & "','" & tempCur_New_FN & "'" & sql_history_Index_Values & ",'" & Environment.UserDomainName & "\" & Environment.UserName & "','" & Environment.MachineName & "')"
|
||||||
If My.Database.ExecuteNonQuery(Insert_String) = True Then
|
If My.DatabaseECM.ExecuteNonQuery(Insert_String) = True Then
|
||||||
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
If My.Application.Globix.CURRENT_MESSAGEID <> "" Then
|
||||||
Dim oMax As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
|
Dim oMax As String = "SELECT MAX(GUID) FROM TBGI_HISTORY"
|
||||||
Dim oGUID = My.Database.GetScalarValue(oMax)
|
Dim oGUID = My.DatabaseECM.GetScalarValue(oMax)
|
||||||
Try
|
Try
|
||||||
If oGUID > 0 Then
|
If oGUID > 0 Then
|
||||||
Dim oSql As String
|
Dim oSql As String
|
||||||
If My.Application.Globix.CURRENT_ISATTACHMENT = True Then
|
If My.Application.Globix.CURRENT_ISATTACHMENT = True Then
|
||||||
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
|
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 1, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
|
||||||
My.Database.GetScalarValue(oSql)
|
My.DatabaseECM.GetScalarValue(oSql)
|
||||||
Else
|
Else
|
||||||
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
|
oSql = "Update TBGI_HISTORY SET ATTACHMENT = 0, MSG_ID = '" & My.Application.Globix.CURRENT_MESSAGEID & "' WHERE GUID = " & oGUID
|
||||||
My.Database.GetScalarValue(oSql)
|
My.DatabaseECM.GetScalarValue(oSql)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@ -1773,7 +1773,7 @@ Public Class frmGlobix_Index
|
|||||||
Private Function SetAttachmentIndices()
|
Private Function SetAttachmentIndices()
|
||||||
Dim indexierung_erfolgreich As Boolean = True
|
Dim indexierung_erfolgreich As Boolean = True
|
||||||
Try
|
Try
|
||||||
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
Dim DT As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
||||||
If DT.Rows.Count = 1 Then
|
If DT.Rows.Count = 1 Then
|
||||||
|
|
||||||
If Not My.Application.Globix.CURRENT_MESSAGEID Is Nothing Then
|
If Not My.Application.Globix.CURRENT_MESSAGEID Is Nothing Then
|
||||||
@ -1825,7 +1825,7 @@ Public Class frmGlobix_Index
|
|||||||
If oRow.Item("SQL_CHECK").ToString <> String.Empty Then
|
If oRow.Item("SQL_CHECK").ToString <> String.Empty Then
|
||||||
Dim connectionString As String
|
Dim connectionString As String
|
||||||
Dim sql As String
|
Dim sql As String
|
||||||
connectionString = My.Database.Get_ConnectionStringforID(oRow.Item("CONNECTION_ID"))
|
connectionString = My.DatabaseECM.Get_ConnectionStringforID(oRow.Item("CONNECTION_ID"))
|
||||||
If connectionString <> "" Then
|
If connectionString <> "" Then
|
||||||
Dim sqlscalar = oRow.Item("SQL_CHECK")
|
Dim sqlscalar = oRow.Item("SQL_CHECK")
|
||||||
Select Case oRow.Item("DATENTYP")
|
Select Case oRow.Item("DATENTYP")
|
||||||
@ -1841,7 +1841,7 @@ Public Class frmGlobix_Index
|
|||||||
' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString)
|
' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString)
|
||||||
'Else
|
'Else
|
||||||
'MSQL
|
'MSQL
|
||||||
ergebnis = My.Database.GetScalarValueWithConnection(sql, connectionString)
|
ergebnis = My.DatabaseECM.GetScalarValueWithConnection(sql, connectionString)
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
Select Case ergebnis
|
Select Case ergebnis
|
||||||
@ -2008,7 +2008,7 @@ Public Class frmGlobix_Index
|
|||||||
Function GetAutomaticIndexSQLValue(SQLCommand As String, vconnectionID As Integer, vProvider As String) As String
|
Function GetAutomaticIndexSQLValue(SQLCommand As String, vconnectionID As Integer, vProvider As String) As String
|
||||||
Try
|
Try
|
||||||
Dim oConnectionString As String
|
Dim oConnectionString As String
|
||||||
oConnectionString = My.Database.Get_ConnectionStringforID(vconnectionID)
|
oConnectionString = My.DatabaseECM.Get_ConnectionStringforID(vconnectionID)
|
||||||
If oConnectionString <> "" Then
|
If oConnectionString <> "" Then
|
||||||
'NEU
|
'NEU
|
||||||
Dim oErgebnis
|
Dim oErgebnis
|
||||||
@ -2016,7 +2016,7 @@ Public Class frmGlobix_Index
|
|||||||
'If vProvider.ToLower = "oracle" Then
|
'If vProvider.ToLower = "oracle" Then
|
||||||
'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString)
|
'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString)
|
||||||
'Else 'im Moment nur SQL-Server
|
'Else 'im Moment nur SQL-Server
|
||||||
oErgebnis = My.Database.GetScalarValueWithConnection(SQLCommand, oConnectionString)
|
oErgebnis = My.DatabaseECM.GetScalarValueWithConnection(SQLCommand, oConnectionString)
|
||||||
'End If
|
'End If
|
||||||
_Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("=")))
|
_Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("=")))
|
||||||
If oErgebnis Is Nothing Then
|
If oErgebnis Is Nothing Then
|
||||||
@ -2121,7 +2121,7 @@ Public Class frmGlobix_Index
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim DT As DataTable = My.Database.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
Dim DT As DataTable = My.DatabaseECM.GetDatatable("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX WHERE OBJECTTYPE = 'DEFAULT'")
|
||||||
If IsNothing(DT) Then
|
If IsNothing(DT) Then
|
||||||
_Logger.Info("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX RESULTED in NOTHING")
|
_Logger.Info("SELECT * FROM TBGI_OBJECTTYPE_EMAIL_INDEX RESULTED in NOTHING")
|
||||||
Return False
|
Return False
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
Private Sub frmGlobixIndexFileList_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub frmGlobixIndexFileList_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
Try
|
Try
|
||||||
Dim oSQL = $"Select * From TBGI_FILES_USER Where WORKED = 0 And (UPPER([USER@WORK]) = UPPER('{My.Application.User.UserName}'))"
|
Dim oSQL = $"Select * From TBGI_FILES_USER Where WORKED = 0 And (UPPER([USER@WORK]) = UPPER('{My.Application.User.UserName}'))"
|
||||||
Dim oDT As DataTable = My.Database.GetDatatable(oSQL)
|
Dim oDT As DataTable = My.DatabaseECM.GetDatatable(oSQL)
|
||||||
If oDT.Rows.Count > 0 Then
|
If oDT.Rows.Count > 0 Then
|
||||||
CheckedListBox1.DataSource = oDT
|
CheckedListBox1.DataSource = oDT
|
||||||
CheckedListBox1.DisplayMember = oDT.Columns("FILENAME_ONLY").ColumnName
|
CheckedListBox1.DisplayMember = oDT.Columns("FILENAME_ONLY").ColumnName
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.ZooFlow
|
Imports DigitalData.Modules.ZooFlow
|
||||||
|
Imports DigitalData.Modules.EDMI.API
|
||||||
|
|
||||||
Namespace My
|
Namespace My
|
||||||
''' <summary>
|
''' <summary>
|
||||||
@ -28,10 +28,16 @@ Namespace My
|
|||||||
Property LogConfig As LogConfig
|
Property LogConfig As LogConfig
|
||||||
Property MainForm As frmAdmin_Start
|
Property MainForm As frmAdmin_Start
|
||||||
Property SearchForm As frmSearchStart
|
Property SearchForm As frmSearchStart
|
||||||
Property Database As MSSQLServer
|
|
||||||
|
#Region "Database"
|
||||||
|
Property Database As DatabaseWithFallback
|
||||||
|
Property DatabaseECM As MSSQLServer
|
||||||
Property DatabaseIDB As MSSQLServer
|
Property DatabaseIDB As MSSQLServer
|
||||||
|
|
||||||
Property Tables As New ClassTables
|
Property Tables As New ClassTables
|
||||||
Property Queries As New ClassQueries
|
Property Queries As New ClassQueries
|
||||||
|
#End Region
|
||||||
|
|
||||||
Property Filestore_Work As String
|
Property Filestore_Work As String
|
||||||
Property Filestore_Archive As String
|
Property Filestore_Archive As String
|
||||||
End Module
|
End Module
|
||||||
@ -56,7 +62,7 @@ Namespace My
|
|||||||
|
|
||||||
Public Function GetEnvironment() As Environment
|
Public Function GetEnvironment() As Environment
|
||||||
Return New Environment With {
|
Return New Environment With {
|
||||||
.Database = My.Database,
|
.Database = My.DatabaseECM,
|
||||||
.DatabaseIDB = My.DatabaseIDB,
|
.DatabaseIDB = My.DatabaseIDB,
|
||||||
.Modules = My.Application.Modules,
|
.Modules = My.Application.Modules,
|
||||||
.Service = My.Application.Service,
|
.Service = My.Application.Service,
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DevExpress.XtraEditors
|
||||||
Imports DevExpress.XtraEditors
|
|
||||||
Imports DigitalData.GUIs.Common
|
|
||||||
Imports DevExpress.XtraSplashScreen
|
Imports DevExpress.XtraSplashScreen
|
||||||
Imports DevExpress.XtraBars
|
Imports DevExpress.XtraBars
|
||||||
Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
|
||||||
Imports DevExpress.Utils
|
Imports DevExpress.Utils
|
||||||
|
Imports DigitalData.GUIs.Common
|
||||||
|
Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
||||||
|
Imports DigitalData.Modules.EDMI.API
|
||||||
|
Imports DigitalData.Modules.EDMI.API.Constants
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class frmFlowSearch
|
Public Class frmFlowSearch
|
||||||
Private Logger As Logger
|
Private Logger As Logger
|
||||||
@ -12,26 +14,26 @@ Public Class frmFlowSearch
|
|||||||
Private FontLargeNormal As New Font("Segoe UI", 10)
|
Private FontLargeNormal As New Font("Segoe UI", 10)
|
||||||
Private SecondaryFontBold As New Font("Segoe UI", 8, FontStyle.Bold)
|
Private SecondaryFontBold As New Font("Segoe UI", 8, FontStyle.Bold)
|
||||||
Private SecondaryFont As New Font("Segoe UI", 8)
|
Private SecondaryFont As New Font("Segoe UI", 8)
|
||||||
Dim oLastAttribute As String = ""
|
Private oLastAttribute As String = ""
|
||||||
Dim oAttributeCount As Integer = 1
|
Private oAttributeCount As Integer = 1
|
||||||
Dim BASE_SEARCHCommand As String
|
Private BaseSearchCommand As String
|
||||||
Private LastSearchForm As frmDocumentResultList
|
Private LastSearchForm As frmDocumentResultList
|
||||||
Private ASorDB As ClassDataASorDB
|
Private Database As DatabaseWithFallback
|
||||||
Private EventtoggleChange As Boolean = False
|
Private EventtoggleChange As Boolean = False
|
||||||
|
|
||||||
Private SEARCH_FACT_DATE As String = "MONTH(OBJ.ADDED_WHEN) <> 13"
|
|
||||||
Private SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN"
|
|
||||||
Private Language_Term_Object As String
|
Private Language_Term_Object As String
|
||||||
Private LIMITATION_DATE As Boolean = False
|
Private LIMITATION_DATE As Boolean = False
|
||||||
Private TOGGLE_Change As Boolean = False
|
Private TOGGLE_Change As Boolean = False
|
||||||
Private CATEGORIES_SELECTED As String = ""
|
Private CATEGORIES_SELECTED As String = ""
|
||||||
|
Private SEARCH_FACT_DATE As String = "MONTH(OBJ.ADDED_WHEN) <> 13"
|
||||||
|
Private SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN"
|
||||||
|
|
||||||
Public Sub New(pBaseSearchSql As String)
|
Public Sub New(pBaseSearchSql As String)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
BASE_SEARCHCommand = pBaseSearchSql
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
BaseSearchCommand = pBaseSearchSql
|
||||||
Logger = My.LogConfig.GetLogger()
|
Logger = My.LogConfig.GetLogger()
|
||||||
ASorDB = New ClassDataASorDB(My.LogConfig)
|
Database = New DatabaseWithFallback(My.LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||||
If My.Application.User.Language = "de-DE" Then
|
If My.Application.User.Language = "de-DE" Then
|
||||||
Language_Term_Object = "Objekte"
|
Language_Term_Object = "Objekte"
|
||||||
Else
|
Else
|
||||||
@ -43,7 +45,11 @@ Public Class frmFlowSearch
|
|||||||
RibbonControl1.Minimized = True
|
RibbonControl1.Minimized = True
|
||||||
TileControlMatch.Groups.Clear()
|
TileControlMatch.Groups.Clear()
|
||||||
Dim oSQL = "select DISTINCT TERM_VALUE AS CATEGORY ,ATTRIBUTE_ID from VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE WHERE LANGUAGE_ID = @LANGUAGE_ID ORDER BY TERM_VALUE"
|
Dim oSQL = "select DISTINCT TERM_VALUE AS CATEGORY ,ATTRIBUTE_ID from VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE WHERE LANGUAGE_ID = @LANGUAGE_ID ORDER BY TERM_VALUE"
|
||||||
Dim oDTCategory As DataTable = ASorDB.GetDatatable("IDB", $"SELECT 'NONE' as CATEGORY", "VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "", "CATEGORY")
|
|
||||||
|
|
||||||
|
'Dim oDTCategory As DataTable = ASorDB.GetDatatable("IDB", $"SELECT 'NONE' as CATEGORY", "VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "", "CATEGORY")
|
||||||
|
Dim oDTCategory As DataTable = Database.GetDatatable("VWIDB_CATEGORIES_PER_OBJECT_AND_LANGUAGE", "SELECT 'NONE' as CATEGORY", DatabaseType.IDB, "", "CATEGORY")
|
||||||
|
|
||||||
If Not IsNothing(oDTCategory) Then
|
If Not IsNothing(oDTCategory) Then
|
||||||
CheckedListBoxCategories.DataSource = oDTCategory
|
CheckedListBoxCategories.DataSource = oDTCategory
|
||||||
CheckedListBoxCategories.DisplayMember = "CATEGORY"
|
CheckedListBoxCategories.DisplayMember = "CATEGORY"
|
||||||
@ -53,7 +59,9 @@ Public Class frmFlowSearch
|
|||||||
Else
|
Else
|
||||||
cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch)
|
cmbAttributeDate.Items.Add(IDB_ADDED_WHEN_String_Englisch)
|
||||||
End If
|
End If
|
||||||
Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
|
'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
|
||||||
|
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"TYPE_ID = 5 AND LANG_ID = {My.Application.User.LanguageID}")
|
||||||
|
|
||||||
For Each oRow As DataRow In oDT.Rows
|
For Each oRow As DataRow In oDT.Rows
|
||||||
cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE"))
|
cmbAttributeDate.Items.Add(oRow.Item("ATTR_TITLE"))
|
||||||
Next
|
Next
|
||||||
@ -90,7 +98,7 @@ Public Class frmFlowSearch
|
|||||||
|
|
||||||
Dim oSearchValue = Trim(txtSearchTerm.Text)
|
Dim oSearchValue = Trim(txtSearchTerm.Text)
|
||||||
oLastAttribute = ""
|
oLastAttribute = ""
|
||||||
Dim oSQL = BASE_SEARCHCommand.Replace("@SEARCH_STRING", oSearchValue)
|
Dim oSQL = BaseSearchCommand.Replace("@SEARCH_STRING", oSearchValue)
|
||||||
|
|
||||||
|
|
||||||
If SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN" Then
|
If SEARCH_FACT_DATE_ATTRIBUTE = "ADDED_WHEN" Then
|
||||||
@ -213,7 +221,7 @@ Public Class frmFlowSearch
|
|||||||
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
|
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
|
||||||
.User = My.Application.User,
|
.User = My.Application.User,
|
||||||
.Modules = My.Application.Modules,
|
.Modules = My.Application.Modules,
|
||||||
.Database = My.Database,
|
.Database = My.DatabaseECM,
|
||||||
.DatabaseIDB = My.DatabaseIDB,
|
.DatabaseIDB = My.DatabaseIDB,
|
||||||
.Settings = My.Application.Settings,
|
.Settings = My.Application.Settings,
|
||||||
.Service = My.Application.Service
|
.Service = My.Application.Service
|
||||||
@ -365,7 +373,10 @@ Public Class frmFlowSearch
|
|||||||
Dim oSplit = oItem.Tag.ToString.Split("|")
|
Dim oSplit = oItem.Tag.ToString.Split("|")
|
||||||
Try
|
Try
|
||||||
oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||||
Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
|
|
||||||
|
'Dim oDT As DataTable = ASorDB.GetDatatable("IDB", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", "VWIDB_BE_ATTRIBUTE", $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
|
||||||
|
Dim oDT As DataTable = Database.GetDatatable("VWIDB_BE_ATTRIBUTE", $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}", DatabaseType.IDB, $"ATTR_ID = {oSplit(1)} AND LANG_ID = {My.Application.User.LanguageID}")
|
||||||
|
|
||||||
Dim oType = oDT.Rows(0).Item("TYPE_NAME")
|
Dim oType = oDT.Rows(0).Item("TYPE_NAME")
|
||||||
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'"
|
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT_PER_TILE {oSplit(0)},{My.Application.User.UserId},'{oType}',{oSplit(1)},'{My.Application.User.Language}'"
|
||||||
Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL)
|
Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL)
|
||||||
|
|||||||
@ -942,7 +942,7 @@ Public Class frmSearchStart
|
|||||||
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
|
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
|
||||||
.User = My.Application.User,
|
.User = My.Application.User,
|
||||||
.Modules = My.Application.Modules,
|
.Modules = My.Application.Modules,
|
||||||
.Database = My.Database,
|
.Database = My.DatabaseECM,
|
||||||
.DatabaseIDB = My.DatabaseIDB,
|
.DatabaseIDB = My.DatabaseIDB,
|
||||||
.Settings = My.Application.Settings,
|
.Settings = My.Application.Settings,
|
||||||
.Service = My.Application.Service
|
.Service = My.Application.Service
|
||||||
|
|||||||
@ -49,7 +49,7 @@ Public Class frmFlowForm
|
|||||||
Private IndexForm As frmGlobix_Index
|
Private IndexForm As frmGlobix_Index
|
||||||
Private AdminForm As frmAdmin_Start
|
Private AdminForm As frmAdmin_Start
|
||||||
Private Const mSnapOffset As Integer = 35
|
Private Const mSnapOffset As Integer = 35
|
||||||
Private Const WM_WINDOWPOSCHANGING As Integer = &H46
|
|
||||||
|
|
||||||
' Events
|
' Events
|
||||||
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
Public Event ClipboardChanged As EventHandler(Of IDataObject)
|
||||||
@ -77,6 +77,8 @@ Public Class frmFlowForm
|
|||||||
' === Initialize AppServer Database Connection with Failover
|
' === Initialize AppServer Database Connection with Failover
|
||||||
AppServerOrDB = New ClassDataASorDB(My.LogConfig)
|
AppServerOrDB = New ClassDataASorDB(My.LogConfig)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' === Initialization ===
|
' === Initialization ===
|
||||||
Init = New ClassInit(My.LogConfig, Me)
|
Init = New ClassInit(My.LogConfig, Me)
|
||||||
AddHandler Init.Completed, AddressOf Init_Completed
|
AddHandler Init.Completed, AddressOf Init_Completed
|
||||||
@ -327,7 +329,7 @@ Public Class frmFlowForm
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Dim oSql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId
|
Dim oSql As String = "SELECT FOLDER_PATH FROM TBGI_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & My.Application.User.UserId
|
||||||
Dim oFolderwatchScanPath = My.Database.GetScalarValue(oSql)
|
Dim oFolderwatchScanPath = My.DatabaseECM.GetScalarValue(oSql)
|
||||||
|
|
||||||
oFolderwatchScanPath = IIf(IsDBNull(oFolderwatchScanPath), "", oFolderwatchScanPath)
|
oFolderwatchScanPath = IIf(IsDBNull(oFolderwatchScanPath), "", oFolderwatchScanPath)
|
||||||
|
|
||||||
@ -565,7 +567,7 @@ Public Class frmFlowForm
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Erstmal alles löschen
|
'Erstmal alles löschen
|
||||||
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||||
|
|
||||||
If FileDrop.Drop_File(e) = True Then
|
If FileDrop.Drop_File(e) = True Then
|
||||||
TimerCheckDroppedFiles.Start()
|
TimerCheckDroppedFiles.Start()
|
||||||
@ -590,7 +592,7 @@ Public Class frmFlowForm
|
|||||||
End Sub
|
End Sub
|
||||||
Sub Globix_Check_Dropped_Files()
|
Sub Globix_Check_Dropped_Files()
|
||||||
Try
|
Try
|
||||||
My.Database.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
My.DatabaseECM.ExecuteNonQuery("DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
|
||||||
Dim i As Integer
|
Dim i As Integer
|
||||||
|
|
||||||
For Each Str As Object In FileDrop.files_dropped
|
For Each Str As Object In FileDrop.files_dropped
|
||||||
@ -610,7 +612,7 @@ Public Class frmFlowForm
|
|||||||
|
|
||||||
Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
|
Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
|
||||||
My.Application.Globix.DTACTUAL_FILES = Nothing
|
My.Application.Globix.DTACTUAL_FILES = Nothing
|
||||||
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql)
|
My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
|
||||||
My.Application.Globix.ABORT_INDEXING = False
|
My.Application.Globix.ABORT_INDEXING = False
|
||||||
|
|
||||||
Dim oOnlyFilesFromFilesystem = True
|
Dim oOnlyFilesFromFilesystem = True
|
||||||
@ -624,7 +626,7 @@ Public Class frmFlowForm
|
|||||||
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 1 And oOnlyFilesFromFilesystem = False Then
|
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 1 And oOnlyFilesFromFilesystem = False Then
|
||||||
frmGlobix_IndexFileList.ShowDialog()
|
frmGlobix_IndexFileList.ShowDialog()
|
||||||
My.Application.Globix.DTACTUAL_FILES = Nothing
|
My.Application.Globix.DTACTUAL_FILES = Nothing
|
||||||
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql)
|
My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each oFileRow As DataRow In My.Application.Globix.DTACTUAL_FILES.Rows
|
For Each oFileRow As DataRow In My.Application.Globix.DTACTUAL_FILES.Rows
|
||||||
@ -797,7 +799,7 @@ Public Class frmFlowForm
|
|||||||
If My.Application.Globix.Folderwatchstarted = True Or My.UIConfig.Globix.FolderWatchScanStarted = True Then
|
If My.Application.Globix.Folderwatchstarted = True Or My.UIConfig.Globix.FolderWatchScanStarted = True Then
|
||||||
'Prüfen ob alle Files abgearbeitet wurden
|
'Prüfen ob alle Files abgearbeitet wurden
|
||||||
Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
|
Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
|
||||||
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatable(sql)
|
My.Application.Globix.DTACTUAL_FILES = My.DatabaseECM.GetDatatable(sql)
|
||||||
|
|
||||||
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then
|
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then
|
||||||
My.Application.Globix.ABORT_INDEXING = False
|
My.Application.Globix.ABORT_INDEXING = False
|
||||||
@ -821,7 +823,7 @@ Public Class frmFlowForm
|
|||||||
Else
|
Else
|
||||||
Logger.Info(" File not existing - Row will be deleted!")
|
Logger.Info(" File not existing - Row will be deleted!")
|
||||||
Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
|
Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
|
||||||
My.Database.ExecuteNonQuery(oDel)
|
My.DatabaseECM.ExecuteNonQuery(oDel)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Logger.Info(" file '" & row.Item(1).ToString & "' could not be opened exclusively - fileInUse!")
|
Logger.Info(" file '" & row.Item(1).ToString & "' could not be opened exclusively - fileInUse!")
|
||||||
|
|||||||
@ -8,6 +8,8 @@ Public Class Client
|
|||||||
Private Const INVALID_OBEJCT_ID As Long = 0
|
Private Const INVALID_OBEJCT_ID As Long = 0
|
||||||
Private Const KIND_TYPE_DOC = "DOC"
|
Private Const KIND_TYPE_DOC = "DOC"
|
||||||
|
|
||||||
|
Public Const DEFAULT_SERVICE_PORT = 9000
|
||||||
|
|
||||||
Private ReadOnly _logger As Logger
|
Private ReadOnly _logger As Logger
|
||||||
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
|
||||||
Private ReadOnly _IPAddressServer As String
|
Private ReadOnly _IPAddressServer As String
|
||||||
@ -27,6 +29,22 @@ Public Class Client
|
|||||||
Public AccessRight As AccessRight
|
Public AccessRight As AccessRight
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Shared Function ParseServiceAddress(AddressWithOptionalPort As String) As Tuple(Of String, Integer)
|
||||||
|
Dim oSplit() As String = AddressWithOptionalPort.Split(":"c)
|
||||||
|
Dim oAppServerAddress As String = oSplit(0)
|
||||||
|
Dim oAppServerPort As Integer
|
||||||
|
|
||||||
|
If oSplit.Length = 2 Then
|
||||||
|
If Integer.TryParse(oSplit(1), oAppServerPort) Then
|
||||||
|
oAppServerPort = DEFAULT_SERVICE_PORT
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
oAppServerPort = DEFAULT_SERVICE_PORT
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return New Tuple(Of String, Integer)(oAppServerAddress, oAppServerPort)
|
||||||
|
End Function
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Creates a new EDMI Client object
|
''' Creates a new EDMI Client object
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|||||||
6
Modules.EDMIAPI/Constants.vb
Normal file
6
Modules.EDMIAPI/Constants.vb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Public Class Constants
|
||||||
|
Public Enum DatabaseType
|
||||||
|
ECM
|
||||||
|
IDB
|
||||||
|
End Enum
|
||||||
|
End Class
|
||||||
@ -1,20 +1,15 @@
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.EDMI.API
|
Imports DigitalData.Modules.EDMI.API
|
||||||
|
Imports DigitalData.Modules.EDMI.API.Constants
|
||||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Language.Utils
|
Imports DigitalData.Modules.Language.Utils
|
||||||
|
|
||||||
Public Class DataWithFallback
|
Public Class DatabaseWithFallback
|
||||||
Private _Logger As Logger
|
Private ReadOnly _Logger As Logger
|
||||||
Private _Client As Client
|
Private ReadOnly _Client As Client
|
||||||
Private _DatabaseEDM As MSSQLServer
|
Private ReadOnly _DatabaseEDM As MSSQLServer
|
||||||
Private _DatabaseIDB As MSSQLServer
|
Private ReadOnly _DatabaseIDB As MSSQLServer
|
||||||
Private _Type As DatabaseType
|
|
||||||
|
|
||||||
Public Enum DatabaseType
|
|
||||||
ECM
|
|
||||||
IDB
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer)
|
Public Sub New(LogConfig As LogConfig, Client As Client, DatabaseECM As MSSQLServer, DatabaseIDB As MSSQLServer)
|
||||||
_Logger = LogConfig.GetLogger()
|
_Logger = LogConfig.GetLogger()
|
||||||
@ -23,7 +18,7 @@ Public Class DataWithFallback
|
|||||||
_DatabaseIDB = DatabaseIDB
|
_DatabaseIDB = DatabaseIDB
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetDatatable(DataTable As String, FilterExpression As String, SortByColumn As String, FallbackSQL As String, FallbackType As DatabaseType, Optional ForceFallback As Boolean = False) As DataTable
|
Public Function GetDatatable(DataTable As String, FallbackSQL As String, FallbackType As Constants.DatabaseType, Optional FilterExpression As String = "", Optional SortByColumn As String = "", Optional ForceFallback As Boolean = False) As DataTable
|
||||||
Try
|
Try
|
||||||
Dim oResult As DataTable = Nothing
|
Dim oResult As DataTable = Nothing
|
||||||
|
|
||||||
@ -80,7 +80,8 @@
|
|||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Client.vb" />
|
<Compile Include="Client.vb" />
|
||||||
<Compile Include="DataWithFallback.vb" />
|
<Compile Include="Constants.vb" />
|
||||||
|
<Compile Include="DatabaseWithFallback.vb" />
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@ -96,7 +97,7 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="DataWithFallback\UserData.vb" />
|
<Compile Include="DatabaseWithFallback\UserData.vb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user