ms
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.Modules.Patterns
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
|
||||
Public Class ProfileSearches
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
Private _Environment As Environment
|
||||
Private _Params As ClipboardWatcherParams
|
||||
Private _Client As Client
|
||||
|
||||
Public Class Search
|
||||
Public Guid As Integer
|
||||
@@ -23,6 +26,28 @@ Public Class ProfileSearches
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Environment = Environment
|
||||
_Params = Params
|
||||
Try
|
||||
If _Environment.Service.IsActive = True Then
|
||||
Try
|
||||
Dim oSplit() As String = _Environment.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
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn($"Could not initialize the AppServer: {ex.Message}")
|
||||
End Try
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Async Function LoadDocumentSearchesAsync(ProfileId As Integer) As Task(Of List(Of Search))
|
||||
@@ -33,7 +58,15 @@ Public Class ProfileSearches
|
||||
|
||||
Private Function DoLoadDocumentSearches(ProfileId As Integer) As List(Of Search)
|
||||
Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID = {ProfileId} ORDER BY TAB_INDEX"
|
||||
Dim oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
|
||||
Dim oSearchesDataTable As DataTable
|
||||
Dim o = _Environment.Service.Address
|
||||
If _Environment.Service.IsActive = True Then
|
||||
Dim oTableResult As TableResult = _Client.GetDatatableByName("TBCW_PROF_DOC_SEARCH", $"PROFILE_ID = {ProfileId}", "TAB_INDEX")
|
||||
oSearchesDataTable = oTableResult.Table
|
||||
Else
|
||||
oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
|
||||
End If
|
||||
|
||||
Dim oDocSearches As New List(Of Search)
|
||||
Dim oCounter As Integer = 0
|
||||
Dim oPatterns As New ClassPatterns(_LogConfig)
|
||||
@@ -83,7 +116,13 @@ Public Class ProfileSearches
|
||||
|
||||
Try
|
||||
Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DATA_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID = {ProfileId} ORDER BY TAB_INDEX"
|
||||
Dim oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
|
||||
Dim oSearchesDataTable As DataTable
|
||||
If _Environment.Service.IsActive = True Then
|
||||
Dim oTableResult As TableResult = _Client.GetDatatableByName("TBCW_PROF_DATA_SEARCH", $"PROFILE_ID = {ProfileId}", "TAB_INDEX")
|
||||
oSearchesDataTable = oTableResult.Table
|
||||
Else
|
||||
oSearchesDataTable = _Environment.Database.GetDatatable(oSQL)
|
||||
End If
|
||||
|
||||
Dim oCounter As Integer = 0
|
||||
Dim oPatterns As New ClassPatterns(_LogConfig)
|
||||
|
||||
Reference in New Issue
Block a user