Globi Integration und Suche Abhängig

This commit is contained in:
2020-11-25 17:44:40 +01:00
parent 0dd9788d8f
commit 1638fdc173
24 changed files with 1545 additions and 3796 deletions

View File

@@ -56,5 +56,26 @@ Module ModuleHelpers
Public Sub Refresh_RegexTable()
My.Application.BASE_DATA_DT_REGEX = My.Database.GetDatatable("SELECT * FROM TBGI_FUNCTION_REGEX")
End Sub
Public Function FilterDatatable(myDatatable As DataTable, myFilter As String, mycheckColumn As String, pSortString As String, returnDT As Boolean) As Object
Try
Dim dv As DataView = myDatatable.DefaultView
dv.RowFilter = myFilter
If dv.Count = 1 And returnDT = False Then
For Each rowView As DataRowView In dv
Dim row As DataRow = rowView.Row
Return row.Item(mycheckColumn)
Next
Else
Dim dt_copy As DataTable = New DataTable()
dt_copy = myDatatable.Select(myFilter, pSortString).CopyToDataTable()
Return dt_copy
End If
Catch ex As Exception
MsgBox("Unexpected error in FilterDatatable: " + ex.Message, MsgBoxStyle.Critical)
Return Nothing
End Try
End Function
End Module