Zooflow: Implement Single file Search Results, Rework client wrt Address parsing

This commit is contained in:
Jonathan Jenne
2022-04-13 15:39:01 +02:00
parent 7716a04452
commit 160040535d
23 changed files with 346 additions and 234 deletions

View File

@@ -8,8 +8,6 @@ Public Class SearchRunner
Private Const SEARCH_FACT_DATE_DEFAULT As String = "ADDED_WHEN"
Private Environment As Environment
Private Const CREATED_TOMORROW As String = "TOMORROW"
Private Const CREATED_TODAY As String = "ECM_CREATED_TODAY"
Private Const CREATED_YESTERDAY As String = "ECM_CREATED_YESTERDAY"
@@ -49,18 +47,30 @@ Public Class SearchRunner
Public Property BaseSearchSQL As String
Public Property ExplicitDate As Boolean = False
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment)
Private Environment As Environment
Private SearchTitle As String
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pSearchTitle As String)
MyBase.New(pLogConfig)
Environment = pEnvironment
SearchTitle = pSearchTitle
End Sub
Public Async Function Run(pSearchTerm As String) As Threading.Tasks.Task(Of SearchResult)
Return Await Run(pSearchTerm, Nothing, Nothing)
End Function
Public Async Function Run(pSearchTerm As String, pDateFrom As Date, pDateTo As Date) As Threading.Tasks.Task(Of SearchResult)
If pDateFrom.Equals(Date.MinValue) = False Then
ExplicitDate = True
End If
Dim oSearchTerm = pSearchTerm
Dim oParams = New DocumentResultList.Params() With {
.WindowGuid = "FlowSearch",
.WindowGuid = SearchTitle,
.WindowTitle = GetResultWindowString(oSearchTerm),
.OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow,
.ProfileGuid = 354522,
.ProfileGuid = 35452,
.ColumnNames = New DocumentResultList.ColumnNames With {
.ObjectIdColumn = "DocID"
},
@@ -88,9 +98,14 @@ Public Class SearchRunner
Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(BaseSearchSQL)
If oDTDocResult.Rows.Count > 0 Then
oParams.Results.Add(New DocumentResultList.DocumentResult() With {
.Title = "FlowSearchXYZ",
.Title = SearchTitle,
.Datatable = oDTDocResult
})
If oDTDocResult.Rows.Count = 1 Then
oParams.ShowFileList = False
End If
Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams)
' TODO: Implement, not needed right now