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, "FlowSearch") 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 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