ZooFlow: clean up

This commit is contained in:
Jonathan Jenne 2021-01-12 16:05:35 +01:00
parent b49d4b4ff7
commit 4b2ef12a55
8 changed files with 93 additions and 178 deletions

View File

@ -1,15 +1,12 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class clsIDBData Public Class ClassIDBData
Public DTVWIDB_BE_ATTRIBUTE As DataTable Public Property DTVWIDB_BE_ATTRIBUTE As DataTable
''' <summary> ''' <summary>
''' Gets all indices by BusinessEntity. ''' Gets all indices by BusinessEntity.
''' </summary> ''' </summary>
''' <param name="BusinessEntity">Title of Business Entity</param> ''' <param name="BusinessEntity">Title of Business Entity</param>
''' <returns>Array with all Indices</returns> ''' <returns>Array with all Indices</returns>
''' <remarks></remarks>
'''
Private _Logger As Logger Private _Logger As Logger
Public Sub New(LogConfig As LogConfig) Public Sub New(LogConfig As LogConfig)
_Logger = LogConfig.GetLogger _Logger = LogConfig.GetLogger
@ -17,85 +14,69 @@ Public Class clsIDBData
DTVWIDB_BE_ATTRIBUTE = My.DatabaseIDB.GetDatatable(oSQL) DTVWIDB_BE_ATTRIBUTE = My.DatabaseIDB.GetDatatable(oSQL)
End Sub End Sub
Public IDBSystemIndices As List(Of String) Public IDBSystemIndices As List(Of String)
Public Function GetIndicesByBE(ByVal BusinessEntity As String) As String() Public Function GetIndicesByBE(ByVal pBusinessEntity As String) As List(Of String)
Try Try
Dim aNames(4) As String IDBSystemIndices = New List(Of String) From {
aNames(0) = "ObjectID" "ObjectID", "IDBCreatedWhen", "IDBCreatedWho", "IDBChangedWhen", "IDBChangedWho"
aNames(1) = "IDBCreatedWhen" }
aNames(2) = "IDBCreatedWho"
aNames(3) = "IDBChangedWhen"
aNames(4) = "IDBChangedWho"
IDBSystemIndices = aNames.ToList
' Array für Indizes vorbereiten
Dim aIndexNames(DTVWIDB_BE_ATTRIBUTE.Rows.Count + 4) As String
Dim oCount As Integer = 0
aIndexNames(oCount) = "ObjectID"
oCount += 1
aIndexNames(oCount) = "IDBCreatedWhen"
oCount += 1
aIndexNames(oCount) = "IDBCreatedWho"
oCount += 1
aIndexNames(oCount) = "IDBChangedWhen"
oCount += 1
aIndexNames(oCount) = "IDBChangedWho"
For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows
oCount += 1
aIndexNames(oCount) = oRow.Item("ATTR_TITLE")
Dim oIndexNames As New List(Of String)
oIndexNames.AddRange(IDBSystemIndices.ToArray)
For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows
oIndexNames.Add(oRow.Item("ATTR_TITLE").ToString)
Next Next
oIndexNames.Sort()
' Indexarray sortiert zurückgeben Return oIndexNames
Array.Sort(aIndexNames)
' Indexarray zurückgeben
Return aIndexNames
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error getting the IDB Indicies") MsgBox(ex.Message, MsgBoxStyle.Critical, "Error getting the IDB Indicies")
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function GetTypeOfIndex(ByVal indexname As String) As Integer Public Function GetTypeOfIndex(ByVal pIndexname As String) As Integer
Try Try
For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows For Each oRow As DataRow In DTVWIDB_BE_ATTRIBUTE.Rows
If oRow.Item("ATTR_TITLE") = indexname Then If oRow.Item("ATTR_TITLE").ToString = pIndexname Then
Dim oType = oRow.Item("TYP_ID") Return Integer.Parse(oRow.Item("TYP_ID").ToString)
Return oType
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function GetVariableValue(oAttributeName As String, Optional oIDBTyp As Integer = 0, Optional FromIDB As Boolean = False) As Object
Public Function GetVariableValue(pAttributeName As String, Optional pIDBType As Integer = 0, Optional pFromIDB As Boolean = False) As Object
Try Try
Dim oSingleAttribute As Boolean = True Dim oSingleAttribute As Boolean
Select Case oIDBTyp Select Case pIDBType
Case 8 Case 8
oSingleAttribute = False oSingleAttribute = False
Case 9 Case 9
oSingleAttribute = False oSingleAttribute = False
Case Else
oSingleAttribute = True
End Select End Select
Dim oAttributeValue
Dim oAttributeValue As Object = Nothing
If Not IsNothing(My.Application.IDB_DT_DOC_DATA) Then If Not IsNothing(My.Application.IDB_DT_DOC_DATA) Then
If oSingleAttribute = True And My.Application.IDB_DT_DOC_DATA.Rows.Count = 1 And FromIDB = False Then If oSingleAttribute = True And My.Application.IDB_DT_DOC_DATA.Rows.Count = 1 And pFromIDB = False Then
Try Try
If oAttributeName = "IDBCreatedWhen" Then If pAttributeName = "IDBCreatedWhen" Then
oAttributeName = "ADDED_WHEN" pAttributeName = "ADDED_WHEN"
ElseIf oAttributeName = "IDBCreatedWho" Then ElseIf pAttributeName = "IDBCreatedWho" Then
oAttributeName = "ADDED_WHO" pAttributeName = "ADDED_WHO"
ElseIf oAttributeName = "IDBChangedWhen" Then ElseIf pAttributeName = "IDBChangedWhen" Then
oAttributeName = "CHANGED_WHEN" pAttributeName = "CHANGED_WHEN"
ElseIf oAttributeName = "IDBChangedWho" Then ElseIf pAttributeName = "IDBChangedWho" Then
oAttributeName = "CHANGED_WHO" pAttributeName = "CHANGED_WHO"
End If End If
oAttributeValue = My.Application.IDB_DT_DOC_DATA.Rows(0).Item(oAttributeName) oAttributeValue = My.Application.IDB_DT_DOC_DATA.Rows(0).Item(pAttributeName)
Catch ex As Exception Catch ex As Exception
_Logger.Debug($"Error getting Attribute from IDB_DT_DOC_DATA: {ex.Message}") _Logger.Debug($"Error getting Attribute from IDB_DT_DOC_DATA: {ex.Message}")
End Try End Try
@ -106,57 +87,51 @@ Public Class clsIDBData
If Not IsNothing(oAttributeValue) Then If Not IsNothing(oAttributeValue) Then
Return oAttributeValue Return oAttributeValue
Else Else
_Logger.Debug($"oAttributeValue for Attribute [{oAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ") _Logger.Debug($"oAttributeValue for Attribute [{pAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ")
End If End If
Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({My.Application.Globix.CURRENT_DOC_ID},'{oAttributeName}','{My.Application.User.Language}',CONVERT(BIT,'0'))" Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({My.Application.Globix.CURRENT_DOC_ID},'{pAttributeName}','{My.Application.User.Language}',CONVERT(BIT,'0'))"
oAttributeValue = My.DatabaseIDB.GetDatatable(oFNSQL) Dim oDatatable As DataTable = My.DatabaseIDB.GetDatatable(oFNSQL)
Dim odt As DataTable = oAttributeValue If oDatatable.Rows.Count = 1 Then
If odt.Rows.Count = 1 Then oAttributeValue = oDatatable.Rows(0).Item(0)
oAttributeValue = odt.Rows(0).Item(0)
End If End If
Return oAttributeValue Return oAttributeValue
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function Delete_Term_Object_From_Metadata(oAttributeName As String, oTerm2Delete As String) As Object Public Function Delete_Term_Object_From_Metadata(pAttributeName As String, pTerm2Delete As String) As Object
Try Try
Dim oAttributeValue Dim oIdIsForeign As Integer = 1
Dim oID_IS_FOREIGN As Integer Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {My.Application.Globix.CURRENT_DOC_ID},'{pAttributeName}','{pTerm2Delete}','{My.Application.User.UserName}','{My.Application.User.Language}',{oIdIsForeign}"
oID_IS_FOREIGN = 1
Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {My.Application.Globix.CURRENT_DOC_ID},'{oAttributeName}','{oTerm2Delete}','{My.Application.User.UserName}','{My.Application.User.Language}',{oID_IS_FOREIGN}"
My.DatabaseIDB.ExecuteNonQuery(oDELSQL) My.DatabaseIDB.ExecuteNonQuery(oDELSQL)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function Delete_AttributeData(pIDB_OBJID As Int64, pAttributeName As String) As Object Public Function Delete_AttributeData(pObjectId As Int64, pAttributeName As String) As Object
Try Try
Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pIDB_OBJID},'{pAttributeName}','{My.Application.User.UserName}'" Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pObjectId},'{pAttributeName}','{My.Application.User.UserName}'"
My.DatabaseIDB.ExecuteNonQuery(oDELSQL) My.DatabaseIDB.ExecuteNonQuery(oDELSQL)
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0) Public Function SetVariableValue(pAttributeName As String, pNewValue As Object, Optional pCheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0) As Boolean
Try Try
Dim omytype = oNewValue.GetType.ToString Dim oType = pNewValue.GetType.ToString
If omytype = "System.Data.DataTable" Then If oType = "System.Data.DataTable" Then
Dim oDTMyNewValues As DataTable = oNewValue Dim oDTMyNewValues As DataTable = pNewValue
Dim oOldAttributeResult Dim oOldAttributeResult As Object
Dim oTypeOldResult Dim oTypeOldResult As Object
If CheckDeleted = True Then If pCheckDeleted = True Then
oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp) oOldAttributeResult = GetVariableValue(pAttributeName, oIDBTyp)
oTypeOldResult = oOldAttributeResult.GetType.ToString oTypeOldResult = oOldAttributeResult.GetType.ToString
If oTypeOldResult = "System.Data.DataTable" Then If oTypeOldResult = "System.Data.DataTable" Then
Dim myOldValues As DataTable = oOldAttributeResult Dim myOldValues As DataTable = oOldAttributeResult
@ -174,10 +149,10 @@ Public Class clsIDBData
Next Next
If oExists = False Then If oExists = False Then
Dim oInfo = $"Value [{oOldValueRow.Item(0)}] no longer existing in Vector-Attribute [{oAttributeName}] - will be deleted!" Dim oInfo = $"Value [{oOldValueRow.Item(0)}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!"
_Logger.Info(oInfo) _Logger.Info(oInfo)
SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo) SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo)
Delete_Term_Object_From_Metadata(oAttributeName, oOldValueRow.Item(0)) Delete_Term_Object_From_Metadata(pAttributeName, oOldValueRow.Item(0))
End If End If
Next Next
@ -193,16 +168,16 @@ Public Class clsIDBData
End If End If
Next Next
If oExists = False Then If oExists = False Then
Dim oInfo2 = $"Value [{oOldAttributeResult}] no longer existing in Vector-Attribute [{oAttributeName}] - will be deleted!" Dim oInfo2 = $"Value [{oOldAttributeResult}] no longer existing in Vector-Attribute [{pAttributeName}] - will be deleted!"
_Logger.Info(oInfo2) _Logger.Info(oInfo2)
SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo2) SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo2)
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult) Delete_Term_Object_From_Metadata(pAttributeName, oOldAttributeResult)
End If End If
Else Else
Dim oInfo = $"Value [{oOldAttributeResult}] of Attribute [{oAttributeName}] obviously was updated during runtime - will be deleted!" Dim oInfo = $"Value [{oOldAttributeResult}] of Attribute [{pAttributeName}] obviously was updated during runtime - will be deleted!"
_Logger.Info(oInfo) _Logger.Info(oInfo)
SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo) SetVariableValue(My.Application.Globix.CURRENT_PROFILE_LOG_INDEX, oInfo)
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult) Delete_Term_Object_From_Metadata(pAttributeName, oOldAttributeResult)
End If End If
End If End If
@ -211,7 +186,7 @@ Public Class clsIDBData
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
Dim oSuccess As Boolean = False Dim oSuccess As Boolean = False
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {My.Application.Globix.CURRENT_DOC_ID},'{oAttributeName}','{My.Application.User.UserName}','{oNewValueRow.Item(1).ToString}','{My.Application.User.Language}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT" Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {My.Application.Globix.CURRENT_DOC_ID},'{pAttributeName}','{My.Application.User.UserName}','{oNewValueRow.Item(1).ToString}','{My.Application.User.Language}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
oSuccess = My.DatabaseIDB.ExecuteNonQuery(oFNSQL) oSuccess = My.DatabaseIDB.ExecuteNonQuery(oFNSQL)
If oSuccess = False Then If oSuccess = False Then
Return False Return False
@ -219,7 +194,7 @@ Public Class clsIDBData
Next Next
Return True Return True
Else Else
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {My.Application.Globix.CURRENT_DOC_ID},'{oAttributeName}','{My.Application.User.UserName}','{oNewValue}','{My.Application.User.Language}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT" Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {My.Application.Globix.CURRENT_DOC_ID},'{pAttributeName}','{My.Application.User.UserName}','{pNewValue}','{My.Application.User.Language}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
Return My.DatabaseIDB.ExecuteNonQuery(oFNSQL) Return My.DatabaseIDB.ExecuteNonQuery(oFNSQL)
End If End If

View File

@ -94,7 +94,7 @@ Public Class ClassFileDrop
End If End If
End If End If
If e.Data.GetDataPresent("FileGroupDescriptor") Then If e.Data.GetDataPresent("FileGroupDescriptor") Then
Dim oApp Dim oApp As Outlook.Application
Try Try
oApp = New Outlook.Application() oApp = New Outlook.Application()
Catch ex As Exception Catch ex As Exception

View File

@ -5,10 +5,10 @@ Imports DigitalData.Modules.Logging
Public Class GlobixPatterns Public Class GlobixPatterns
Private _Logger As Logger Private _Logger As Logger
Private _idbdata As clsIDBData Private _idbdata As ClassIDBData
Public Sub New(LogConfig As LogConfig) Public Sub New(LogConfig As LogConfig)
_Logger = LogConfig.GetLogger _Logger = LogConfig.GetLogger
_idbdata = New clsIDBData(LogConfig) _idbdata = New ClassIDBData(LogConfig)
End Sub End Sub
' Complex patterns that rely on a datasource like a Database or Windream ' Complex patterns that rely on a datasource like a Database or Windream
Public Const PATTERN_WMI = "WMI" Public Const PATTERN_WMI = "WMI"
@ -261,12 +261,12 @@ Public Class GlobixPatterns
End Function End Function
Public Function ReplaceIDBAttributes(IDB_OBJ_ID As Long, pInput As String, IS_SQL As Boolean) As String Public Function ReplaceIDBAttributes(IDB_OBJ_ID As Long, pInput As String, IS_SQL As Boolean) As String
Try Try
Dim result = pInput Dim oResult = pInput
Dim oTryCounter As Integer = 0 Dim oTryCounter As Integer = 0
While ContainsPattern(result, PATTERN_IDBA) While ContainsPattern(oResult, PATTERN_IDBA)
Dim indexName As String = GetNextPattern(result, PATTERN_IDBA).Value Dim indexName As String = GetNextPattern(oResult, PATTERN_IDBA).Value
Dim oIDBValue Dim oIDBValue As Object
If indexName = "ObjectID" Then If indexName = "ObjectID" Then
oIDBValue = IDB_OBJ_ID oIDBValue = IDB_OBJ_ID
ElseIf indexName = "OBJID" Then ElseIf indexName = "OBJID" Then
@ -280,7 +280,7 @@ Public Class GlobixPatterns
If IsNothing(oIDBValue) And oTryCounter = MAX_TRY_COUNT Then If IsNothing(oIDBValue) And oTryCounter = MAX_TRY_COUNT Then
_Logger.Warn($"Max tries for [{indexName}] in ReplaceIDBAttributes exceeded - Replacing with [0]!") _Logger.Warn($"Max tries for [{indexName}] in ReplaceIDBAttributes exceeded - Replacing with [0]!")
Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}" Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}"
result = result.Replace(oReplaceValue, 0) oResult = oResult.Replace(oReplaceValue, 0)
Throw New Exception("Max tries in ReplaceIDBAttributes exceeded.") Throw New Exception("Max tries in ReplaceIDBAttributes exceeded.")
End If End If
@ -299,87 +299,24 @@ Public Class GlobixPatterns
End If End If
_Logger.Debug($"oIDBValue = {oIDBValue}") _Logger.Debug($"oIDBValue = {oIDBValue}")
End If End If
result = result.Replace(oReplaceValue, oIDBValue) oResult = oResult.Replace(oReplaceValue, oIDBValue)
Else Else
_Logger.Warn($"IDBValue for [{indexName}] in ReplaceIDBAttributes is nothing or dbnull - Replacing with [0]!") _Logger.Warn($"IDBValue for [{indexName}] in ReplaceIDBAttributes is nothing or dbnull - Replacing with [0]!")
Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}" Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}"
result = result.Replace(oReplaceValue, 0) oResult = oResult.Replace(oReplaceValue, 0)
End If End If
oTryCounter += 100 oTryCounter += 100
End While End While
_Logger.Debug("sql after ReplaceIDBAttributes: " & pInput) _Logger.Debug("sql after ReplaceIDBAttributes: " & pInput)
Return result Return oResult
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Info("Error in ReplaceIDBAttributes:" & ex.Message) _Logger.Info("Error in ReplaceIDBAttributes:" & ex.Message)
Return pInput
End Try End Try
End Function End Function
'Public Function ReplaceWindreamIndicies(input As String, document As WMObject) As String Private Function ContainsPattern(input As String, type As String) As Boolean
' Try
' Dim result = input
' Dim oTryCounter As Integer = 0
' While ContainsPattern(result, PATTERN_WMI)
' Dim indexName As String = GetNextPattern(result, PATTERN_WMI).Value
' Dim oWMValue = document.GetVariableValue(indexName)
' If IsNothing(oWMValue) And oTryCounter = MAX_TRY_COUNT Then
' _Logger.Warn("Exit from ReplaceWindreamIndicies as oWMValue is still nothing and oTryCounter is 500!")
' Throw New Exception("Max tries in ReplaceWindreamIndicies exceeded.")
' End If
' If oWMValue IsNot Nothing Then
' result = ReplacePattern(result, PATTERN_WMI, oWMValue)
' End If
' oTryCounter += 100
' End While
' _Logger.Debug("sql after ReplaceWindreamIndicies: " & input)
' Return result
' Catch ex As Exception
' _Logger.Error(ex)
' _Logger.Info("Error in ReplaceWindreamIndicies:" & ex.Message)
' End Try
'End Function
'Public Function ReplaceIDBAttributes(input As String) As String
' Try
' Dim result = input
' Dim oTryCounter As Integer = 0
' While ContainsPattern(result, PATTERN_IDBA)
' Dim indexName As String = GetNextPattern(result, PATTERN_IDBA).Value
' Dim oIDBValue
' If indexName = "ObjectID" Then
' oIDBValue = CURRENT_DOC_ID
' ElseIf indexName = "OBJID" Then
' oIDBValue = CURRENT_DOC_ID
' ElseIf indexName = "DocID" Then
' oIDBValue = CURRENT_DOC_ID
' Else
' oIDBValue = IDBData.GetVariableValue(indexName)
' End If
' If IsNothing(oIDBValue) And oTryCounter = MAX_TRY_COUNT Then
' _Logger.Warn("Exit from ReplaceIDBIndicies as Value is still nothing and oTryCounter is 500!")
' Throw New Exception("Max tries in ReplaceIDBAttributes exceeded.")
' End If
' If oIDBValue IsNot Nothing Then
' Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}"
' result = result.Replace(oReplaceValue, oIDBValue)
' 'result = ReplacePattern(result, oReplaceValue, oIDBValue)
' End If
' oTryCounter += 100
' End While
' _Logger.Debug("sql after ReplaceIDBAttributes: " & input)
' Return result
' Catch ex As Exception
' _Logger.Error(ex)
' _Logger.Info("Error in ReplaceIDBAttributes:" & ex.Message)
' End Try
'End Function
Private Function ContainsPattern(input As String, type As String) As String
Dim elements As MatchCollection = myregex.Matches(input) Dim elements As MatchCollection = myregex.Matches(input)
For Each element As Match In elements For Each element As Match In elements
@ -459,9 +396,9 @@ Public Class GlobixPatterns
Return False Return False
End Function End Function
Public Function HasAnyPatterns(input) As Boolean Public Function HasAnyPatterns(pInput As String) As Boolean
Return allPatterns.Any(Function(p) Return allPatterns.Any(Function(p)
Return HasPattern(input, p) Return HasPattern(pInput, p)
End Function) End Function)
End Function End Function

View File

@ -1,10 +1,11 @@
Imports System.IO Option Explicit On
Imports System.IO
Imports System.Security.AccessControl Imports System.Security.AccessControl
Imports System.Security.Principal Imports System.Security.Principal
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Public Class frmGlobix_Index Public Class frmGlobix_Index
#Region "+++++ Variablen ++++++" #Region "+++++ Variablen ++++++"
Public vPathFile As String Public vPathFile As String
@ -1550,17 +1551,17 @@ Public Class frmGlobix_Index
Function Indexwert_checkValueDB(indexname As String, wert As String) Function Indexwert_checkValueDB(indexname As String, wert As String)
Try Try
Dim DR As DataRow Dim oRow As DataRow
'DT = DD_DMSLiteDataSet.VWINDEX_MAN 'DT = DD_DMSLiteDataSet.VWINDEX_MAN
For Each DR In DT_INDEXEMAN.Rows For Each oRow In DT_INDEXEMAN.Rows
If DR.Item("NAME") = indexname Then If oRow.Item("NAME") = indexname Then
If DR.Item("SQL_CHECK").ToString <> String.Empty Then If oRow.Item("SQL_CHECK").ToString <> String.Empty Then
Dim connectionString As String Dim connectionString As String
Dim sql As String Dim sql As String
connectionString = My.Database.Get_ConnectionStringforID(DR.Item("CONNECTION_ID")) connectionString = My.Database.Get_ConnectionStringforID(oRow.Item("CONNECTION_ID"))
If connectionString <> "" Then If connectionString <> "" Then
Dim sqlscalar = DR.Item("SQL_CHECK") Dim sqlscalar = oRow.Item("SQL_CHECK")
Select Case DR.Item("DATENTYP") Select Case oRow.Item("DATENTYP")
Case "INTEGER" Case "INTEGER"
sqlscalar = sqlscalar.ToString.Replace("@manValue", wert) sqlscalar = sqlscalar.ToString.Replace("@manValue", wert)
Case Else Case Else

View File

@ -46,7 +46,7 @@ Partial Class frmGlobix_IndexFileList
Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.Size = New System.Drawing.Size(617, 159) Me.RibbonControl1.Size = New System.Drawing.Size(617, 157)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
' '
'BarButtonItem1 'BarButtonItem1
@ -116,9 +116,9 @@ Partial Class frmGlobix_IndexFileList
' '
Me.CheckedListBox1.Dock = System.Windows.Forms.DockStyle.Fill Me.CheckedListBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.CheckedListBox1.FormattingEnabled = True Me.CheckedListBox1.FormattingEnabled = True
Me.CheckedListBox1.Location = New System.Drawing.Point(0, 159) Me.CheckedListBox1.Location = New System.Drawing.Point(0, 157)
Me.CheckedListBox1.Name = "CheckedListBox1" Me.CheckedListBox1.Name = "CheckedListBox1"
Me.CheckedListBox1.Size = New System.Drawing.Size(617, 216) Me.CheckedListBox1.Size = New System.Drawing.Size(617, 218)
Me.CheckedListBox1.TabIndex = 2 Me.CheckedListBox1.TabIndex = 2
' '
'frmGlobix_IndexFileList 'frmGlobix_IndexFileList

View File

@ -152,7 +152,7 @@ Public Class frmFlowSearch
Private Function GetResultFormSize() As Size Private Function GetResultFormSize() As Size
Return Size Return Size
End Function End Function
Private Function GetResultString(CountObjects, CountAttribute, SearchContent) As String Private Function GetResultString(CountObjects As Integer, CountAttribute As Integer, SearchContent As String) As String
Dim oResultString = $"wurden {CountObjects} Objekte" ' IIf(CountAttribute = 1, $"wurden {CountObjects} Objekte", $"wurden {CountObjects} Objekte in {CountAttribute} Attributen") Dim oResultString = $"wurden {CountObjects} Objekte" ' IIf(CountAttribute = 1, $"wurden {CountObjects} Objekte", $"wurden {CountObjects} Objekte in {CountAttribute} Attributen")
Dim oProfileString = IIf(CountAttribute = 1, "einem Attribut", $"{CountAttribute} Attributen") Dim oProfileString = IIf(CountAttribute = 1, "einem Attribut", $"{CountAttribute} Attributen")
Dim oBase = "Es {0} in {1} für Ihre Suche nach '{2}' gefunden:" Dim oBase = "Es {0} in {1} für Ihre Suche nach '{2}' gefunden:"

View File

@ -127,7 +127,7 @@
<Compile Include="ClassLayout.vb" /> <Compile Include="ClassLayout.vb" />
<Compile Include="ClassWin32.vb" /> <Compile Include="ClassWin32.vb" />
<Compile Include="ClipboardWatcher\State.vb" /> <Compile Include="ClipboardWatcher\State.vb" />
<Compile Include="clsIDBData.vb" /> <Compile Include="ClassIDBData.vb" />
<Compile Include="DSIDB_Stammdaten.Designer.vb"> <Compile Include="DSIDB_Stammdaten.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>

View File

@ -1,4 +1,6 @@
Imports System.IO Option Explicit On
Imports System.IO
Imports DevExpress.XtraSplashScreen Imports DevExpress.XtraSplashScreen
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging Imports DigitalData.Modules.Messaging