Admin Globix und Flowsearch
This commit is contained in:
@@ -4,6 +4,7 @@ Imports DigitalData.GUIs.Common
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DevExpress.XtraBars
|
||||
Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
||||
Imports DevExpress.Utils
|
||||
|
||||
Public Class frmFlowSearch
|
||||
Private Logger As Logger
|
||||
@@ -82,10 +83,10 @@ Public Class frmFlowSearch
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub txtSearch_TextChanged(sender As Object, e As EventArgs) Handles txtSearch.TextChanged
|
||||
Private Sub txtSearch_TextChanged(sender As Object, e As EventArgs) Handles txtSearchTerm.TextChanged
|
||||
Try
|
||||
|
||||
If txtSearch.Text = String.Empty Then
|
||||
If txtSearchTerm.Text = String.Empty Then
|
||||
Reset_Form()
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -104,10 +105,10 @@ Public Class frmFlowSearch
|
||||
End Sub
|
||||
Sub SearchContent()
|
||||
Try
|
||||
If txtSearch.Text = String.Empty Then
|
||||
If txtSearchTerm.Text = String.Empty Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim oSearchValue = Trim(txtSearch.Text)
|
||||
Dim oSearchValue = Trim(txtSearchTerm.Text)
|
||||
oLastAttribute = ""
|
||||
Dim oSQL = BASE_SEARCHCommand.Replace("@SEARCH_STRING", oSearchValue)
|
||||
|
||||
@@ -147,10 +148,11 @@ Public Class frmFlowSearch
|
||||
oNewTable.DefaultView.Sort = "COUNT ASC"
|
||||
oNewTable = oNewTable.DefaultView.ToTable
|
||||
|
||||
'#### CREATE THE GROUPS FOR EACH ATTRIBUTE ####
|
||||
For Each oGroupRow As DataRow In oNewTable.Rows
|
||||
Dim oGroup As New TileGroup
|
||||
|
||||
oGroup.Text = $"{oGroupRow.Item(0).ToString} ({oGroupRow.Item(1).ToString} {Language_Term_Object})"
|
||||
oGroup.Tag = oGroupRow.Item(0)
|
||||
oGroup.Visible = True
|
||||
For Each oitemRow As DataRow In oResultsfromSearchDT.Rows
|
||||
If oitemRow.Item("ATTRIBUTE") = oGroupRow.Item(0) Then
|
||||
@@ -166,7 +168,7 @@ Public Class frmFlowSearch
|
||||
|
||||
'Wenn weniger als 45 Belege gefunden wurden wird direkt die Suche ausgeführt
|
||||
If oResultCountAttributes > 0 And oResultCountAttributes <= 45 Then
|
||||
StartSearch_Full(oSearchValue)
|
||||
StartSearch_Full(oSearchValue, "")
|
||||
Else
|
||||
If oResultsfromSearchDT.Rows.Count = 0 Then
|
||||
Reset_Form()
|
||||
@@ -185,7 +187,7 @@ Public Class frmFlowSearch
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function StartSearch_Full(pSearchValue As String) As Boolean
|
||||
Private Function StartSearch_Full(pSearchValue As String, pOptAttribute As String) As Boolean
|
||||
Dim oHandle As IOverlaySplashScreenHandle = Nothing
|
||||
Dim oItemsFound As Boolean = False
|
||||
Dim oSearchData = My.Application.Search
|
||||
@@ -193,7 +195,7 @@ Public Class frmFlowSearch
|
||||
Try
|
||||
oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||
|
||||
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT '{pSearchValue}','{SEARCH_FACT_DATE}', {My.Application.User.UserId},'{oSearchData.SelectInStringAttributeIds}','{oSearchData.SelectInIntegerAttributeIds}'"
|
||||
Dim oEXECSQL = $"EXEC PRFLOW_SEARCH_GET_RESULT '{pSearchValue}','{SEARCH_FACT_DATE}', {My.Application.User.UserId},'{oSearchData.SelectInStringAttributeIds}','{oSearchData.SelectInIntegerAttributeIds}',{My.Application.User.LanguageID},'{pOptAttribute}'"
|
||||
Dim oDTOBJECT_RESULT As DataTable = My.DatabaseIDB.GetDatatable(oEXECSQL)
|
||||
If Not IsNothing(oDTOBJECT_RESULT) Then
|
||||
If oDTOBJECT_RESULT.Rows.Count = 0 Then
|
||||
@@ -333,10 +335,15 @@ Public Class frmFlowSearch
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub txtSearch_Enter(sender As Object, e As EventArgs) Handles txtSearch.GotFocus
|
||||
Private Sub txtSearch_Enter(sender As Object, e As EventArgs) Handles txtSearchTerm.GotFocus
|
||||
Label1.Visible = True
|
||||
Dim oTEXTBOX As TextBox = CType(sender, TextBox)
|
||||
oTEXTBOX.BackColor = Color.FromArgb(255, 214, 47)
|
||||
End Sub
|
||||
Private Sub txtSearchTerm_Leave(sender As Object, e As EventArgs) Handles txtSearchTerm.Leave
|
||||
Dim oTEXTBOX As TextBox = CType(sender, TextBox)
|
||||
oTEXTBOX.BackColor = Color.White
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick
|
||||
@@ -467,7 +474,7 @@ Public Class frmFlowSearch
|
||||
|
||||
End Sub
|
||||
Sub Start_FlowSearch(Optional AllOver As Boolean = False)
|
||||
If txtSearch.Text <> String.Empty Or AllOver = True Then
|
||||
If txtSearchTerm.Text <> String.Empty Or AllOver = True Then
|
||||
SearchContent()
|
||||
End If
|
||||
End Sub
|
||||
@@ -488,11 +495,18 @@ Public Class frmFlowSearch
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
StartSearch_Full("")
|
||||
StartSearch_Full("", "")
|
||||
CheckButton1.Checked = True
|
||||
End Sub
|
||||
|
||||
Private Sub BarEditItemDate_ItemClick(sender As Object, e As ItemClickEventArgs) Handles BarEditItemDate.ItemClick
|
||||
|
||||
Private Sub TileControlMatch_Click(sender As Object, ByVal e As MouseEventArgs) Handles TileControlMatch.Click
|
||||
Dim tc As TileControl = TryCast(sender, TileControl)
|
||||
Dim hi = tc.CalcHitInfo(e.Location)
|
||||
If hi.HitTest = DevExpress.XtraEditors.TileControlHitTest.GroupCaption Then
|
||||
Console.WriteLine(hi.GroupInfo.Group.Tag)
|
||||
StartSearch_Full(RTrim(LTrim(txtSearchTerm.Text)), hi.GroupInfo.Group.Tag)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user