Zooflow: Improve frmServiceConfig, Init Errors Handling, Hide Backnavigation in Results
This commit is contained in:
@@ -1,11 +1,43 @@
|
||||
Public Class frmFlowSearch2
|
||||
Private Sub HyperlinkLabelControl5_Click(sender As Object, e As EventArgs) Handles HyperlinkLabelControl5.Click
|
||||
DateEditFrom.EditValue = Date.Today
|
||||
DateEditTo.EditValue = Date.Today
|
||||
Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
||||
|
||||
Public Class frmFlowSearch2
|
||||
Private SearchRunner As SearchRunner
|
||||
Private BaseSearchSQL As String
|
||||
|
||||
Private Sub frmFlowSearch2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
For Each oRow As DataRow In My.Tables.DTIDB_COMMON_SQL.Rows
|
||||
If oRow.Item("TITLE") = SQLCMD_FLOW_SEARCH_BASE Then
|
||||
BaseSearchSQL = oRow.Item("SQL_COMMAND")
|
||||
BaseSearchSQL = BaseSearchSQL.Replace("@USER_ID", My.Application.User.UserId)
|
||||
BaseSearchSQL = BaseSearchSQL.Replace("@LANG_CODE", My.Application.User.Language)
|
||||
End If
|
||||
Next
|
||||
|
||||
SearchRunner = New SearchRunner(My.LogConfig, My.Application.GetEnvironment)
|
||||
SearchRunner.BaseSearchSQL = BaseSearchSQL
|
||||
|
||||
Dim osql = $"EXEC PRIDB_SEARCH_AUTOSUGGEST '{My.Application.User.Language}',{My.Application.User.UserId}"
|
||||
Dim oDTSuggest As DataTable
|
||||
oDTSuggest = My.Database.GetDatatableIDB(osql)
|
||||
Dim collection As AutoCompleteStringCollection = New AutoCompleteStringCollection
|
||||
For Each orow As DataRow In oDTSuggest.Rows
|
||||
collection.Add(orow.Item("TERM"))
|
||||
Next
|
||||
|
||||
TextEdit1.MaskBox.AutoCompleteSource = AutoCompleteSource.CustomSource
|
||||
TextEdit1.MaskBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend
|
||||
TextEdit1.MaskBox.AutoCompleteCustomSource = collection
|
||||
End Sub
|
||||
|
||||
Private Sub HyperlinkLabelControl4_Click(sender As Object, e As EventArgs) Handles HyperlinkLabelControl4.Click
|
||||
DateEditFrom.EditValue = Date.Today.AddDays(-1)
|
||||
DateEditTo.EditValue = Date.Today.AddDays(-1)
|
||||
Private Async Sub TextEdit1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextEdit1.KeyUp
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
Await SearchRunner.Run(TextEdit1.EditValue, Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Async Sub TextEdit1_ButtonClick(sender As Object, e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs) Handles TextEdit1.ButtonClick
|
||||
If e.Button.Tag = "SEARCH" Then
|
||||
Await SearchRunner.Run(TextEdit1.EditValue, Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user