diff --git a/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj b/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj
index ba990efc..5a568159 100644
--- a/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj
+++ b/GUIs.ClipboardWatcher/ClipboardWatcher.vbproj
@@ -53,6 +53,10 @@
False
+
+ False
+ ..\Modules.EDMIAPI\bin\Debug\DigitalData.Modules.EDMI.API.dll
+
..\packages\NLog.4.7.5\lib\net45\NLog.dll
@@ -153,6 +157,10 @@
{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}
Database
+
+ {25017513-0d97-49d3-98d7-ba76d9b251b0}
+ EDMI.API
+
{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}
Language
diff --git a/GUIs.ClipboardWatcher/ProfileSearches.vb b/GUIs.ClipboardWatcher/ProfileSearches.vb
index a00f537e..9e3be2c8 100644
--- a/GUIs.ClipboardWatcher/ProfileSearches.vb
+++ b/GUIs.ClipboardWatcher/ProfileSearches.vb
@@ -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)
diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb
index fde674fd..17ec85b7 100644
--- a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb
+++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb
@@ -60,7 +60,7 @@ Public Class frmDocumentResultList
Private Sub MaybeInitIDB()
_IsLegacy = Not _Environment.Service.IsActive
If _Environment.Service.IsActive Then
- Dim oSplit As List(Of String) = _Environment.Service.Address.Split(":").ToList()
+ Dim oSplit As List(Of String) = _Environment.Service.Address.Split(";").ToList()
Dim oAddress As String = oSplit.Item(0)
Dim oPort As Integer = oSplit.Item(1)