MS Parameters SearchStart
This commit is contained in:
@@ -22,7 +22,7 @@ Public Class frmSearchStart
|
||||
Public DataLoaded As Boolean = False
|
||||
Private Const DEFAULT_X As Integer = 10
|
||||
Private Const DEFAULT_Y As Integer = 10
|
||||
Private DTSearchTerms As DataTable
|
||||
'Private DTSearchTerms As DataTable
|
||||
Private oDTAttributes As DataTable
|
||||
Private SEARCH_COUNT As Integer = 0
|
||||
Private _Environment As Environment
|
||||
@@ -47,12 +47,12 @@ Public Class frmSearchStart
|
||||
oSearchTerms.Columns.Add("SearchTerm", GetType(String))
|
||||
oSearchTerms.Columns.Add("BracketRight", GetType(String))
|
||||
oSearchTerms.Columns.Add("Operator", GetType(String))
|
||||
DTSearchTerms = oSearchTerms
|
||||
'DTSearchTerms = oSearchTerms
|
||||
End Sub
|
||||
|
||||
Private Sub frmSearchStart_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
Me.Panel1.Visible = False
|
||||
Me.pnlProfileChoose.Visible = False
|
||||
For Each oTab As XtraTabPage In XtraTabControl1.TabPages
|
||||
oTab.PageVisible = False
|
||||
Next
|
||||
@@ -81,12 +81,14 @@ Public Class frmSearchStart
|
||||
cmbProfile.SelectedIndex = -1
|
||||
TabSelectedIndex = -1
|
||||
|
||||
Me.Panel1.Visible = True
|
||||
Me.pnlProfileChoose.Visible = True
|
||||
For Each orow As DataRow In DTSearchProfiles.Rows
|
||||
RepositoryItemComboBox1.Items.Add(orow.Item("TITLE"))
|
||||
Next
|
||||
|
||||
Me.pnlProfileChoose.Visible = True
|
||||
Else
|
||||
Me.pnlProfileChoose.Visible = False
|
||||
RibbonPageGroupProfiles.Visible = False
|
||||
TabSelectedIndex = 0
|
||||
TabSelected = XtraTabControl1.TabPages(0)
|
||||
TabSelected.PageVisible = True
|
||||
@@ -112,66 +114,60 @@ Public Class frmSearchStart
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub AddSearchAttribute(pAttributeId As String, pAttributeTitle As String, pSearchTerm As String, Optional pCriteria As String = "=")
|
||||
GridControlSerchTerms.DataSource = Nothing
|
||||
Dim oMultiselect As Boolean = False
|
||||
For Each oRow As DataRow In oDTAttributes.Rows
|
||||
If oRow.Item("ATTRIBUTE_ID") = pAttributeId Then
|
||||
oMultiselect = CBool(oRow.Item("MULTISELECT"))
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If oMultiselect = False Then
|
||||
For Each oSearchTerm As DataRow In DTSearchTerms.Rows
|
||||
If oSearchTerm.Item("AttrID") = pAttributeId Then 'And oSearchTerm.Item("Criteria") = pCriteria And oSearchTerm.Item("SearchTerm") = pSearchTerm
|
||||
oSearchTerm.Delete()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'Public Sub AddSearchAttribute(pAttributeId As String, pAttributeTitle As String, pSearchTerm As String, Optional pCriteria As String = "=")
|
||||
' GridControlSerchTerms.DataSource = Nothing
|
||||
' Dim oMultiselect As Boolean = False
|
||||
' For Each oRow As DataRow In oDTAttributes.Rows
|
||||
' If oRow.Item("ATTRIBUTE_ID") = pAttributeId Then
|
||||
' oMultiselect = CBool(oRow.Item("MULTISELECT"))
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If oMultiselect = False Then
|
||||
' For Each oSearchTerm As DataRow In DTSearchTerms.Rows
|
||||
' If oSearchTerm.Item("AttrID") = pAttributeId Then 'And oSearchTerm.Item("Criteria") = pCriteria And oSearchTerm.Item("SearchTerm") = pSearchTerm
|
||||
' oSearchTerm.Delete()
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
|
||||
DTSearchTerms.Rows.Add("", pAttributeId, pAttributeTitle, pCriteria, pSearchTerm, "", "and")
|
||||
RenewBinding_DTSearchTerms()
|
||||
' DTSearchTerms.Rows.Add("", pAttributeId, pAttributeTitle, pCriteria, pSearchTerm, "", "and")
|
||||
' RenewBinding_DTSearchTerms()
|
||||
|
||||
If SplitContainerControlSearch.Collapsed = True Then
|
||||
SplitContainerControlSearch.Collapsed = False
|
||||
End If
|
||||
' If SplitContainerControlSearch.Collapsed = True Then
|
||||
' SplitContainerControlSearch.Collapsed = False
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
Sub RenewBinding_DTSearchTerms()
|
||||
DTSearchTerms.AcceptChanges()
|
||||
GridControlSerchTerms.DataSource = Nothing
|
||||
GridControlSerchTerms.DataSource = DTSearchTerms
|
||||
'"BracketLeft"
|
||||
'"AttrID", GetType(Integer))
|
||||
'"AttrTitle"
|
||||
'"Criteria"
|
||||
'"SearchTerm"
|
||||
'"BracketRight"
|
||||
'"Operator"
|
||||
GridViewSearchTerms.Columns("BracketLeft").Caption = "("
|
||||
GridViewSearchTerms.Columns("BracketRight").Caption = ")"
|
||||
If My.Application.User.Language <> "de-DE" Then
|
||||
GridViewSearchTerms.Columns("AttrTitle").Caption = "Attribute"
|
||||
GridViewSearchTerms.Columns("Criteria").Caption = "Criteria"
|
||||
Else
|
||||
GridViewSearchTerms.Columns("AttrTitle").Caption = "Attribut"
|
||||
GridViewSearchTerms.Columns("Criteria").Caption = "Bedingung"
|
||||
End If
|
||||
'End Sub
|
||||
'Sub RenewBinding_DTSearchTerms()
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
' GridControlSerchTerms.DataSource = Nothing
|
||||
' GridControlSerchTerms.DataSource = DTSearchTerms
|
||||
|
||||
End Sub
|
||||
' GridViewSearchTerms.Columns("BracketLeft").Caption = "("
|
||||
' GridViewSearchTerms.Columns("BracketRight").Caption = ")"
|
||||
' If My.Application.User.Language <> "de-DE" Then
|
||||
' GridViewSearchTerms.Columns("AttrTitle").Caption = "Attribute"
|
||||
' GridViewSearchTerms.Columns("Criteria").Caption = "Criteria"
|
||||
' Else
|
||||
' GridViewSearchTerms.Columns("AttrTitle").Caption = "Attribut"
|
||||
' GridViewSearchTerms.Columns("Criteria").Caption = "Bedingung"
|
||||
' End If
|
||||
|
||||
Public Sub SearchAttribute(pAttrID As String, pAttrTitle As String, pSearchTerm As String, Optional pCriteria As String = "=")
|
||||
'"BracketLeft"
|
||||
'"AttrID", GetType(Integer))
|
||||
'"AttrTitle"
|
||||
'"Criteria"
|
||||
'"SearchTerm"
|
||||
'"BracketRight"
|
||||
'"Operator"
|
||||
DTSearchTerms.Rows.Add("", pAttrID, pAttrTitle, pCriteria, pSearchTerm, "", "And")
|
||||
DTSearchTerms.AcceptChanges()
|
||||
'End Sub
|
||||
|
||||
End Sub
|
||||
'Public Sub SearchAttribute(pAttrID As String, pAttrTitle As String, pSearchTerm As String, Optional pCriteria As String = "=")
|
||||
' '"BracketLeft"
|
||||
' '"AttrID", GetType(Integer))
|
||||
' '"AttrTitle"
|
||||
' '"Criteria"
|
||||
' '"SearchTerm"
|
||||
' '"BracketRight"
|
||||
' '"Operator"
|
||||
' DTSearchTerms.Rows.Add("", pAttrID, pAttrTitle, pCriteria, pSearchTerm, "", "And")
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
|
||||
'End Sub
|
||||
|
||||
Sub Load_Search_Attributes()
|
||||
Try
|
||||
@@ -265,7 +261,7 @@ Public Class frmSearchStart
|
||||
If Not IsNothing(omyDTSource) Then
|
||||
If omyDTSource.Rows.Count = 1 Then
|
||||
oSingleResult = True
|
||||
AddSearchAttribute(oAttriID, oAttriTitle, omyDTSource.Rows(0).Item(oAttriTitle).ToString)
|
||||
' AddSearchAttribute(oAttriID, oAttriTitle, omyDTSource.Rows(0).Item(oAttriTitle).ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -318,22 +314,8 @@ Public Class frmSearchStart
|
||||
|
||||
TabSelected.Controls.Add(lbl)
|
||||
End Sub
|
||||
Private Sub WindowsUIButtonPanel1_ButtonClick(sender As Object, e As DevExpress.XtraBars.Docking2010.ButtonEventArgs)
|
||||
Select Case e.Button.Properties.Tag.ToString
|
||||
Case "Run"
|
||||
RunSearch()
|
||||
End Select
|
||||
End Sub
|
||||
Private Sub RunSearch()
|
||||
Try
|
||||
For Each oSearchTerm As DataRow In DTSearchTerms.Rows
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Clearing Search Items: " & ex.Message, MsgBoxStyle.Critical)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControl1.SelectedPageChanged
|
||||
TabSelected = XtraTabControl1.SelectedTabPage
|
||||
End Sub
|
||||
@@ -435,7 +417,7 @@ Public Class frmSearchStart
|
||||
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
Dim oAttrTitle = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrTitle
|
||||
RenewSearchAttributes()
|
||||
AddSearchAttribute(oAttrID, oAttrTitle, oResult)
|
||||
' AddSearchAttribute(oAttrID, oAttrTitle, oResult)
|
||||
|
||||
End If
|
||||
|
||||
@@ -447,7 +429,7 @@ Public Class frmSearchStart
|
||||
Dim oAttrID = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
Dim oAttrTitle = DirectCast(oCurrentCB.Tag, ClassControlCreator.ControlMetadata).AttrTitle
|
||||
RenewSearchAttributes()
|
||||
AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString)
|
||||
' AddSearchAttribute(oAttrID, oAttrTitle, oChecked.ToString)
|
||||
End Sub
|
||||
Private Sub frmSearchStart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
DataLoaded = True
|
||||
@@ -549,7 +531,7 @@ Public Class frmSearchStart
|
||||
Try
|
||||
'Clear_token()
|
||||
ClearSearchCriteria()
|
||||
DTSearchTerms.Clear()
|
||||
'DTSearchTerms.Clear()
|
||||
ClearSelectedControls()
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Clearing Search Items: " & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -655,7 +637,7 @@ Public Class frmSearchStart
|
||||
BarStaticItemInfo.ItemAppearance.Normal.BackColor = pColor
|
||||
End Sub
|
||||
|
||||
Private Sub MehrfachauswahlAktivierenToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
Private Sub MehrfachauswahlAktivierenToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
If DataLoaded = False Then Exit Sub
|
||||
Dim oCurrentControl As GridControl = DirectCast(CURR_CTRL_OBJ, GridControl)
|
||||
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
@@ -671,7 +653,7 @@ Public Class frmSearchStart
|
||||
|
||||
|
||||
|
||||
Private Sub MehrfachauswahlInaktivierenToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
Private Sub MehrfachauswahlInaktivierenToolStripMenuItem_Click(sender As Object, e As EventArgs)
|
||||
If DataLoaded = False Then Exit Sub
|
||||
Dim oCurrentControl As GridControl = DirectCast(CURR_CTRL_OBJ, GridControl)
|
||||
Dim oAttrID = DirectCast(oCurrentControl.Tag, ClassControlCreator.ControlMetadata).AttrID
|
||||
@@ -685,7 +667,7 @@ Public Class frmSearchStart
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub GridViewSearchTerms_RowDeleted(sender As Object, e As DevExpress.Data.RowDeletedEventArgs) Handles GridViewSearchTerms.RowDeleted
|
||||
Private Sub GridViewSearchTerms_RowDeleted(sender As Object, e As DevExpress.Data.RowDeletedEventArgs)
|
||||
If DataLoaded = False Then Exit Sub
|
||||
Dim oCurrentView As GridView = DirectCast(sender, GridView)
|
||||
Dim oCurrentControl As GridControl = oCurrentView.GridControl
|
||||
@@ -700,116 +682,116 @@ Public Class frmSearchStart
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GridViewSearchTerms_KeyUp(sender As Object, e As KeyEventArgs) Handles GridViewSearchTerms.KeyUp
|
||||
If e.KeyValue = Keys.Delete Then
|
||||
Dim oSelectedRows As Integer() = GridViewSearchTerms.GetSelectedRows()
|
||||
Dim oAttrID = GridViewSearchTerms.GetRowCellValue(oSelectedRows.Last(), GridViewSearchTerms.Columns("AttrID"))
|
||||
Dim oSearchTerm = GridViewSearchTerms.GetRowCellValue(oSelectedRows.Last(), GridViewSearchTerms.Columns("SearchTerm"))
|
||||
For Each dr As DataRow In DTSearchTerms.Rows
|
||||
If dr.Item("AttrID") = oAttrID And dr.Item("SearchTerm") = oSearchTerm Then
|
||||
dr.Delete()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
RenewBinding_DTSearchTerms()
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub GridViewSearchTerms_KeyUp(sender As Object, e As KeyEventArgs)
|
||||
' If e.KeyValue = Keys.Delete Then
|
||||
' Dim oSelectedRows As Integer() = GridViewSearchTerms.GetSelectedRows()
|
||||
' Dim oAttrID = GridViewSearchTerms.GetRowCellValue(oSelectedRows.Last(), GridViewSearchTerms.Columns("AttrID"))
|
||||
' Dim oSearchTerm = GridViewSearchTerms.GetRowCellValue(oSelectedRows.Last(), GridViewSearchTerms.Columns("SearchTerm"))
|
||||
' For Each dr As DataRow In DTSearchTerms.Rows
|
||||
' If dr.Item("AttrID") = oAttrID And dr.Item("SearchTerm") = oSearchTerm Then
|
||||
' dr.Delete()
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' RenewBinding_DTSearchTerms()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub ContextMenuStripSearchTerms_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripSearchTerms.Opening
|
||||
Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
'"BracketLeft"
|
||||
'"AttrID", GetType(Integer))
|
||||
'"AttrTitle"
|
||||
'"Criteria"
|
||||
'"SearchTerm"
|
||||
'"BracketRight"
|
||||
'"Operator"
|
||||
If IsNothing(rowView) = False Then
|
||||
Dim oOperator As String = rowView.Item("Operator")
|
||||
If oOperator = "and" Then
|
||||
If My.Application.User.Language = "de-De" Then
|
||||
tsmOperator.Text = "Operator = oder"
|
||||
Else
|
||||
tsmOperator.Text = "Operator = or"
|
||||
End If
|
||||
Else
|
||||
If My.Application.User.Language = "de-De" Then
|
||||
tsmOperator.Text = "Operator = und"
|
||||
Else
|
||||
tsmOperator.Text = "Operator = and"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub ContextMenuStripSearchTerms_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStripSearchTerms.Opening
|
||||
' Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
' '"BracketLeft"
|
||||
' '"AttrID", GetType(Integer))
|
||||
' '"AttrTitle"
|
||||
' '"Criteria"
|
||||
' '"SearchTerm"
|
||||
' '"BracketRight"
|
||||
' '"Operator"
|
||||
' If IsNothing(rowView) = False Then
|
||||
' Dim oOperator As String = rowView.Item("Operator")
|
||||
' If oOperator = "and" Then
|
||||
' If My.Application.User.Language = "de-De" Then
|
||||
' tsmOperator.Text = "Operator = oder"
|
||||
' Else
|
||||
' tsmOperator.Text = "Operator = or"
|
||||
' End If
|
||||
' Else
|
||||
' If My.Application.User.Language = "de-De" Then
|
||||
' tsmOperator.Text = "Operator = und"
|
||||
' Else
|
||||
' tsmOperator.Text = "Operator = and"
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub tsmOperator_Click(sender As Object, e As EventArgs) Handles tsmOperator.Click
|
||||
Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
If IsNothing(rowView) = False Then
|
||||
Dim oAttrID As String = rowView.Item("AttrID")
|
||||
Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
Dim oREPLACEOperator As String
|
||||
If tsmOperator.Text.EndsWith("und") Or tsmOperator.Text.EndsWith("and") Then
|
||||
oREPLACEOperator = "and"
|
||||
Else
|
||||
oREPLACEOperator = "or"
|
||||
End If
|
||||
For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
oRow.Item("Operator") = oREPLACEOperator
|
||||
DTSearchTerms.AcceptChanges()
|
||||
Exit For
|
||||
End If
|
||||
'Private Sub tsmOperator_Click(sender As Object, e As EventArgs) Handles tsmOperator.Click
|
||||
' Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
' If IsNothing(rowView) = False Then
|
||||
' Dim oAttrID As String = rowView.Item("AttrID")
|
||||
' Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
' Dim oREPLACEOperator As String
|
||||
' If tsmOperator.Text.EndsWith("und") Or tsmOperator.Text.EndsWith("and") Then
|
||||
' oREPLACEOperator = "and"
|
||||
' Else
|
||||
' oREPLACEOperator = "or"
|
||||
' End If
|
||||
' For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
' If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
' oRow.Item("Operator") = oREPLACEOperator
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BracketLeftToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BracketLeftToolStripMenuItem.Click
|
||||
Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
If IsNothing(rowView) = False Then
|
||||
Dim oAttrID As String = rowView.Item("AttrID")
|
||||
Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
oRow.Item("BracketLeft") = "("
|
||||
DTSearchTerms.AcceptChanges()
|
||||
Exit For
|
||||
End If
|
||||
' Next
|
||||
' End If
|
||||
'End Sub
|
||||
'Private Sub BracketLeftToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BracketLeftToolStripMenuItem.Click
|
||||
' Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
' If IsNothing(rowView) = False Then
|
||||
' Dim oAttrID As String = rowView.Item("AttrID")
|
||||
' Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
' For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
' If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
' oRow.Item("BracketLeft") = "("
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
' Next
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub KlammerRechtsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KlammerRechtsToolStripMenuItem.Click
|
||||
Dim rowView As DataRowView = CType(GridViewSearchTerms.GetFocusedRow(), DataRowView)
|
||||
If IsNothing(rowView) = False Then
|
||||
Dim oAttrID As String = rowView.Item("AttrID")
|
||||
Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
oRow.Item("BracketRight") = ")"
|
||||
DTSearchTerms.AcceptChanges()
|
||||
Exit For
|
||||
End If
|
||||
'Private Sub KlammerRechtsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KlammerRechtsToolStripMenuItem.Click
|
||||
' Dim rowView As DataRowView = CType(GridViewSearchTerms.GetFocusedRow(), DataRowView)
|
||||
' If IsNothing(rowView) = False Then
|
||||
' Dim oAttrID As String = rowView.Item("AttrID")
|
||||
' Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
' For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
' If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
' oRow.Item("BracketRight") = ")"
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub KlammerEntfernenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KlammerEntfernenToolStripMenuItem.Click
|
||||
Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
If IsNothing(rowView) = False Then
|
||||
Dim oAttrID As String = rowView.Item("AttrID")
|
||||
Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
oRow.Item("BracketRight") = ""
|
||||
oRow.Item("BracketLeft") = ""
|
||||
DTSearchTerms.AcceptChanges()
|
||||
Exit For
|
||||
End If
|
||||
' Next
|
||||
' End If
|
||||
'End Sub
|
||||
'Private Sub KlammerEntfernenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KlammerEntfernenToolStripMenuItem.Click
|
||||
' Dim rowView As DataRowView = GridViewSearchTerms.GetFocusedRow()
|
||||
' If IsNothing(rowView) = False Then
|
||||
' Dim oAttrID As String = rowView.Item("AttrID")
|
||||
' Dim oSearchTerm As String = rowView.Item("SearchTerm")
|
||||
' For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
' If oRow.Item("AttrID") = oAttrID And oRow.Item("SearchTerm") = oSearchTerm Then
|
||||
' oRow.Item("BracketRight") = ""
|
||||
' oRow.Item("BracketLeft") = ""
|
||||
' DTSearchTerms.AcceptChanges()
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
' Next
|
||||
' End If
|
||||
'End Sub
|
||||
Private Sub frmSearchStart_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
|
||||
My.UIConfig.SearchForm.Location = Me.Location
|
||||
My.UIConfigManager.Save()
|
||||
@@ -860,28 +842,31 @@ Public Class frmSearchStart
|
||||
Dim oSEARCH_SQL = SEARCH_SQL
|
||||
Dim oOperator As String
|
||||
Dim oCount As Integer = 1
|
||||
For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
'"BracketLeft"
|
||||
'"AttrID", GetType(Integer))
|
||||
'"AttrTitle"
|
||||
'"Criteria"
|
||||
'"SearchTerm"
|
||||
'"BracketRight"
|
||||
'"Operator"
|
||||
oOperator = oRow.Item("Operator").ToString
|
||||
Dim oSearchTerm = GetSearchTermForType(oRow.Item("AttrID"), oRow.Item("AttrTitle").ToString, oRow.Item("Criteria").ToString, oRow.Item("SearchTerm").ToString)
|
||||
'For Each oRow As DataRow In DTSearchTerms.Rows
|
||||
' '"BracketLeft"
|
||||
' '"AttrID", GetType(Integer))
|
||||
' '"AttrTitle"
|
||||
' '"Criteria"
|
||||
' '"SearchTerm"
|
||||
' '"BracketRight"
|
||||
' '"Operator"
|
||||
' oOperator = oRow.Item("Operator").ToString
|
||||
' Dim oSearchTerm = GetSearchTermForType(oRow.Item("AttrID"), oRow.Item("AttrTitle").ToString, oRow.Item("Criteria").ToString, oRow.Item("SearchTerm").ToString)
|
||||
|
||||
Dim oBracketLeft As String = oRow.Item("BracketLeft").ToString
|
||||
Dim oBracketRight As String = oRow.Item("BracketLeft").ToString
|
||||
Dim oSpaceChar = IIf(oCount = 0, " ", "")
|
||||
|
||||
oSEARCH_SQL &= $"{oSpaceChar}{oBracketLeft}{oSearchTerm}{oBracketRight}"
|
||||
If DTSearchTerms.Rows.Count > oCount Then
|
||||
oSEARCH_SQL &= $" {oOperator} {Chr(13)}"
|
||||
End If
|
||||
oCount += 1
|
||||
Next
|
||||
' Dim oBracketLeft As String = oRow.Item("BracketLeft").ToString
|
||||
' Dim oBracketRight As String = oRow.Item("BracketLeft").ToString
|
||||
' Dim oSpaceChar = IIf(oCount = 0, " ", "")
|
||||
|
||||
' oSEARCH_SQL &= $"{oSpaceChar}{oBracketLeft}{oSearchTerm}{oBracketRight}"
|
||||
' If DTSearchTerms.Rows.Count > oCount Then
|
||||
' oSEARCH_SQL &= $" {oOperator} {Chr(13)}"
|
||||
' End If
|
||||
' oCount += 1
|
||||
'Next
|
||||
oSEARCH_SQL = oSEARCH_SQL.Replace("@UserID", My.Application.User.UserId)
|
||||
oSEARCH_SQL = oSEARCH_SQL.Replace("@User_ID", My.Application.User.UserId)
|
||||
oSEARCH_SQL = oSEARCH_SQL.Replace("@UserName", My.Application.User.UserName)
|
||||
oSEARCH_SQL = oSEARCH_SQL.Replace("@SearchID", PSEARCH_ID)
|
||||
Dim oEnvironment As New Modules.ZooFlow.Environment() With {
|
||||
.User = My.Application.User,
|
||||
.Modules = My.Application.Modules,
|
||||
|
||||
Reference in New Issue
Block a user