From 011aad712b025ff34671ff3eea93bc243589f28c Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 18 Jul 2023 10:03:55 +0200 Subject: [PATCH] Add Logger for Validator --- app/TaskFlow/frmValidator.vb | 962 ++++++++++++++++++----------------- 1 file changed, 486 insertions(+), 476 deletions(-) diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 55b6ce3..477a4c5 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -89,7 +89,9 @@ Public Class frmValidator Private Documentloader As Loader Private ControlCreator As ClassControlCreator Private PerformanceLogger As Logger + Private Validator As Validator Private Const LOG_PERF = True + Private ReadOnly Logger As Logger Private Property OperationMode As OperationMode Private ReadOnly Environment As Environment @@ -103,17 +105,18 @@ Public Class frmValidator Public Sub New(pEnvironment As Environment) PerformanceLogger = LOGCONFIG.GetLoggerFor("PERF") If LOG_PERF Then PerformanceLogger.Info("New") + Logger = LOGCONFIG.GetLogger() 'MyBase.New - LOGGER.Debug("Initialize Components...") + Logger.Debug("Initialize Components...") InitializeComponent() Environment = pEnvironment Try - LOGGER.Debug("Initialize _frmValidatorSearch...") + Logger.Debug("Initialize _frmValidatorSearch...") _frmValidatorSearch = New frmValidatorSearch(Me, Environment) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try @@ -140,9 +143,11 @@ Public Class frmValidator Private Sub frmValidation_Load(sender As Object, e As System.EventArgs) Handles Me.Load Try + + If LOG_PERF Then PerformanceLogger.Info("frmValidation_Load") - LOGGER.Debug("###frmValidation_Load###") - LOGGER.Debug("Current User Language: [{0}]", USER_LANGUAGE) + Logger.Debug("###frmValidation_Load###") + Logger.Debug("Current User Language: [{0}]", USER_LANGUAGE) ' Operation mode is either guessed from service settings ' or explictly set from OperationModeOverride in Params @@ -150,6 +155,7 @@ Public Class frmValidator Documentloader = New Loader(LOGCONFIG, OperationMode, Environment.Service.Client, Environment.User) ControlCreator = New ClassControlCreator(LOGCONFIG) + Validator = New Validator(LOGCONFIG) Override = False _ItemWorked = False @@ -162,7 +168,7 @@ Public Class frmValidator Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never Catch ex As Exception - LOGGER.Warn($"Error in frmValidation_load1: {ex.Message}") + Logger.Warn($"Error in frmValidation_load1: {ex.Message}") End Try Try @@ -171,7 +177,7 @@ Public Class frmValidator Location = My.Settings.frmValidatorPosition Else Try - LOGGER.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})") + Logger.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})") Catch ex As Exception End Try @@ -190,14 +196,14 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Info($"Error loading position: {ex.Message}") + Logger.Info($"Error loading position: {ex.Message}") End Try Dim _step = 0 Try DocumentViewerValidator.Init(LOGCONFIG, GDPICTURE_LICENSE) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Try _step = 1 @@ -208,33 +214,33 @@ Public Class frmValidator DTVWCONTROLS_INDEX.Select(oExpression, "Y_LOC, X_LOC").CopyToDataTable(DTVWCONTROL_INDEX, LoadOption.PreserveChanges) _step = 3 - LOGGER.Debug("Profile Data loaded") + Logger.Debug("Profile Data loaded") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") allgFunk.Insert_LogEntry($"ERROR frmValidatorLoad>> {ex.Message}") - LOGGER.Info(">> Error in LOADING profile-data: " & ex.Message, True) + Logger.Info(">> Error in LOADING profile-data: " & ex.Message, True) Me.Close() End Try - LOGGER.Debug("frmValidation_Load finished till Step 3!") + Logger.Debug("frmValidation_Load finished till Step 3!") Try If CURRENT_DT_PROFILE.Rows.Count = 0 Then - LOGGER.Info(">> ProfileData could not be loaded - Profile: : " & CURRENT_ProfilName, True) + Logger.Info(">> ProfileData could not be loaded - Profile: : " & CURRENT_ProfilName, True) MsgBox("ProfileData could not be loaded - Profile: " & CURRENT_ProfilName, MsgBoxStyle.Critical, "Attention:") Me.Close() End If _step = 4 - LOGGER.Debug("Step 4") + Logger.Debug("Step 4") If CURRENT_DT_PROFILE.Rows.Count > 1 Then MsgBox("More than 1 profile (" & CURRENT_DT_PROFILE.Rows.Count & ") returned!!", MsgBoxStyle.Critical, "Attention:") Else _step = 5 - LOGGER.Debug("Step 5") + Logger.Debug("Step 5") If CURRENT_DT_PROFILE.Rows.Count = 1 Then _step = 6 - LOGGER.Debug("Step 6") + Logger.Debug("Step 6") For Each oProfileRow As DataRow In CURRENT_DT_PROFILE.Rows PROFIL_FINISH_SQL = oProfileRow.Item("SQL_BTN_FINISH") PROFIL_VEKTORINDEX = oProfileRow.Item("PM_VEKTOR_INDEX") @@ -286,11 +292,11 @@ Public Class frmValidator 'btnSave.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.ValidationButton") btnSave.Text = oProfileFinalText End If - LOGGER.Debug("Buttontext validation loaded") + Logger.Debug("Buttontext validation loaded") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Error loading final profile text:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") - LOGGER.Info(">> Error loading final profile text: " & ex.Message, True) + Logger.Info(">> Error loading final profile text: " & ex.Message, True) End Try bbtniNext.Visibility = BarItemVisibility.Always If CURRENT_JUMP_DOC_GUID <> 0 Then @@ -302,13 +308,13 @@ Public Class frmValidator End If Next - LOGGER.Debug(" >> profiledata saved:") - LOGGER.Debug(" >> finalProfile: " & finalProfile) - LOGGER.Debug(" >> Move2Folder: " & Move2Folder) - LOGGER.Debug(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) + Logger.Debug(" >> profiledata saved:") + Logger.Debug(" >> finalProfile: " & finalProfile) + Logger.Debug(" >> Move2Folder: " & Move2Folder) + Logger.Debug(" >> Right_Delete: " & USER_RIGHT_FILE_DELETE) PROFIL_sortbynewest = CURRENT_DT_PROFILE.Rows(0).Item("SORT_BY_LATEST") - LOGGER.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString) + Logger.Debug("PROFIL_sortbynewest: " & PROFIL_sortbynewest.ToString) 'Delete Button anzeigen ja/nein If USER_RIGHT_FILE_DELETE = True Then bbtniDelete.Visibility = BarItemVisibility.Always @@ -321,7 +327,7 @@ Public Class frmValidator Else bbtniAnnotation.Visibility = BarItemVisibility.Never End If - LOGGER.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString) + Logger.Debug("Right_Delete: " & USER_RIGHT_FILE_DELETE.ToString) Create_Controls() @@ -332,13 +338,13 @@ Public Class frmValidator oErrMsgMissingInput = S.Bitte_validieren_Sie_die_rot_markierten_Felder_ - LOGGER.Debug("frmValidation_Load finished!") + Logger.Debug("frmValidation_Load finished!") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:") allgFunk.Insert_LogEntry($"ERROR LOADING Profile-Data1 >> {ex.Message}") - LOGGER.Info(">> error in LOADING(2) Profile-Data: " & ex.Message, True) + Logger.Info(">> error in LOADING(2) Profile-Data: " & ex.Message, True) End Try End Sub @@ -353,14 +359,14 @@ Public Class frmValidator My.Settings.frmValidatorPosition = Me.Location My.Settings.Save() Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Error in Load FormLayout: " & ex.Message) + Logger.Error(ex) + Logger.Info("Error in Load FormLayout: " & ex.Message) End Try My.Settings.frmValidatorSize = Me.Size My.Settings.Save() If INACTIVITY_DURATION <> 0 Then frmMain.Timer_Inactivity_Reset_Disable("FormClosing") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Try @@ -368,7 +374,7 @@ Public Class frmValidator DatabaseFallback.ExecuteNonQueryECM(oDel) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Error in delete jumped files:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) End Try @@ -378,7 +384,7 @@ Public Class frmValidator Free_File() 'End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End If Reset_CurrentReferences() @@ -387,17 +393,17 @@ Public Class frmValidator DocumentViewerValidator.CloseDocument() DocumentViewerValidator.Done() Catch ex As Exception - LOGGER.Warn($"Unexpected error in DocumentViewerValidator.Done: {ex.Message}") + Logger.Warn($"Unexpected error in DocumentViewerValidator.Done: {ex.Message}") End Try Try _frmValidatorSearch.Close() Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Sub Reset_CurrentReferences() - LOGGER.Info("Attention: Reset_CurrentReferences....") + Logger.Info("Attention: Reset_CurrentReferences....") If Not IsNothing(DT_AdditionalSearches_Resultset_Docs) Then DT_AdditionalSearches_Resultset_Docs.Clear() @@ -504,13 +510,13 @@ Public Class frmValidator Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try bbtniRefreshSearches.Visibility = BarItemVisibility.Always Else - LOGGER.Debug("AdditionlSearhes result = false!") + Logger.Debug("AdditionlSearhes result = false!") bbtniRefreshSearches.Visibility = BarItemVisibility.Never Attmnt_bbtnitm_LoadonClick.Visibility = BarItemVisibility.Never Attmt_bbtnitmShow.Visibility = BarItemVisibility.Never @@ -519,7 +525,7 @@ Public Class frmValidator End If 'Else - ' LOGGER.Debug("Not loading AdditionalSearches 2...!") + ' Logger.Debug("Not loading AdditionalSearches 2...!") ' bbtniRefreshSearches.Visibility = BarItemVisibility.Never 'End If Catch ex As Exception @@ -533,7 +539,7 @@ Public Class frmValidator Exit Sub End If - LOGGER.Debug($"in LoadSQLData for ControlID [{pControlId}]...") + Logger.Debug($"in LoadSQLData for ControlID [{pControlId}]...") Dim oDTforControl As DataTable = DTCONTROLS_WITH_SQL.Clone() Dim oExpression = $"GUID = {pControlId} AND PROFIL_ID = {CURRENT_ProfilGUID}" @@ -548,17 +554,17 @@ Public Class frmValidator Dim oReadOnly As Boolean = row.Item("READ_ONLY") 'If clsPatterns.HasComplexPatterns(row.Item("SQL_UEBERPRUEFUNG")) Then - ' LOGGER.Debug($"SQL [{row.Item("SQL_UEBERPRUEFUNG")}] has complex patterns - GUID: {oGUID}") + ' Logger.Debug($"SQL [{row.Item("SQL_UEBERPRUEFUNG")}] has complex patterns - GUID: {oGUID}") ' Continue For 'End If If oReadOnly = True Then - LOGGER.Debug("Control for Index [{0}] is read-only. Continuing.") + Logger.Debug("Control for Index [{0}] is read-only. Continuing.") Continue For End If If IsDBNull(row.Item("CONNECTION_ID")) Then - LOGGER.Info($"No CONNECTION_ID for SQL-Data - oGUID: {oGUID}") + Logger.Info($"No CONNECTION_ID for SQL-Data - oGUID: {oGUID}") Continue For End If @@ -584,7 +590,7 @@ Public Class frmValidator Continue For End If If clsPatterns.HasComplexPatterns(oSQLStatement) Then - LOGGER.Warn($"Unexpected error LoadSQLData2 - sql Statement still has complex patterns! [{oSQLStatement}]") + Logger.Warn($"Unexpected error LoadSQLData2 - sql Statement still has complex patterns! [{oSQLStatement}]") Continue For End If 'sql = ClassPatterns.ReplaceInternalValues(sqlStatement) @@ -594,7 +600,7 @@ Public Class frmValidator }) If IsNothing(oDTContent) Then - LOGGER.Warn($"SQL-Query [{oSQLStatement}] for control {control.Name} is invalid.") + Logger.Warn($"SQL-Query [{oSQLStatement}] for control {control.Name} is invalid.") Exit Sub End If Dim oValue @@ -610,7 +616,7 @@ Public Class frmValidator lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName Catch ex As Exception - LOGGER.Warn("Error in LookUpLoadSQLData: " & ex.Message) + Logger.Warn("Error in LookUpLoadSQLData: " & ex.Message) End Try ElseIf TypeOf control Is TextEdit Then @@ -622,14 +628,14 @@ Public Class frmValidator control.Text = value oValue = value Catch ex As Exception - LOGGER.Warn("Error in TextBoxLoadSQLData: " & ex.Message) + Logger.Warn("Error in TextBoxLoadSQLData: " & ex.Message) End Try ElseIf TypeOf control Is Windows.Forms.ComboBox Then Try Dim oMyComboBox As Windows.Forms.ComboBox = control Dim oselectedIndex = oMyComboBox.SelectedIndex - LOGGER.Debug($"oMyComboBox {oMyComboBox.Name} - Saving selected index {oselectedIndex}") + Logger.Debug($"oMyComboBox {oMyComboBox.Name} - Saving selected index {oselectedIndex}") Dim list As New List(Of String) For Each _row As DataRow In oDTContent.Rows @@ -640,7 +646,7 @@ Public Class frmValidator oMyComboBox.SelectedIndex = oselectedIndex Catch ex As Exception - LOGGER.Warn("Error in ComboBoxLoadSQLData: " & ex.Message) + Logger.Warn("Error in ComboBoxLoadSQLData: " & ex.Message) End Try ElseIf TypeOf control Is GridControl Then @@ -667,12 +673,12 @@ Public Class frmValidator dataGridView.DataSource = oDataSource End If Catch ex As Exception - LOGGER.Warn("Error in GridControlSQLData: " & ex.Message) + Logger.Warn("Error in GridControlSQLData: " & ex.Message) End Try End If Next Catch ex As Exception - LOGGER.Warn($"{ex.Message} - Loading ControlID: {pControlId}") + Logger.Warn($"{ex.Message} - Loading ControlID: {pControlId}") MsgBox("Error in LoadSQLData: " & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) End Try End Sub @@ -761,7 +767,7 @@ Public Class frmValidator Try oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo - LOGGER.Debug($"[{oControlInfo}] - TXT Try to create control...") + Logger.Debug($"[{oControlInfo}] - TXT Try to create control...") Dim txt As TextEdit = ControlCreator.CreateExistingTextbox(oControlRow, False) AddHandler txt.GotFocus, AddressOf OnTextBoxFocus @@ -769,9 +775,9 @@ Public Class frmValidator AddHandler txt.KeyUp, AddressOf OnTextBoxKeyUp oMyControl = txt - LOGGER.Debug($"[{oControlInfo}] - TXT Created!!") + Logger.Debug($"[{oControlInfo}] - TXT Created!!") Catch ex As Exception - LOGGER.Warn($"Unexpected error in Create_Controls TXT [{oControlInfo}]: {ex.Message}") + Logger.Warn($"Unexpected error in Create_Controls TXT [{oControlInfo}]: {ex.Message}") End Try Case "LBL" oControlInfo = "LBL#" & oControlInfo @@ -780,7 +786,7 @@ Public Class frmValidator If LOG_PERF Then PerformanceLogger.Info("Create_Controls/ComboBox") oControlInfo = "CMB#" & oControlInfo - LOGGER.Debug($"[{oControlInfo}] - CMB Try to create control...") + Logger.Debug($"[{oControlInfo}] - CMB Try to create control...") If oControlRow.Item("READ_ONLY") Then Dim cmbReadonly = ControlCreator.CreateExistingTextbox(oControlRow, False) oMyControl = cmbReadonly @@ -799,7 +805,7 @@ Public Class frmValidator End If End Sub - LOGGER.Debug("In add_ComboBox - GUID: " & oControlID) + Logger.Debug("In add_ComboBox - GUID: " & oControlID) Dim oCONID As Integer Try oCONID = PreventNulletc(oControlRow.Item("CONNECTION_ID"), "Integer") @@ -814,14 +820,14 @@ Public Class frmValidator Catch ex As Exception oCommandSQL_UBPF = "" End Try - LOGGER.Debug("ConID <> String.Empty") + Logger.Debug("ConID <> String.Empty") If oCONID > 0 And oCommandSQL_UBPF <> String.Empty Then - LOGGER.Debug("ConID > 0 And commandsql <> String.Empty") + Logger.Debug("ConID > 0 And commandsql <> String.Empty") Try oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG"), "String") If clsPatterns.HasOnlySimplePatterns(oSQL) Then - LOGGER.Debug("SQL HasOnlySimplePatterns!") + Logger.Debug("SQL HasOnlySimplePatterns!") oSQL = clsPatterns.ReplaceInternalValues(oSQL) oSQL = clsPatterns.ReplaceControlValues(oSQL, PanelValidatorControl, True) 'Dim oDT As DataTable = ClassDatabase.Return_Datatable_ConId(oSQL, oCONID, $"CreateControls - oControlID: {oControlID}") @@ -836,15 +842,15 @@ Public Class frmValidator End If End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in CMB GetValues SQL - Error: {ex.Message}") + Logger.Warn($"Unexpected error in CMB GetValues SQL - Error: {ex.Message}") End Try Else - LOGGER.Debug("Else Row 571") + Logger.Debug("Else Row 571") End If Else - LOGGER.Debug("AListe Handling") + Logger.Debug("AListe Handling") Dim AListe As String = oControlRow.Item("CHOICE_LIST") - LOGGER.Debug("In add_ComboBox - AListe: " & AListe) + Logger.Debug("In add_ComboBox - AListe: " & AListe) If AListe Is Nothing = False Then 'Dim liste = _windreamPM.GetValuesfromAuswahlliste(AListe) Dim liste = WINDREAM.GetValuesfromAuswahlliste(AListe) @@ -865,7 +871,7 @@ Public Class frmValidator oMyControl = oComboBox End If - LOGGER.Debug($"[{oControlInfo}] - CMB CONTROL created") + Logger.Debug($"[{oControlInfo}] - CMB CONTROL created") Case "DTP" oControlInfo = "DTP#" & oControlInfo @@ -907,7 +913,7 @@ Public Class frmValidator Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oMyControl.Name}%'" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredData, LoadOption.PreserveChanges) If oFilteredData.Rows.Count >= 1 Then - LOGGER.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which are depending on {oMyControl.Name}") + Logger.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which are depending on {oMyControl.Name}") 'AddHandler lookup.EditValueChanged, AddressOf onLookUp1 AddHandler lookup.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue End If @@ -915,7 +921,7 @@ Public Class frmValidator oExpression = $"SQL_ENABLE like '%#CTRL#{oMyControl.Name}%'" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredData, LoadOption.PreserveChanges) If oFilteredData.Rows.Count >= 1 Then - LOGGER.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which' enable state is depending on {oMyControl.Name}") + Logger.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which' enable state is depending on {oMyControl.Name}") 'AddHandler lookup.EditValueChanged, AddressOf onLookUp1 AddHandler lookup.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue End If @@ -966,9 +972,9 @@ Public Class frmValidator Dim oExpression = $"CONTROL_ID = {oControlRow.Item("GUID")}" DT_COLUMNS_GRID.Select(oExpression, "SEQUENCE").CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count >= 1 Then - LOGGER.Debug("We got a DTGRID_COLUMNS definition for [{0}] ", oControlInfo) + Logger.Debug("We got a DTGRID_COLUMNS definition for [{0}] ", oControlInfo) Else - LOGGER.Debug("DTGRID_COLUMNS definition for control [{0}] does not contain any rows!", oControlInfo) + Logger.Debug("DTGRID_COLUMNS definition for control [{0}] does not contain any rows!", oControlInfo) Continue For End If @@ -984,7 +990,7 @@ Public Class frmValidator AddHandler obutton.Click, AddressOf onCustomButtonClick oMyControl = obutton End Select - LOGGER.Debug($"[{oControlInfo}]: End of Select...") + Logger.Debug($"[{oControlInfo}]: End of Select...") If TypeOf oMyControl IsNot Label Then If first_control Is Nothing Then first_control = oMyControl @@ -1000,18 +1006,18 @@ Public Class frmValidator Catch ex As Exception Dim st As New StackTrace(True) st = New StackTrace(ex, True) - 'LOGGER.Error(ex) + 'Logger.Error(ex) Dim omsg = $"Unexpected Error in Create_Controls (Select Case) [{oControlInfo}] - ERROR: {ex.Message}" - LOGGER.Warn(omsg) + Logger.Warn(omsg) If DEBUG = False Then MsgBox(omsg, MsgBoxStyle.Critical, "Attention:") End Try Next - LOGGER.Debug("Create_Controls finished!") + Logger.Debug("Create_Controls finished!") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) If DEBUG = False Then MsgBox("Error CreateControls: " & ex.Message, MsgBoxStyle.Critical, "Attention:") allgFunk.Insert_LogEntry($"ERROR CreateControls >> {ex.Message}") End Try @@ -1022,7 +1028,7 @@ Public Class frmValidator Dim oControlID = DirectCast(oMyGridView.GridControl.Tag, ClassControlCreator.ControlMetadata).Guid SaveDevExpressGridControl_Layout(CURRENT_ProfilGUID, oControlID, oMyGridView) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Sub Clear_all_Input() @@ -1117,8 +1123,8 @@ Public Class frmValidator _DependingControl_In_Action = False End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Display SQL result for control: " & oRow.Item("NAME") & " - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Display SQL result for control: " & oRow.Item("NAME") & " - ERROR: " & ex.Message) End Try Next @@ -1128,8 +1134,8 @@ Public Class frmValidator ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message) End Try If oTextBox.Name <> last_control.Name Then SendKeys.Send("{TAB}") @@ -1144,12 +1150,12 @@ Public Class frmValidator Dim oControlID = DirectCast(oButton.Tag, ClassControlCreator.ControlMetadata).Guid Dim oSQL = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG") If IsNothing(oSQL) Then - LOGGER.Warn("onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING") + Logger.Warn("onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING") Exit Sub End If If Check_UpdateIndexe() = False Then - LOGGER.Warn("onCustomButtonClick - Check_UpdateIndexe = False >> Exit Click") + Logger.Warn("onCustomButtonClick - Check_UpdateIndexe = False >> Exit Click") Exit Sub End If Override_SQLCommand = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL2") @@ -1205,11 +1211,11 @@ Public Class frmValidator Try OverrideAll = oDT_ACTIONS?.Rows(0).Item("OverrideAll") Catch ex As Exception - LOGGER.Warn($"Could not set OverrideAll {ex.Message}") + Logger.Warn($"Could not set OverrideAll {ex.Message}") OverrideAll = False End Try If OverrideAll = True Then - LOGGER.Info($"CURRENT_DOC_ID: {CURRENT_DOC_ID} - OverrideAll will be in Action!") + Logger.Info($"CURRENT_DOC_ID: {CURRENT_DOC_ID} - OverrideAll will be in Action!") End If Select Case oAction.ToString.ToUpper @@ -1277,7 +1283,7 @@ Public Class frmValidator End If Case Else MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) - LOGGER.Warn($"No configured action provided for onCustomButtonClick [{oAction}]") + Logger.Warn($"No configured action provided for onCustomButtonClick [{oAction}]") End Select @@ -1327,8 +1333,8 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Display SQL result for control: " & ROW.Item(0).ToString & " - ERROR: " & ex.Message) End Try Next @@ -1336,13 +1342,13 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Eventhandler Variable SQL Result - ERROR: " & ex.Message) End Try End Sub Public Sub onLookUpselectedValue(sender As Object, SelectedValues As List(Of String)) - LOGGER.Debug("onLookUpselectedValue") + Logger.Debug("onLookUpselectedValue") If _FormLoaded = False Then Exit Sub End If @@ -1356,11 +1362,11 @@ Public Class frmValidator LookupControl_EnablingControls(oLookup, SelectedValues) LookupControl_DependingColumn(oLookup, SelectedValues) Else - LOGGER.Debug("Attention: onLookUpselectedValue: SelectedValues.Count <> 1 ") + Logger.Debug("Attention: onLookUpselectedValue: SelectedValues.Count <> 1 ") End If End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Public Sub LookupListChanged(sender As Object, SelectedValues As List(Of String)) @@ -1374,12 +1380,12 @@ Public Class frmValidator ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs) - LOGGER.Debug("onCheckBox_CheckedChange") + Logger.Debug("onCheckBox_CheckedChange") If _FormLoaded = False Then Exit Sub @@ -1392,7 +1398,7 @@ Public Class frmValidator SetControlValues_FromControl(oCheckbox) ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Public Sub onLookUpselectedValue_Control2Set(sender As Object, SelectedValues As List(Of String)) @@ -1400,7 +1406,7 @@ Public Class frmValidator If _FormLoaded = False Then Exit Sub End If - LOGGER.Debug("onLookUpselectedValue_Control2Set") + Logger.Debug("onLookUpselectedValue_Control2Set") Dim oRepositoryItem As RepositoryItemLookupControl3 = sender Dim oLookup As LookupControl3 = oRepositoryItem.OwnerEdit SetControlValues_FromControl(oLookup) @@ -1412,7 +1418,7 @@ Public Class frmValidator Dim oControlID = oControlMeta.Guid If _SetControlValue_In_Action = True Then - LOGGER.Debug("SetControlValue in action. Exiting.") + Logger.Debug("SetControlValue in action. Exiting.") Exit Sub End If @@ -1422,20 +1428,20 @@ Public Class frmValidator CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count < 1 Then - LOGGER.Debug("SET_CONTROL_DATA is empty for control [{0}]. Exiting.", oControlName) + Logger.Debug("SET_CONTROL_DATA is empty for control [{0}]. Exiting.", oControlName) Exit Sub End If Dim oRow As DataRow = oFilteredDatatable.Rows.Item(0) Dim oControlGUID2Set = oControlID Dim oControlname2Set = oRow.Item("NAME") - LOGGER.Debug($"Workin on SetControLValue for {oControlname2Set} ...") + Logger.Debug($"Workin on SetControLValue for {oControlname2Set} ...") Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", -1) Dim oControlDataSql = oRow.ItemEx("SET_CONTROL_DATA", String.Empty) If oConnectionId = -1 Or oControlDataSql = String.Empty Then - LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") + Logger.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") Exit Sub End If @@ -1473,7 +1479,7 @@ Public Class frmValidator Dim oControlId2Set As Integer 'If Not Integer.TryParse(oControl2Set, oControlId2Set) Then - ' LOGGER.Warn("Careful: the oControl2Set contains no CONTROL_GUID") + ' Logger.Warn("Careful: the oControl2Set contains no CONTROL_GUID") ' Exit Sub 'End If @@ -1488,7 +1494,7 @@ Public Class frmValidator Dim oControl As Control = oControlObject2Set Dim oMeta As ClassControlCreator.ControlMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) - LOGGER.Debug($"Got the Control22Set: {oControlId2Set}..Setting the values..") + Logger.Debug($"Got the Control22Set: {oControlId2Set}..Setting the values..") Select Case oControl.GetType() @@ -1515,7 +1521,7 @@ Public Class frmValidator End If Case Else - LOGGER.Warn("SetControlData used on unsupported control") + Logger.Warn("SetControlData used on unsupported control") End Select @@ -1524,11 +1530,11 @@ Public Class frmValidator End If If oFound = False Then - LOGGER.Debug($"Could not find the Control2Set with ID {oControlGUID2Set} on panel!!!") + Logger.Debug($"Could not find the Control2Set with ID {oControlGUID2Set} on panel!!!") End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Warn($"Error while Control2Set for [{oControlname2Set}]: " & ex.Message) + Logger.Error(ex) + Logger.Warn($"Error while Control2Set for [{oControlname2Set}]: " & ex.Message) Finally _SetControlValue_In_Action = False End Try @@ -1537,22 +1543,22 @@ Public Class frmValidator Private Sub LookupControl_DependingControls(LookupControl As LookupControl3, SelectedValues As List(Of String)) Dim oLOOKUPValue = SelectedValues.Item(0) Dim oLOOKUPName = LookupControl.Name - LOGGER.Debug($"oLOOKUPValue is [{oLOOKUPValue}]!") + Logger.Debug($"oLOOKUPValue is [{oLOOKUPValue}]!") Dim oControlID = DirectCast(LookupControl.Tag, ClassControlCreator.ControlMetadata).Guid Dim oFilteredDatatable As DataTable = DT_CONTROLS.Clone() Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oLOOKUPName}%'" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count > 0 Then - LOGGER.Debug($"We got {oFilteredDatatable.Rows.Count} depending controls!!") + Logger.Debug($"We got {oFilteredDatatable.Rows.Count} depending controls!!") Else - LOGGER.Debug($"Sorry NO depending controls!!") + Logger.Debug($"Sorry NO depending controls!!") End If For Each oRowDependingControl As DataRow In oFilteredDatatable.Rows Dim oDEPENDING_GUID = oRowDependingControl.Item("GUID") Dim oDEPENDING_CtrlName = oRowDependingControl.Item("NAME") - LOGGER.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oLOOKUPName}..") + Logger.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oLOOKUPName}..") If _DependingControl_In_Action = True Then - LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") + Logger.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then @@ -1569,7 +1575,7 @@ Public Class frmValidator For Each oControl As Control In PanelValidatorControl.Controls If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then oFound = True - LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") + Logger.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") Select Case oControl.GetType.ToString Case GetType(TextEdit).ToString Try @@ -1579,12 +1585,12 @@ Public Class frmValidator 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue Catch ex As Exception - LOGGER.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") + Logger.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") End Try Catch ex As Exception - LOGGER.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") + Logger.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") End Try Dim oColor @@ -1626,7 +1632,7 @@ Public Class frmValidator End Try Catch ex As Exception - LOGGER.Warn($"Unexpected error in Checking oCheckBoxDependingControlLOOKUP: {ex.Message}") + Logger.Warn($"Unexpected error in Checking oCheckBoxDependingControlLOOKUP: {ex.Message}") End Try @@ -1638,16 +1644,16 @@ Public Class frmValidator Next If oFound = False Then - LOGGER.Debug($"Could not find the depending Control with ID {oDEPENDING_GUID} on panel!!!") + Logger.Debug($"Could not find the depending Control with ID {oDEPENDING_GUID} on panel!!!") End If Catch ex As Exception - LOGGER.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) + Logger.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) _DependingControl_In_Action = False End Try SendKeys.Send("{TAB}") _ControlHandleStarted = True Else - LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") + Logger.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") End If @@ -1659,22 +1665,22 @@ Public Class frmValidator End Sub Private Sub CheckBox_DependingControls(pCheckbox As CheckBox) Dim oCheckboxname = pCheckbox.Name - LOGGER.Debug($"pCheckStateTrue [{pCheckbox.Checked}]!") + Logger.Debug($"pCheckStateTrue [{pCheckbox.Checked}]!") Dim oControlID = DirectCast(pCheckbox.Tag, ClassControlCreator.ControlMetadata).Guid Dim oFilteredDatatable As DataTable = DT_CONTROLS.Clone() Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oCheckboxname}%'" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count > 0 Then - LOGGER.Debug($"We got {oFilteredDatatable.Rows.Count} depending controls!!") + Logger.Debug($"We got {oFilteredDatatable.Rows.Count} depending controls!!") Else - LOGGER.Debug($"Sorry NO depending controls!!") + Logger.Debug($"Sorry NO depending controls!!") End If For Each oRowDependingControl As DataRow In oFilteredDatatable.Rows Dim oDEPENDING_GUID = oRowDependingControl.Item("GUID") Dim oDEPENDING_CtrlName = oRowDependingControl.Item("NAME") - LOGGER.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oCheckboxname}..") + Logger.Debug($"Control {oDEPENDING_CtrlName} is depending on lookUp {oCheckboxname}..") If _DependingControl_In_Action = True Then - LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") + Logger.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowDependingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowDependingControl.Item("SQL_UEBERPRUEFUNG")) Then @@ -1692,7 +1698,7 @@ Public Class frmValidator For Each oControl As Control In PanelValidatorControl.Controls If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_GUID Then oFound = True - LOGGER.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") + Logger.Debug($"Got the depending control ID:{oDEPENDING_GUID}..Setting the values..") Select Case oControl.GetType.ToString Case GetType(TextEdit).ToString Try @@ -1702,11 +1708,11 @@ Public Class frmValidator 'oControl.Text = oValue DirectCast(oControl, TextEdit).EditValue = oValue Catch ex As Exception - LOGGER.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") + Logger.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") End Try Catch ex As Exception - LOGGER.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") + Logger.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") End Try Dim oColor @@ -1748,7 +1754,7 @@ Public Class frmValidator End Try Catch ex As Exception - LOGGER.Warn($"Unexpected error in Checking oCheckBoxDependingControlCHK: {ex.Message}") + Logger.Warn($"Unexpected error in Checking oCheckBoxDependingControlCHK: {ex.Message}") End Try @@ -1759,22 +1765,22 @@ Public Class frmValidator Next If oFound = False Then - LOGGER.Debug($"Could not find the depending Control with ID {oDEPENDING_GUID} on panel!!!") + Logger.Debug($"Could not find the depending Control with ID {oDEPENDING_GUID} on panel!!!") End If Catch ex As Exception - LOGGER.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) + Logger.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) _DependingControl_In_Action = False End Try SendKeys.Send("{TAB}") _ControlHandleStarted = True Else - LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") + Logger.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") End If Next End Sub Private Sub LookupControl_EnablingControls(LookupControl As LookupControl3, SelectedValues As List(Of String)) Dim oLOOKUPValue = SelectedValues.Item(0) - LOGGER.Debug($"LookupControl_EnablingControls [{LookupControl.Name()}] - oLOOKUPValue is [{oLOOKUPValue}]!") + Logger.Debug($"LookupControl_EnablingControls [{LookupControl.Name()}] - oLOOKUPValue is [{oLOOKUPValue}]!") Dim oControlID = DirectCast(LookupControl.Tag, ClassControlCreator.ControlMetadata).Guid Controls2beEnabled(LookupControl.Name) @@ -1808,7 +1814,7 @@ Public Class frmValidator }) If Not IsNothing(oDTDEPENDING_RESULT) Then - LOGGER.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ") + Logger.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ") For Each oControl As Control In PanelValidatorControl.Controls Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid @@ -1821,7 +1827,7 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) _DependingColumn_In_Action = False End Try Next @@ -1853,7 +1859,7 @@ Public Class frmValidator }) If Not IsNothing(oDTDEPENDING_RESULT) Then - LOGGER.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ") + Logger.Debug($"Trying to fill the DropDown (DC) for ControlID [{oDEPENDING_CONTROL_ID}]..RowCount: [{oDTDEPENDING_RESULT.Rows.Count}] ") For Each oControl As Control In PanelValidatorControl.Controls Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oDEPENDING_CONTROL_ID Then @@ -1865,7 +1871,7 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) _DependingColumn_In_Action = False End Try Next @@ -1908,8 +1914,8 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Display SQL result (Combobox) for control: (" & _Step.ToString & ")" & ROW.Item(0).ToString & " - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Display SQL result (Combobox) for control: (" & _Step.ToString & ")" & ROW.Item(0).ToString & " - ERROR: " & ex.Message) End Try Next End If @@ -1920,8 +1926,8 @@ Public Class frmValidator SetControlValues_FromControl(oCombobox) Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Eventhandler Variable SQL Result ComboBox - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Eventhandler Variable SQL Result ComboBox - ERROR: " & ex.Message) End Try _ControlHandleStarted = True End If @@ -1938,16 +1944,16 @@ Public Class frmValidator Dim oExpression = $"SQL_ENABLE like '%#CTRL#{pControlName}%'" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count > 0 Then - LOGGER.Debug($"We got {oFilteredDatatable.Rows.Count} controls which got enable definitions!!") + Logger.Debug($"We got {oFilteredDatatable.Rows.Count} controls which got enable definitions!!") Else - LOGGER.Debug($"Sorry NO controls with enabling definition!!") + Logger.Debug($"Sorry NO controls with enabling definition!!") End If For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows Dim oENABLE_GUID = oRowEnablingControl.Item("GUID") Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") - LOGGER.Debug($"Control {oENABLE_CtrlName} is depending on Control: {pControlName}..") + Logger.Debug($"Control {oENABLE_CtrlName} is depending on Control: {pControlName}..") If _DependingControl_In_Action = True Then - LOGGER.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") + Logger.Debug($"..but _dependingControl_in_action = True ==> Exit Sub!") Exit Sub End If If Not IsDBNull(oRowEnablingControl.Item("CONNECTION_ID")) And Not IsDBNull(oRowEnablingControl.Item("SQL_ENABLE")) Then @@ -1967,7 +1973,7 @@ Public Class frmValidator For Each oControl As Control In PanelValidatorControl.Controls If DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid = oENABLE_GUID Then oFound = True - LOGGER.Debug($"Got the depending control ID:{oENABLE_GUID}..Setting enabled/Disabled...") + Logger.Debug($"Got the depending control ID:{oENABLE_GUID}..Setting enabled/Disabled...") oControl.Enabled = oENABLERESULT _DependingControl_In_Action = False Exit For @@ -1976,19 +1982,19 @@ Public Class frmValidator Next If oFound = False Then - LOGGER.Debug($"Could not find the enabling Control with ID {oENABLE_GUID} on panel!!!") + Logger.Debug($"Could not find the enabling Control with ID {oENABLE_GUID} on panel!!!") End If Catch ex As Exception - LOGGER.Warn($"Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) + Logger.Warn($"Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) _DependingControl_In_Action = False End Try Else - LOGGER.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") + Logger.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") End If Next Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub 'Private Sub Controls2beDisabled() @@ -1997,7 +2003,7 @@ Public Class frmValidator ' Dim oExpression = $"LEN(SQL_ENABLE) > 0" ' DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) ' If oFilteredDatatable.Rows.Count > 0 Then - ' LOGGER.Debug($"We got {oFilteredDatatable.Rows.Count} controls which need to be disabled!!") + ' Logger.Debug($"We got {oFilteredDatatable.Rows.Count} controls which need to be disabled!!") ' End If ' For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows ' Dim oENABLE_GUID = oRowEnablingControl.Item("GUID") @@ -2010,7 +2016,7 @@ Public Class frmValidator ' Next ' Next ' Catch ex As Exception - ' LOGGER.Error(ex) + ' Logger.Error(ex) ' End Try 'End Sub Private Sub Controls2B_EnDisabled_on_Load() @@ -2021,14 +2027,14 @@ Public Class frmValidator Dim oExpression = $"LEN(SQL_ENABLE_ON_LOAD) > 0" DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) If oFilteredDatatable.Rows.Count > 0 Then - LOGGER.Debug($"We got {oFilteredDatatable.Rows.Count} controls which need to be checked dis/enable on load!") + Logger.Debug($"We got {oFilteredDatatable.Rows.Count} controls which need to be checked dis/enable on load!") End If For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows Dim oENABLE_GUID = oRowEnablingControl.Item("GUID") Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") For Each oControl As Control In PanelValidatorControl.Controls If oENABLE_GUID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid Then - LOGGER.Debug($"Found the Control on panel which needs to be checked [{oENABLE_GUID}]...") + Logger.Debug($"Found the Control on panel which needs to be checked [{oENABLE_GUID}]...") 'Dim oSqlCommand = IIf(IsDBNull(oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD")), "", oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD")) 'Dim oConID = oRowEnablingControl.Item("SQL_ENABLE_ON_LOAD_CONID") @@ -2040,22 +2046,22 @@ Public Class frmValidator Dim oResult = DatabaseFallback.GetScalarValueWithConnection(oSqlCommand, oConnectionId) Try - LOGGER.Debug($"Result of Enable SQL [{oResult}]...") + Logger.Debug($"Result of Enable SQL [{oResult}]...") oControl.Enabled = oResult Catch ex As Exception - LOGGER.Warn($"Error en/disabling control onLoad: [{ex.Message}]") + Logger.Warn($"Error en/disabling control onLoad: [{ex.Message}]") End Try End If Next Next Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String) Try - LOGGER.Debug("Setting Values for Control [{0}]", displayboxname) + Logger.Debug("Setting Values for Control [{0}]", displayboxname) 'Dim oResultTable As DataTable = ClassDatabase.Return_Datatable_ConId(sqlCommand, sqlConnection) Dim oResultTable As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(sqlCommand, DatabaseType.ECM) With { @@ -2063,15 +2069,15 @@ Public Class frmValidator }) If Not IsNothing(oResultTable) Then - LOGGER.Debug("Result Table has [{0}] rows", oResultTable.Rows.Count) - LOGGER.Debug("Result Table has [{0}] columns", oResultTable.Columns.Count) + Logger.Debug("Result Table has [{0}] rows", oResultTable.Rows.Count) + Logger.Debug("Result Table has [{0}] columns", oResultTable.Columns.Count) 'Ist das Control ein Control was mehrfachwerte enthalten kann If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_LOOKUP) Or displayboxname.StartsWith(ClassControlCreator.PREFIX_TABLE) Then - LOGGER.Debug("Control is Multivalue") + Logger.Debug("Control is Multivalue") If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then - LOGGER.Debug("Filling Combobox with Results") + Logger.Debug("Filling Combobox with Results") Dim oCombobox As Windows.Forms.ComboBox = PanelValidatorControl.Controls(displayboxname) @@ -2079,7 +2085,7 @@ Public Class frmValidator Exit Sub End If - LOGGER.Debug("Control exists, setting results.") + Logger.Debug("Control exists, setting results.") oCombobox.DataSource = Nothing oCombobox.DataSource = oResultTable @@ -2087,7 +2093,7 @@ Public Class frmValidator oCombobox.ValueMember = oResultTable.Columns(0).ColumnName ElseIf displayboxname.StartsWith(ClassControlCreator.PREFIX_LOOKUP) Then - LOGGER.Debug("Filling Lookup Control with Results") + Logger.Debug("Filling Lookup Control with Results") Dim oLookup As LookupControl3 = PanelValidatorControl.Controls(displayboxname) @@ -2095,28 +2101,28 @@ Public Class frmValidator Exit Sub End If - LOGGER.Debug("Control exists, setting results.") + Logger.Debug("Control exists, setting results.") oLookup.Properties.DataSource = Nothing oLookup.Properties.DataSource = oResultTable Else 'not implemented - LOGGER.Warn("Depending_Control_Set_Result for [{0}] NOT IMPLEMENTED", displayboxname) + Logger.Warn("Depending_Control_Set_Result for [{0}] NOT IMPLEMENTED", displayboxname) End If Else If oResultTable.Rows.Count = 1 Then PanelValidatorControl.Controls(displayboxname).Text = oResultTable.Rows(0).Item(0).ToString Else PanelValidatorControl.Controls(displayboxname).Text = "RESULT = resultDT.Rows.Count <> 1" - LOGGER.Info(">> Datatable-SQL: " & sqlCommand) + Logger.Info(">> Datatable-SQL: " & sqlCommand) End If End If Else - LOGGER.Warn("Result Table is nothing!") + Logger.Warn("Result Table is nothing!") End If Catch ex As Exception - LOGGER.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) + Logger.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical) End Try End Sub @@ -2138,7 +2144,7 @@ Public Class frmValidator If dr.Item("PROFIL_ID") = CURRENT_ProfilGUID And dr.Item("CTRL_NAME") = control.Name Then Dim check = dr.Item("SQL_UEBERPRUEFUNG") If IsDBNull(check) Then - LOGGER.Debug("SQL Check is not configured!") + Logger.Debug("SQL Check is not configured!") Return True End If If check.ToString.Length > 0 And dr.Item("INDEX_NAME") <> "DD PM-ONLY FOR DISPLAY" Then @@ -2157,8 +2163,8 @@ Public Class frmValidator End If Next Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected error in CheckValueExists:" & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected error in CheckValueExists:" & ex.Message) Return False End Try End Function @@ -2177,7 +2183,7 @@ Public Class frmValidator End Function Function Get_Next_GUID() As Integer Try - LOGGER.Debug("Get_Next_GUID...") + Logger.Debug("Get_Next_GUID...") Dim oNewGUID As Integer Dim oBIT As Integer = 0 If PROFIL_sortbynewest = True Then @@ -2192,27 +2198,27 @@ Public Class frmValidator Try oNewGUID = oDT.Rows(0).Item(0) Catch ex As Exception - LOGGER.Warn($">> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") - LOGGER.Warn($"ERRORMESSAGE [{ex.Message}]") + Logger.Warn($">> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") + Logger.Warn($"ERRORMESSAGE [{ex.Message}]") End Try Try CURRENT_DOC_ID = oDT.Rows(0).Item(1) - LOGGER.Debug($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...") + Logger.Debug($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...") Catch ex As Exception - LOGGER.Warn($">> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]") - LOGGER.Warn($"ERRORMESSAGE [{ex.Message}]") + Logger.Warn($">> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]") + Logger.Warn($"ERRORMESSAGE [{ex.Message}]") End Try Try Amount_Docs2Validate = oDT.Rows(0).Item(2) - LOGGER.Debug($"Get_Next_GUID: Amount_Docs2Validate [{Amount_Docs2Validate}]...") + Logger.Debug($"Get_Next_GUID: Amount_Docs2Validate [{Amount_Docs2Validate}]...") Catch ex As Exception Amount_Docs2Validate = 0 - LOGGER.Warn("Amount_Docs2Validate Error: " & ex.Message) + Logger.Warn("Amount_Docs2Validate Error: " & ex.Message) End Try Else - LOGGER.Info($">> Attention: GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") + Logger.Info($">> Attention: GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") oNewGUID = 0 Return oNewGUID End If @@ -2222,18 +2228,18 @@ Public Class frmValidator CURRENT_DOC_PATH = "" CURRENT_WMFILE = Nothing If oNewGUID > 0 Then - LOGGER.Debug("newGUID: " & oNewGUID.ToString) + Logger.Debug("newGUID: " & oNewGUID.ToString) ElseIf oNewGUID <> 0 Then - LOGGER.Info(" >> Attention: in GetNextGUID - Could not get a GUID(2)") + Logger.Info(" >> Attention: in GetNextGUID - Could not get a GUID(2)") oNewGUID = 0 End If Return oNewGUID Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) oErrMsgMissingInput = "Unexpected error in Get_Next_GUID: " & ex.Message - LOGGER.Info(">> Unexpected error in Get_Next_GUID:: " & ex.Message, True) + Logger.Info(">> Unexpected error in Get_Next_GUID:: " & ex.Message, True) Return 0 End Try @@ -2242,7 +2248,7 @@ Public Class frmValidator Private Function CreateWMObject() As String - LOGGER.Debug($"in GetWMDocFileString...'") + Logger.Debug($"in GetWMDocFileString...'") Dim oWMOwnPath As String If WM_AHWF_docPath <> String.Empty Then @@ -2252,18 +2258,18 @@ Public Class frmValidator oWMOwnPath = WMDocPathWindows.Replace(WMSUFFIX, "") End If - LOGGER.Debug($"oWMOwnPath: {oWMOwnPath}") + Logger.Debug($"oWMOwnPath: {oWMOwnPath}") Try Dim oNormalizedPath = WINDREAM_MOD.GetNormalizedPath(oWMOwnPath, 1) CURRENT_WMFILE = WINDREAM_MOD.Session.GetWMObjectByPath(WMEntity.WMEntityDocument, oNormalizedPath) - LOGGER.Debug("CURRENT_WMFILE: [{0}]", CURRENT_WMFILE) + Logger.Debug("CURRENT_WMFILE: [{0}]", CURRENT_WMFILE) Return True Catch ex As Exception Dim _err1 As Boolean = False - LOGGER.Error(ex) + Logger.Error(ex) allgFunk.Insert_LogEntry($"ERROR CreateWMObject >> {ex.Message}") - LOGGER.Info("Unexpected error creating WMObject(1) in GetWMDocFileString: " & ex.Message) - LOGGER.Info("Error Number: " & Err.Number.ToString) + Logger.Info("Unexpected error creating WMObject(1) in GetWMDocFileString: " & ex.Message) + Logger.Info("Error Number: " & Err.Number.ToString) errormessage = $"Could not create a WMObject(1) for [{oWMOwnPath}]!" frmError.ShowDialog() Return False @@ -2283,27 +2289,27 @@ Public Class frmValidator Dim oSQL = $"SELECT dbo.FNPM_GET_FILEPATH ({CURRENT_DOC_GUID},{_CheckStandard})" oResult = DatabaseFallback.GetScalarValueECM(oSQL) - LOGGER.Debug($"Checking file 0 [{oResult}] exists?...") + Logger.Debug($"Checking file 0 [{oResult}] exists?...") WMDocPathWindows = String.Empty If File.Exists(oResult) = False And OPERATION_MODE_FS <> ClassConstants.OpModeFS_ZF Then DocPathWindows = oResult - LOGGER.Info($"GetWMDocPathWindows returned false [{oResult}] - trying with standard again...") + Logger.Info($"GetWMDocPathWindows returned false [{oResult}] - trying with standard again...") oSQL = $"SELECT [dbo].[FNPM_GET_FILEPATH] ({CURRENT_DOC_GUID},1)" oResult = DatabaseFallback.GetScalarValueECM(oSQL) - LOGGER.Debug($"Checking file 1[{oResult}] exists?...") + Logger.Debug($"Checking file 1[{oResult}] exists?...") If File.Exists(oResult) = False Then - LOGGER.Info($"GetWMDocPathWindows FileExists2 also returned false [{oResult}]!") + Logger.Info($"GetWMDocPathWindows FileExists2 also returned false [{oResult}]!") DocPathWindows = oResult - LOGGER.Warn($"GetDocPathWindows: File [{oResult}] not existing!") + Logger.Warn($"GetDocPathWindows: File [{oResult}] not existing!") Return False End If End If WMDocPathWindows = oResult CURRENT_DOC_PATH = WMDocPathWindows - LOGGER.Info($"GetWMDocPathWindows CURRENT_DOC_PATH: {CURRENT_DOC_PATH}") + Logger.Info($"GetWMDocPathWindows CURRENT_DOC_PATH: {CURRENT_DOC_PATH}") Return True Catch ex As Exception WMDocPathWindows = "" @@ -2321,10 +2327,10 @@ Public Class frmValidator oSQl = oSQl.Replace("@DOC_GUID", CURRENT_DOC_GUID) oSQl = oSQl.Replace("@DOC_ID", CURRENT_DOC_ID) oSQl = oSQl.Replace("@DocID", CURRENT_DOC_ID) - LOGGER.Debug($"Load_IDB_DOC_DATA SQL: {oSQl}") + Logger.Debug($"Load_IDB_DOC_DATA SQL: {oSQl}") IDB_DT_DOC_DATA = DatabaseFallback.GetDatatableECM(oSQl) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End Sub @@ -2339,13 +2345,13 @@ Public Class frmValidator 'Me.lblerror.Visible = False _Indexe_Loaded = False - LOGGER.Debug("In Load_Next_Document") + Logger.Debug("In Load_Next_Document") Try If first = True Then - LOGGER.Debug("First Document") + Logger.Debug("First Document") CURRENT_WMFILE = Nothing Else - LOGGER.Debug("Following Document ") + Logger.Debug("Following Document ") End If ' Controls nicht beim ersten Laden leeren @@ -2359,14 +2365,14 @@ Public Class frmValidator ' Case "first" ' Case "last" 'End Select - LOGGER.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'") + Logger.Debug($"CURRENT_JUMP_DOC_GUID: {CURRENT_JUMP_DOC_GUID}'") If CURRENT_JUMP_DOC_GUID = 0 Then CURRENT_DOC_GUID = Get_Next_GUID() - LOGGER.Debug($"CURRENT_JUMP_DOC_GUID = 0 ## NEW CURRENT_DOC_GUID: {CURRENT_DOC_GUID}'") + Logger.Debug($"CURRENT_JUMP_DOC_GUID = 0 ## NEW CURRENT_DOC_GUID: {CURRENT_DOC_GUID}'") ElseIf first = False Then CURRENT_DOC_GUID = 0 End If - LOGGER.Info("LoadNextDocument - Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") + Logger.Info("LoadNextDocument - Dokument-GUID: '" & CURRENT_DOC_GUID.ToString & "'") If CURRENT_DOC_GUID > 0 Then If (OPERATION_MODE_FS = ClassConstants.OpModeFS_PWM Or OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM) And GetDocPathWindows(0) = False Then SetStatusLabel($"File not accessible: {DocPathWindows}", "DarkOrange") @@ -2379,11 +2385,11 @@ Public Class frmValidator Else Load_IDB_DOC_DATA() If IsNothing(IDB_DT_DOC_DATA) Then - LOGGER.Warn("ATTENTION: IDB-Data is nothing. Check the IDB_DOC_DATA_SQL Variable Source") + Logger.Warn("ATTENTION: IDB-Data is nothing. Check the IDB_DOC_DATA_SQL Variable Source") Exit Sub Else If IDB_DT_DOC_DATA.Rows.Count = 1 Then - LOGGER.Debug("Got one IDB DocData Result") + Logger.Debug("Got one IDB DocData Result") End If End If End If @@ -2408,7 +2414,7 @@ Public Class frmValidator bsiDocID.Caption = "Document-ID: " & CURRENT_DOC_ID & " - GUID: " & CURRENT_DOC_GUID - LOGGER.Debug("AllDocInfo created...") + Logger.Debug("AllDocInfo created...") If IDB_ACTIVE = False Then oErrMsgMissingInput = Windream_get_Doc_info() Else @@ -2420,7 +2426,7 @@ Public Class frmValidator If oErrMsgMissingInput = "" Then If WMDocPathWindows <> String.Empty Or OPERATION_MODE_FS = ClassConstants.OpModeFS_ZF Then load_viewer() - LOGGER.Debug("Viewer loaded!") + Logger.Debug("Viewer loaded!") If Current_Document.Extension <> "pdf" Then bbtniAnnotation.Visibility = BarItemVisibility.Never End If @@ -2432,7 +2438,7 @@ Public Class frmValidator LoadSQLData(oControl, DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid) Next - LOGGER.Debug("Indexmask loaded") + Logger.Debug("Indexmask loaded") 'Nun loggen das das Profil geladen wurde If PROFIL_LOGINDEX <> "" Then @@ -2442,7 +2448,7 @@ Public Class frmValidator Else oLogString = $"PMProfile loaded: [{CURRENT_ProfilGUID}-{CURRENT_ProfilName}]" IDBData.SetVariableValue(PROFIL_LOGINDEX, oLogString) - 'LOGGER.Debug("Profilname erfolgreich in Vektorfeld LOG geschrieben") + 'Logger.Debug("Profilname erfolgreich in Vektorfeld LOG geschrieben") 'Else ' errormessage = "Fehler beim finalen Indexieren:" & vbNewLine & idxerr_message ' My.Settings.Save() @@ -2468,19 +2474,19 @@ Public Class frmValidator Else 'Dim oMsg = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("msgEndOfProfile") Dim oMsg = S.Ende_des_Profils___Keine_weiteren_Vorgänge - LOGGER.Info(oMsg) + Logger.Info(oMsg) activate_controls(True) Me.Close() End If End If - LOGGER.Debug("frmValidator: LoadNextDocument finished!") + Logger.Debug("frmValidator: LoadNextDocument finished!") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) allgFunk.Insert_LogEntry($"ERROR LoadNextDocument >> {ex.Message}") errormessage = "unexpected error in Load_Next_Document:" & ex.Message My.Settings.Save() - LOGGER.Info("unexpected error in Load_Next_Document: " & ex.Message) + Logger.Info("unexpected error in Load_Next_Document: " & ex.Message) frmError.ShowDialog() End Try End Sub @@ -2497,7 +2503,7 @@ Public Class frmValidator End If Current_Document = oDocument Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) Exit Sub End Try If ActiveWorkflowType = ConstAHWorkflow_BlindFile Or PROFILE_SHOW_DOCUMENT = False Then @@ -2540,13 +2546,13 @@ Public Class frmValidator 'End If Try - LOGGER.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT}]...") + Logger.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT}]...") CURRENT_DOC_CREATION_DATE = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) If ex.Message.Contains("Variable: " & INDEX_DMS_ERSTELLT & " not found!") Then - LOGGER.Info("1. Ausnahme in Windream_get_Doc_info: Variable: " & INDEX_DMS_ERSTELLT & " not found", True) - LOGGER.Info("1. Ausnahme-Fehler: " & ex.Message) + Logger.Info("1. Ausnahme in Windream_get_Doc_info: Variable: " & INDEX_DMS_ERSTELLT & " not found", True) + Logger.Info("1. Ausnahme-Fehler: " & ex.Message) If INDEX_DMS_ERSTELLT = "DMS Created" Then INDEX_DMS_ERSTELLT = "DMS erstellt" @@ -2568,20 +2574,20 @@ Public Class frmValidator CURRENT_DOC_CREATION_DATE = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT) Else - LOGGER.Info("error in Windream_get_Doc_info 1: " & ex.Message) + Logger.Info("error in Windream_get_Doc_info 1: " & ex.Message) Return "error in Windream_get_Doc_info 1: " & ex.Message End If End Try - LOGGER.Debug("DMS-Erstellt aus WD: " & CURRENT_DOC_CREATION_DATE) + Logger.Debug("DMS-Erstellt aus WD: " & CURRENT_DOC_CREATION_DATE) Try - LOGGER.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT_ZEIT}]...") + Logger.Debug($"GetVariableValue [{INDEX_DMS_ERSTELLT_ZEIT}]...") CURRENT_DOC_CREATION_TIME = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT_ZEIT) Catch ex As Exception If ex.Message.Contains("Variable: " & INDEX_DMS_ERSTELLT_ZEIT & " not found!") Then - LOGGER.Info("1. Ausnahme in Windream_get_Doc_info: Variable: " & INDEX_DMS_ERSTELLT_ZEIT & " not found", True) + Logger.Info("1. Ausnahme in Windream_get_Doc_info: Variable: " & INDEX_DMS_ERSTELLT_ZEIT & " not found", True) If INDEX_DMS_ERSTELLT = "DMS Created" Then INDEX_DMS_ERSTELLT = "DMS erstellt" @@ -2603,16 +2609,16 @@ Public Class frmValidator 'SaveMySettingsValue("IDX_DMS_ERSTELLT", "DMS Created") 'SaveMySettingsValue("IDX_DMS_ERSTELLT_ZEIT", "DMS Created Time") End If - LOGGER.Debug($"GetVariableValue (2) [{INDEX_DMS_ERSTELLT_ZEIT}]...") + Logger.Debug($"GetVariableValue (2) [{INDEX_DMS_ERSTELLT_ZEIT}]...") CURRENT_DOC_CREATION_TIME = CURRENT_WMFILE.GetVariableValue(INDEX_DMS_ERSTELLT_ZEIT) Else - LOGGER.Error(ex) - LOGGER.Info("error in Windream_get_Doc_info 3: " & ex.Message) + Logger.Error(ex) + Logger.Info("error in Windream_get_Doc_info 3: " & ex.Message) Return "error in Windream_get_Doc_info 3: " & ex.Message End If End Try - LOGGER.Debug("DMSErstelltZeit aus WD: " & CURRENT_DOC_CREATION_TIME) + Logger.Debug("DMSErstelltZeit aus WD: " & CURRENT_DOC_CREATION_TIME) If CURRENT_DOC_CREATION_TIME.Length > 11 Then CURRENT_DOC_CREATION_DATE = CURRENT_DOC_CREATION_DATE & " " & CURRENT_DOC_CREATION_TIME.Substring(10) @@ -2622,8 +2628,8 @@ Public Class frmValidator Return "" Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("error in Windream_get_Doc_info (GENERELL): " & ex.Message) + Logger.Error(ex) + Logger.Info("error in Windream_get_Doc_info (GENERELL): " & ex.Message) Return "error in Windream_get_Doc_info (GENERELL): " & ex.Message End Try @@ -2800,9 +2806,9 @@ Public Class frmValidator If value Is Nothing Then value = "" Return value Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("error in ReturnVektor_IndexValue: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) - LOGGER.Info("error in ReturnVektor_IndexValue: " & ex.Message) + Logger.Info("error in ReturnVektor_IndexValue: " & ex.Message) Return "" End Try @@ -2816,12 +2822,12 @@ Public Class frmValidator If IDB_ACTIVE = False Then oValuefromSource = CURRENT_WMFILE.GetVariableValue(oSourceIndexName) Else - LOGGER.Debug($"GetVariableValuefromSource - IDBCase...") + Logger.Debug($"GetVariableValuefromSource - IDBCase...") oValuefromSource = IDBData.GetVariableValue(oSourceIndexName, oIDBTyp, FromIDB) End If Return oValuefromSource Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) Return Nothing End Try @@ -2865,7 +2871,7 @@ Public Class frmValidator oControName = oControl.Name Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE") - LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) + Logger.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) Select Case oControl.GetType() Case GetType(DevExpress.XtraEditors.TextEdit) If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/TextEdit") @@ -2883,7 +2889,7 @@ Public Class frmValidator If oLoadIndex = False Or oSourceIndexName = "DD PM-ONLY FOR DISPLAY" Then ' Wenn kein Index exisitiert, defaultValue laden oTextBox.EditValue = oDefaultValue - LOGGER.Debug("Indexwert soll nicht geladen werden.") + Logger.Debug("Indexwert soll nicht geladen werden.") Exit Select End If @@ -2898,19 +2904,19 @@ Public Class frmValidator oValueFromSource = "" Else If oValueFromSource.ToString = "System.Object[]" Then - LOGGER.Debug("TextBox with VektorField: " & oSourceIndexName) + Logger.Debug("TextBox with VektorField: " & oSourceIndexName) Try - LOGGER.Debug($"Length of Vektorarray: {oValueFromSource.length}") + Logger.Debug($"Length of Vektorarray: {oValueFromSource.length}") Catch ex As Exception - LOGGER.Info($"Error in gettin the lenth of vektorfield {oSourceIndexName} - {ex.Message}") + Logger.Info($"Error in gettin the lenth of vektorfield {oSourceIndexName} - {ex.Message}") End Try If oValueFromSource.length = 1 Then oValueFromSource = oValueFromSource(0) Else ' - LOGGER.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") oValueFromSource = oValueFromSource(0) End If - LOGGER.Debug($"wertWD has been saved...") + Logger.Debug($"wertWD has been saved...") End If End If @@ -2949,8 +2955,8 @@ Public Class frmValidator End If End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in Set Backcolor [{oControl.Name}]: {ex.Message}") - LOGGER.Error(ex) + Logger.Warn($"Unexpected error in Set Backcolor [{oControl.Name}]: {ex.Message}") + Logger.Error(ex) End Try @@ -2958,20 +2964,20 @@ Public Class frmValidator Catch ex As Exception - LOGGER.Info("Error While converting defaultValue [" & oDefaultValue & "]: " & ex.Message) + Logger.Info("Error While converting defaultValue [" & oDefaultValue & "]: " & ex.Message) oTextBox.EditValue = "" End Try End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) errormessage = $"Unvorhergesehener Fehler bei FillIndexValues TextBox [{oControl.Name}]:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" My.Settings.Save() frmError.ShowDialog() - LOGGER.Info("Unexpected error in FillIndexValuesTextBox: " & ex.Message, True) - LOGGER.Info(">> Controltype: " & oControlType) - LOGGER.Info(">> Indexname windream: " & oIndexName) + Logger.Info("Unexpected error in FillIndexValuesTextBox: " & ex.Message, True) + Logger.Info(">> Controltype: " & oControlType) + Logger.Info(">> Indexname windream: " & oIndexName) Exit Sub End Try @@ -2992,7 +2998,7 @@ Public Class frmValidator Else oMyCombobox.Text = oDefaultValue End If - LOGGER.Debug($" oMyComboBox {oMyCombobox.Name}: Indexwert soll nicht geladen werden.") + Logger.Debug($" oMyComboBox {oMyCombobox.Name}: Indexwert soll nicht geladen werden.") Exit Select End If @@ -3004,53 +3010,53 @@ Public Class frmValidator If oValueFromSource Is Nothing Then - LOGGER.Debug($"oMyComboBox {oMyCombobox.Name} - Indexvalue from index {oSourceIndexName}: Nothing") + Logger.Debug($"oMyComboBox {oMyCombobox.Name} - Indexvalue from index {oSourceIndexName}: Nothing") If oDefaultValue = String.Empty Then - LOGGER.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wurde nicht gefunden") + Logger.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wurde nicht gefunden") oMyCombobox.SelectedIndex = -1 Else - LOGGER.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wird geladen") + Logger.Debug($"oMyComboBox {oMyCombobox.Name}-defaultValue wird geladen") oMyCombobox.Text = oDefaultValue 'cmb.SelectedIndex = cmb.FindStringExact(defaultValue) End If Else If oValueFromSource.ToString = "System.Object[]" Then - LOGGER.Debug($"oMyComboBox {oMyCombobox.Name} - Combobox with VektorField: " & oSourceIndexName) + Logger.Debug($"oMyComboBox {oMyCombobox.Name} - Combobox with VektorField: " & oSourceIndexName) Try - LOGGER.Debug($"Length of Vektorarray: {oValueFromSource.length}") + Logger.Debug($"Length of Vektorarray: {oValueFromSource.length}") Catch ex As Exception - LOGGER.Info($"Error in gettin the length of vektorfield {oSourceIndexName} - {ex.Message}") + Logger.Info($"Error in gettin the length of vektorfield {oSourceIndexName} - {ex.Message}") End Try If oValueFromSource.length = 1 Then oValueFromSource = oValueFromSource(0) Else ' - LOGGER.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") oValueFromSource = oValueFromSource(0) End If - LOGGER.Debug($"wertWD has been saved...") + Logger.Debug($"wertWD has been saved...") Else End If - LOGGER.Debug($"Indexwert from Index {oSourceIndexName}: {oValueFromSource}") - LOGGER.Debug($"Items in Combobox: {oMyCombobox.Items.Count}") + Logger.Debug($"Indexwert from Index {oSourceIndexName}: {oValueFromSource}") + Logger.Debug($"Items in Combobox: {oMyCombobox.Items.Count}") If oMyCombobox.Items.Count = 0 Then - ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde gesetzt") + ' If LogErrorsOnly = False Then Logger.Info($"Index Wert wurde gesetzt") oMyCombobox.Text = oValueFromSource Else - ' If LogErrorsOnly = False Then LOGGER.Info($"Index Wert wurde ausgewählt") + ' If LogErrorsOnly = False Then Logger.Info($"Index Wert wurde ausgewählt") oMyCombobox.SelectedIndex = oMyCombobox.FindStringExact(oValueFromSource) - LOGGER.Debug($"oMyComboBox {oMyCombobox.Name} .SelectedIndex: {oMyCombobox.SelectedIndex}") + Logger.Debug($"oMyComboBox {oMyCombobox.Name} .SelectedIndex: {oMyCombobox.SelectedIndex}") End If End If End If - LOGGER.Debug("") + Logger.Debug("") Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(">> Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & ex.Message, True) - LOGGER.Info(">> Controltype: " & oControlType) - LOGGER.Info(">> Indexname windream: " & oIndexName) + Logger.Error(ex) + Logger.Info(">> Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & ex.Message, True) + Logger.Info(">> Controltype: " & oControlType) + Logger.Info(">> Indexname windream: " & oIndexName) errormessage = "Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & vbNewLine & ex.Message & vbNewLine & "Check Logfile" My.Settings.Save() frmError.ShowDialog() @@ -3070,16 +3076,16 @@ Public Class frmValidator End If If oSourceIndexName Is Nothing = False Then If oLoadIndex = False Then - LOGGER.Debug("Indexwert soll nicht geladen werden.") + Logger.Debug("Indexwert soll nicht geladen werden.") Exit Select End If - LOGGER.Debug($"getting Value for Attribute [{oSourceIndexName}] - oIDBTyp [{oIDBTyp}] - oIDBOverride [{oIDBOverride}]...") + Logger.Debug($"getting Value for Attribute [{oSourceIndexName}] - oIDBTyp [{oIDBTyp}] - oIDBOverride [{oIDBOverride}]...") ' Dim wertWD = CURRENT_WMFILE.GetVariableValue(oSourceIndexName) oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) If oValueFromSource Is Nothing = False Then Dim oValueType = oValueFromSource.GetType.ToString - LOGGER.Debug($"oValueType is [{oValueType}]!") + Logger.Debug($"oValueType is [{oValueType}]!") 'Es wird gegen ein Vektorfeld nachindexiert If oValueType.Contains("System.Object") Or oValueType = "System.Data.DataTable" Or oValueType = "System.String" Then Select Case oTyp @@ -3089,44 +3095,44 @@ Public Class frmValidator DT_COLUMNS_GRID.Select(oExpression, "SEQUENCE").CopyToDataTable(oDTColumnsPerDevExGrid, LoadOption.PreserveChanges) Dim oColValuesfromSource As String() - LOGGER.Debug($"DevExpressGrid: {oDTColumnsPerDevExGrid.Rows.Count} Columns configured for control {oControlId}.") + Logger.Debug($"DevExpressGrid: {oDTColumnsPerDevExGrid.Rows.Count} Columns configured for control {oControlId}.") If oDTColumnsPerDevExGrid.Rows.Count >= 1 Then Dim oDataSource As DataTable = oMyGridControl.DataSource oDataSource.Rows.Clear() If IDB_ACTIVE = False Then - LOGGER.Debug("ValueFromSource contains {0} items", oValueFromSource) + Logger.Debug("ValueFromSource contains {0} items", oValueFromSource) For Each Zeile As Object In oValueFromSource - LOGGER.Debug($"vektorrow Value {Zeile.ToString}...") + Logger.Debug($"vektorrow Value {Zeile.ToString}...") oColValuesfromSource = Split(Zeile, PMDelimiter) Dim oNewRow = oDataSource.NewRow() - LOGGER.Debug("Creating new row..") + Logger.Debug("Creating new row..") For index = 0 To oDTColumnsPerDevExGrid.Rows.Count - 1 - LOGGER.Debug("Column Index {0}", index) + Logger.Debug("Column Index {0}", index) If oColValuesfromSource.Length > index Then - LOGGER.Debug("Value: {0}", oColValuesfromSource(index)) + Logger.Debug("Value: {0}", oColValuesfromSource(index)) oNewRow.Item(index) = oColValuesfromSource(index) Else - LOGGER.Debug("Value: String.Empty") + Logger.Debug("Value: String.Empty") oNewRow.Item(index) = String.Empty End If Next - LOGGER.Debug("Adding row to grid..") + Logger.Debug("Adding row to grid..") oDataSource.Rows.Add(oNewRow) Next Else If oValueType = "System.String" Then - LOGGER.Debug($"IDB Fill Grid [{oControl.Name}] with String") - LOGGER.Debug($"oValueFromSource [{oValueFromSource}] - PMDelimiter[{PMDelimiter}]") + Logger.Debug($"IDB Fill Grid [{oControl.Name}] with String") + Logger.Debug($"oValueFromSource [{oValueFromSource}] - PMDelimiter[{PMDelimiter}]") oColValuesfromSource = Split(oValueFromSource.ToString, PMDelimiter) If oColValuesfromSource.Length > 8 Then - LOGGER.Warn("Fill Grid Error - Max 8 columns can be configured!") + Logger.Warn("Fill Grid Error - Max 8 columns can be configured!") End If Dim oRowData As New List(Of Object) @@ -3142,14 +3148,14 @@ Public Class frmValidator ElseIf oValueType = "System.Data.DataTable" Then Dim oMyDatatable As DataTable = oValueFromSource - LOGGER.Debug($"IDB Fill Grid [{oControl.Name}] with Datatable - Rows: " & oMyDatatable.Rows.Count) + Logger.Debug($"IDB Fill Grid [{oControl.Name}] with Datatable - Rows: " & oMyDatatable.Rows.Count) For Each oRow As DataRow In oMyDatatable.Rows - LOGGER.Debug($"IDB ROW Vector {oRow.Item(0).ToString}...") + Logger.Debug($"IDB ROW Vector {oRow.Item(0).ToString}...") oColValuesfromSource = Split(oRow.Item(0).ToString, PMDelimiter) 'If USER_USERNAME.ToLower = "'marscheiber" Then MsgBox($"IDB ROW Vector {oRow.Item(0).ToString}...") If oColValuesfromSource.Length > 8 Then - LOGGER.Warn("Fill Grid with DatatableSplit Error - Max 8 columns can be configured!") + Logger.Warn("Fill Grid with DatatableSplit Error - Max 8 columns can be configured!") End If Dim oRowData As New List(Of Object) @@ -3183,7 +3189,7 @@ Public Class frmValidator Next End Select Else - LOGGER.Warn($"Could not load Devexpress.Grid [{oControl.Name }] as omytype is [{oValueType}]!") + Logger.Warn($"Could not load Devexpress.Grid [{oControl.Name }] as omytype is [{oValueType}]!") End If @@ -3219,11 +3225,11 @@ Public Class frmValidator ' RestoreDevExpressGridControl_Layout(CURRENT_CLICKED_PROFILE_ID, oControlId, oMyGridView) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try End If Case GetType(System.Windows.Forms.CheckBox) - LOGGER.Debug("Loading checkbox...") + Logger.Debug("Loading checkbox...") oControlType = "CheckBox" If oSourceIndexName = "" Then MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) @@ -3234,47 +3240,47 @@ Public Class frmValidator Dim myCheckBox As CheckBox = oControl If oLoadIndex = False Or oSourceIndexName = "DD PM-ONLY FOR DISPLAY" Then - LOGGER.Debug("Indexwert soll nicht geladen werden.") + Logger.Debug("Indexwert soll nicht geladen werden.") End If - LOGGER.Debug("Loading Bool-Value from Source...") + Logger.Debug("Loading Bool-Value from Source...") If oSourceIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then oValueFromSource = ReturnVektor_IndexValue(oSourceIndexName) Else Try - LOGGER.Debug($"..Now GetVariableValue({oSourceIndexName})...") + Logger.Debug($"..Now GetVariableValue({oSourceIndexName})...") oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) Catch ex As Exception - LOGGER.Warn($"Could not get the windreamValue for CheckboxIndex: {oSourceIndexName} [{ex.Message}]") + Logger.Warn($"Could not get the windreamValue for CheckboxIndex: {oSourceIndexName} [{ex.Message}]") End Try End If If oValueFromSource Is Nothing Then - LOGGER.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue") - LOGGER.Debug(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue") + Logger.Info(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue") + Logger.Debug(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Checking defaultvalue") If oDefaultValue <> String.Empty Then - LOGGER.Info($"Using Default value [{oDefaultValue}]") - LOGGER.Debug($"Using Default value [{oDefaultValue}]") + Logger.Info($"Using Default value [{oDefaultValue}]") + Logger.Debug($"Using Default value [{oDefaultValue}]") myCheckBox.Checked = CBool(oDefaultValue) Exit Select Else - LOGGER.Debug("No Default Value for Checkbox - so using false!") + Logger.Debug("No Default Value for Checkbox - so using false!") myCheckBox.CheckState = CheckState.Indeterminate End If Else - LOGGER.Debug("oValueFromSource: " & oValueFromSource.ToString) + Logger.Debug("oValueFromSource: " & oValueFromSource.ToString) If oValueFromSource.ToString = "" Then - LOGGER.Info(">> Versuch, default Value zu laden") + Logger.Info(">> Versuch, default Value zu laden") If oDefaultValue <> String.Empty Then Dim result = False If Boolean.TryParse(oDefaultValue, result) Then - LOGGER.Info(">> defaultValue wurde geladen") + Logger.Info(">> defaultValue wurde geladen") myCheckBox.Checked = result If result = False Then myCheckBox.CheckState = CheckState.Unchecked @@ -3287,38 +3293,38 @@ Public Class frmValidator myCheckBox.CheckState = CheckState.Unchecked End If Else - LOGGER.Info(">> defaultValue war leer") + Logger.Info(">> defaultValue war leer") myCheckBox.Checked = False myCheckBox.CheckState = CheckState.Unchecked End If Else Dim _value If oValueFromSource.ToString = "System.Object[]" Then - LOGGER.Debug("CheckBoxValue with VectorField: " & oSourceIndexName) + Logger.Debug("CheckBoxValue with VectorField: " & oSourceIndexName) If oValueFromSource.length = 1 Then _value = oValueFromSource(0) Else ' - LOGGER.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oSourceIndexName & "' contains more then one value - First value will be used") _value = oValueFromSource(0) End If Else _value = oValueFromSource - LOGGER.Debug($"Value is not nothing and also not System.Object: [{_value}]") + Logger.Debug($"Value is not nothing and also not System.Object: [{_value}]") End If Try Select Case CBool(_value) Case True - LOGGER.Debug(">> CBool(_value) = True") + Logger.Debug(">> CBool(_value) = True") myCheckBox.Checked = True myCheckBox.CheckState = CheckState.Checked Case False - LOGGER.Debug(">> CBool(_value) = False") + Logger.Debug(">> CBool(_value) = False") myCheckBox.Checked = False myCheckBox.CheckState = CheckState.Unchecked End Select Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected error in CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString, True) + Logger.Error(ex) + Logger.Info("Unexpected error in CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString, True) myCheckBox.Checked = False myCheckBox.CheckState = CheckState.Unchecked End Try @@ -3372,8 +3378,8 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & oIndexName & " - Fehler: " & vbNewLine & ex.Message) + Logger.Error(ex) + Logger.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & oIndexName & " - Fehler: " & vbNewLine & ex.Message) MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl3:") End Try @@ -3388,10 +3394,10 @@ Public Class frmValidator Try If oSourceIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then - LOGGER.Debug("DATE über PM-Vektor holen") + Logger.Debug("DATE über PM-Vektor holen") oValueFromSource = ReturnVektor_IndexValue(oSourceIndexName) - LOGGER.Info(">> DTP is """) + Logger.Info(">> DTP is """) Else oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) @@ -3402,23 +3408,23 @@ Public Class frmValidator If oValueFromSource.ToString.Length > 0 Then Try tempdate = CDate(oValueFromSource) - LOGGER.Debug("DATE konnte umgewandelt werden") + Logger.Debug("DATE konnte umgewandelt werden") Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Debug("DATE wurde auf heute gesetzt") + Logger.Error(ex) + Logger.Debug("DATE wurde auf heute gesetzt") End Try DTP.Text = tempdate Else - LOGGER.Debug("DATE ist leer") + Logger.Debug("DATE ist leer") DTP.Text = tempdate End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message - LOGGER.Info("Unexpected error in FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString & vbNewLine & "Indexname: " & oSourceIndexName, True) + Logger.Info("Unexpected error in FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString & vbNewLine & "Indexname: " & oSourceIndexName, True) frmError.ShowDialog() - LOGGER.Info("Unexpected error in FillIndex DTP: " & ex.Message, True) + Logger.Info("Unexpected error in FillIndex DTP: " & ex.Message, True) End Try End If End Select @@ -3446,7 +3452,7 @@ Public Class frmValidator }) If Not IsNothing(oDTRESULT_FOR_COLUMN) Then - LOGGER.Debug($"Trying to create a DropDown(FIV) for CONTROL-ID [{oDEPENDING_CTRL_ID}] - RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ") + Logger.Debug($"Trying to create a DropDown(FIV) for CONTROL-ID [{oDEPENDING_CTRL_ID}] - RowCount: [{oDTRESULT_FOR_COLUMN.Rows.Count}] ") For Each oControl As Control In PanelValidatorControl.Controls Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid If oControlId = oDEPENDING_CTRL_ID Then @@ -3455,15 +3461,15 @@ Public Class frmValidator End If Next Else - LOGGER.Warn($"FillIndexValues - oDTRESULT_FOR_COLUMN is nothing!") + Logger.Warn($"FillIndexValues - oDTRESULT_FOR_COLUMN is nothing!") End If Catch ex As Exception - LOGGER.Warn($"FillIndexValues - Unexpected error in creating Grid-Dropdown-Column [{oDEPENDING_COLUMN}] for CONTROL-ID [{oDEPENDING_CTRL_ID}]: " & ex.Message) + Logger.Warn($"FillIndexValues - Unexpected error in creating Grid-Dropdown-Column [{oDEPENDING_COLUMN}] for CONTROL-ID [{oDEPENDING_CTRL_ID}]: " & ex.Message) End Try Next Catch ex As Exception - LOGGER.Warn($"FillIndexValues - Unexpected error in creating dropdown for Grid: " & ex.Message) + Logger.Warn($"FillIndexValues - Unexpected error in creating dropdown for Grid: " & ex.Message) End Try If LOG_PERF Then PerformanceLogger.Info("FillIndexValues/Postload") @@ -3522,15 +3528,15 @@ Public Class frmValidator End If RibbonPageGroup2.Visible = True Else - LOGGER.Debug($"No PM_Info-Configuration!!") + Logger.Debug($"No PM_Info-Configuration!!") RibbonPageGroup2.Visible = False End If Else - LOGGER.Warn($"oDTINFO is nothing!!") + Logger.Warn($"oDTINFO is nothing!!") RibbonPageGroup2.Visible = False End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in Setting PMINFO - ERROR: {ex.Message}") + Logger.Warn($"Unexpected error in Setting PMINFO - ERROR: {ex.Message}") RibbonPageGroup2.Visible = False End Try @@ -3564,7 +3570,7 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}") + Logger.Warn($"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}") errormessage = "Unvorhergesehener Fehler bei FillIndexValues:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" My.Settings.Save() frmError.ShowDialog() @@ -3622,22 +3628,22 @@ Public Class frmValidator End If Else - LOGGER.Warn($"### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###") + Logger.Warn($"### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###") End If End If Catch ex As Exception - LOGGER.Warn($"### Error Dis/Enabale Export2Path: {ex.Message} !###") + Logger.Warn($"### Error Dis/Enabale Export2Path: {ex.Message} !###") End Try End If End If End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try - LOGGER.Debug("frmValidation_Shown finished!") + Logger.Debug("frmValidation_Shown finished!") End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click btnSave.Enabled = False @@ -3656,10 +3662,10 @@ Public Class frmValidator Where TypeOf oControl Is GridControl Select oControl).ToList() - LOGGER.Debug("Forcing grid Validation") + Logger.Debug("Forcing grid Validation") For Each oGrid As GridControl In oGrids - LOGGER.Debug("Validating Grid [{0}]", oGrid.Name) + Logger.Debug("Validating Grid [{0}]", oGrid.Name) Dim oView As GridView = oGrid.MainView @@ -3671,7 +3677,7 @@ Public Class frmValidator oValidation = False End If - LOGGER.Debug("Validation of Grid [{0}] ended with Result: [{1}]", oGrid.Name, oValidation) + Logger.Debug("Validation of Grid [{0}] ended with Result: [{1}]", oGrid.Name, oValidation) If oValidation = False Then Return False @@ -3720,7 +3726,7 @@ Public Class frmValidator Dim oMsgType Dim oQuestion Dim oTitle - LOGGER.Debug("## btnFinish_continue ##") + Logger.Debug("## btnFinish_continue ##") Try oMsgType = oDT_ACTIONS?.Rows(0).Item("MsgType") Catch ex As Exception @@ -3730,7 +3736,7 @@ Public Class frmValidator Try oQuestion = oDT_ACTIONS?.Rows(0).Item("Question") Catch ex As Exception - LOGGER.Warn($"btnFinishContinue - No QUESTION-Column in select-Result!") + Logger.Warn($"btnFinishContinue - No QUESTION-Column in select-Result!") oQuestion = "" End Try Try @@ -3738,7 +3744,7 @@ Public Class frmValidator Catch ex As Exception oTitle = "" End Try - LOGGER.Debug($"Case is: [{oMsgType.ToString.ToUpper}]") + Logger.Debug($"Case is: [{oMsgType.ToString.ToUpper}]") Select Case oMsgType.ToString.ToUpper Case "MsgboxResult".ToUpper @@ -3767,18 +3773,18 @@ Public Class frmValidator Return True Case Else MsgBox($"No valid action provided [{oMsgType}] in btnFinishContinue - Check Your log and inform the WorkflowTeam", MsgBoxStyle.Exclamation, "") - LOGGER.Warn($"No valid action provided [{oMsgType}] in btnFinishContinue!") + Logger.Warn($"No valid action provided [{oMsgType}] in btnFinishContinue!") Return False End Select Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("An unhandled exeception occured in btnFinish Procedure! Please inform Your WorkflowTeam and Check Your log!" & vbNewLine & ex.Message, MsgBoxStyle.Critical) Return False End Try End Function Sub Finish_WFStep(Optional includeFI As Boolean = True) btnSave.Enabled = False - LOGGER.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet") + Logger.Debug("Abschluss für Dok: " & CURRENT_DOC_PATH & " gestartet") _ItemWorked = True Dim oErrorOcurred As Boolean = False If OverrideAll = False Then @@ -3801,18 +3807,18 @@ Public Class frmValidator If oDTFinalIndexing?.Rows.Count > 0 Then 'Jetzt finale Indexe setzen - LOGGER.Debug("FINAL INDEXING STARTING...") + Logger.Debug("FINAL INDEXING STARTING...") For Each oFinalIndexRow As DataRow In oDTFinalIndexing.Rows Dim oValue As String = oFinalIndexRow.Item("VALUE").ToString Dim oFinalIndex = oFinalIndexRow.Item("INDEXNAME") - LOGGER.Debug($"Working on final index [{oFinalIndex}]...") + Logger.Debug($"Working on final index [{oFinalIndex}]...") Dim oContinueOnIndifferentState As Boolean = CBool(oFinalIndexRow.Item("CONTINUE_INDETERMINED")) Dim oIndexType = 0 If IDB_ACTIVE = False Then oIndexType = WINDREAM_MOD.GetIndexType(oFinalIndexRow.Item("INDEXNAME")) End If If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ### - LOGGER.Debug("Indexing wih dynamic sql...") + Logger.Debug("Indexing wih dynamic sql...") Dim oGUID = oFinalIndexRow.Item("GUID") Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND") Dim oConnectionID = oFinalIndexRow.Item("CONNECTION_ID") @@ -3827,7 +3833,7 @@ Public Class frmValidator If Not IsNothing(oSQLCommand) Then Dim oResultfromSQL As Object = DatabaseFallback.GetScalarValueWithConnection(oSQLCommand, oConnectionID) If Not IsNothing(oResultfromSQL) Then - LOGGER.Debug($"oResultfromSQL is [{oResultfromSQL.ToString}]") + Logger.Debug($"oResultfromSQL is [{oResultfromSQL.ToString}]") If IsDBNull(oResultfromSQL) Then If oContinueOnIndifferentState = False Then errormessage = "Result from SQL is DBNull - Check the SQL and the log" @@ -3836,7 +3842,7 @@ Public Class frmValidator oErrorOcurred = True _ItemWorked = False Else - LOGGER.Warn($"FinalIndexResult from SQL is DBNull - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, Continuing with next Attribute and Replacing with empty String") + Logger.Warn($"FinalIndexResult from SQL is DBNull - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, Continuing with next Attribute and Replacing with empty String") oResultfromSQL = "" Continue For End If @@ -3850,13 +3856,13 @@ Public Class frmValidator oErrorOcurred = True _ItemWorked = False Else - LOGGER.Warn($"FinalIndexResult from SQL is EmptyValue - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, So continuing with next Attribute") + Logger.Warn($"FinalIndexResult from SQL is EmptyValue - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, So continuing with next Attribute") Continue For End If End If oValue = oResultfromSQL Else - LOGGER.Warn("ATTENTION: DYNAMIC VALUE IS NOTHING!") + Logger.Warn("ATTENTION: DYNAMIC VALUE IS NOTHING!") Continue For End If End If @@ -3881,13 +3887,13 @@ Public Class frmValidator ReDim Preserve oResult(0) oResult(0) = oValue - LOGGER.Debug($"oIndexType {oIndexType.ToString}") + Logger.Debug($"oIndexType {oIndexType.ToString}") If oIndexType > 4000 And oIndexType < 5000 Then 'If dr.Item("INDEXNAME").ToString.StartsWith("[%VKT") Then ' Dim PM_String = Return_PM_VEKTOR(value, dr.Item("INDEXNAME")) 'Hier muss nun separat as Vektorfeld indexiert werden If WMIndexVectofield(oValue, oFinalIndexRow.Item("INDEXNAME"), oFinalIndexRow.Item("PREVENT_DUPLICATES"), oFinalIndexRow.Item("ALLOW_NEW_VALUES")) = False Then - LOGGER.Debug("Final Vektorindex '" & oFinalIndexRow.Item("INDEXNAME").ToString & "' has beens et suxxessfully!") + Logger.Debug("Final Vektorindex '" & oFinalIndexRow.Item("INDEXNAME").ToString & "' has beens et suxxessfully!") Else errormessage = "Error in final indexing:" & vbNewLine & idxerr_message My.Settings.Save() @@ -3896,17 +3902,17 @@ Public Class frmValidator _ItemWorked = False End If Else - LOGGER.Debug("Now the final indexing...") + Logger.Debug("Now the final indexing...") If oValue.ToUpper = "SQL-Command".ToUpper Then MsgBox("Something went wrong while final-indexing. Check Your log and inform the admin-team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) - LOGGER.Warn("Something went wrong while final-indexing") + Logger.Warn("Something went wrong while final-indexing") Exit For End If Dim oFIResult As Boolean = False If IDB_ACTIVE = False Then If Indexiere_File(CURRENT_WMFILE, oFinalIndexRow.Item("INDEXNAME"), oResult) = True Then oFIResult = True - LOGGER.Debug("FINALER INDEX '" & oFinalIndexRow.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT") + Logger.Debug("FINALER INDEX '" & oFinalIndexRow.Item("INDEXNAME") & "' WURDE ERFOLGREICH GESETZT") 'Nun das Logging If PROFIL_LOGINDEX <> "" Then @@ -3917,7 +3923,7 @@ Public Class frmValidator Else If IDBData.SetVariableValue(oFinalIndexRow.Item("INDEXNAME"), oValue) = True Then oFIResult = True - LOGGER.Debug($"Final index IDB '{oFinalIndexRow.Item("INDEXNAME")}' was updated with [{oValue.ToString}]") + Logger.Debug($"Final index IDB '{oFinalIndexRow.Item("INDEXNAME")}' was updated with [{oValue.ToString}]") End If End If If oFIResult = False Then @@ -3936,7 +3942,7 @@ Public Class frmValidator Next End If Catch ex As Exception - LOGGER.Warn($"Error in finalIndexing: {ex.Message}") + Logger.Warn($"Error in finalIndexing: {ex.Message}") oErrorOcurred = True End Try End If @@ -3955,7 +3961,7 @@ Public Class frmValidator WORK_HISTORY_ENTRY = Nothing End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) WORK_HISTORY_ENTRY = Nothing End Try @@ -3971,7 +3977,7 @@ Public Class frmValidator ' alle Vorkommen innerhalb der Namenkonvention durchlaufen For Each element As System.Text.RegularExpressions.Match In elemente Try - LOGGER.Debug("element in RegeX WORK_HISTORY_ENTRY: " & element.Value) + Logger.Debug("element in RegeX WORK_HISTORY_ENTRY: " & element.Value) Dim CTRL_ID = element.Value.Substring(2, element.Value.Length - 3) CTRL_ID = CTRL_ID.Replace("CTRLID", "") Dim value_from_control @@ -3992,7 +3998,7 @@ Public Class frmValidator Try value_from_control = oControl.Text Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) value_from_control = String.Empty End Try @@ -4001,7 +4007,7 @@ Public Class frmValidator Try value_from_control = cmb.Text Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) value_from_control = String.Empty End Try Case GetType(System.Windows.Forms.DateTimePicker) @@ -4009,7 +4015,7 @@ Public Class frmValidator Try value_from_control = dtp.Value.ToString Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) value_from_control = String.Empty End Try @@ -4018,7 +4024,7 @@ Public Class frmValidator Try value_from_control = chk.Checked Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) value_from_control = String.Empty End Try End Select @@ -4031,8 +4037,8 @@ Public Class frmValidator WORK_HISTORY_ENTRY = WORK_HISTORY_ENTRY.ToString.Replace(element.Value, value_from_control) End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message) + Logger.Error(ex) + Logger.Info("Unexpected Error in Checking control values for WORK_HISTORY_ENTRY - ERROR: " & ex.Message) End Try Next If WORK_HISTORY_ENTRY.ToString.Contains("@DATE") Then @@ -4095,13 +4101,13 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) errormessage = "Unexpected error in Finish:" & ex.Message My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True _ItemWorked = False - LOGGER.Info("Unexpected error in Finish: " & ex.Message, True) + Logger.Info("Unexpected error in Finish: " & ex.Message, True) Exit Sub End Try Else @@ -4114,7 +4120,7 @@ Public Class frmValidator Exit Sub End If Else - LOGGER.Info($"Overriding all in action for DocID: {CURRENT_DOC_ID} - ProfileID: {CURRENT_ProfilGUID}") + Logger.Info($"Overriding all in action for DocID: {CURRENT_DOC_ID} - ProfileID: {CURRENT_ProfilGUID}") If Override_SQLCommand <> "" Then If DatabaseFallback.ExecuteNonQueryECM(Override_SQLCommand) = False Then oErrorOcurred = True @@ -4125,10 +4131,10 @@ Public Class frmValidator MsgBox("Unhandled error occured ... please check your log!", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) _ItemWorked = False Else - LOGGER.Debug("Validation of document ended successfully!") + Logger.Debug("Validation of document ended successfully!") Dim oPROCSQL = $"EXEC PRPM_CHECK_NEXT_WF {CURRENT_DOC_GUID}" If DatabaseFallback.ExecuteNonQueryECM(oPROCSQL) = False Then - LOGGER.Warn($"Attention: Error executing proc {oPROCSQL}") + Logger.Warn($"Attention: Error executing proc {oPROCSQL}") End If End If @@ -4168,8 +4174,8 @@ Public Class frmValidator Dim Bezeichner As String = VKTBezeichner.Replace("[%VKT", "") PM_String = "DD-PM" & PMDelimiter & Bezeichner & PMDelimiter & input & PMDelimiter & USER_USERNAME & PMDelimiter & Now.ToString Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(">> error in Return_PM_VEKTOR: " & ex.Message, True) + Logger.Error(ex) + Logger.Info(">> error in Return_PM_VEKTOR: " & ex.Message, True) PM_String = "DD-PM ERROR: " & ex.Message End Try Return PM_String @@ -4185,8 +4191,8 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info(">> error in Return_LOGString: " & ex.Message, True) + Logger.Error(ex) + Logger.Info(">> error in Return_LOGString: " & ex.Message, True) PM_String = "DD-PM ERROR: " & ex.Message End Try Return PM_String @@ -4224,7 +4230,7 @@ Public Class frmValidator 'Jetzt die Datei indexieren If Indexiere_File(CURRENT_WMFILE, NameVKTIndex, oNewValue) = False Then oMissing = True - LOGGER.Info("Error while indexing Vektorfeld '" & NameVKTIndex & "' - ERROR: " & idxerr_message) + Logger.Info("Error while indexing Vektorfeld '" & NameVKTIndex & "' - ERROR: " & idxerr_message) oErrMsgMissingInput = "Error while indexing Vektorfeld '" & NameVKTIndex & "' - ERROR: " & idxerr_message End If End If @@ -4285,9 +4291,9 @@ Public Class frmValidator 'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist If oDBControlName = oControl.Name And oIndexName <> "DD PM-ONLY FOR DISPLAY" Then ' oSQLCheckCommand <> "") And - LOGGER.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'") + Logger.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'") If oIndexName = "" Then - LOGGER.Info(" >> Indexname is unexpected empty.") + Logger.Info(" >> Indexname is unexpected empty.") Continue For End If Select Case oControl.GetType @@ -4297,7 +4303,7 @@ Public Class frmValidator If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then oMissing = True oErrMsgMissingInput = $"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'" - LOGGER.Warn($"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'") + Logger.Warn($"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'") oControl.BackColor = Color.Red Exit For Else @@ -4325,7 +4331,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing von LookupGrid - ERROR: " & idxerr_message - LOGGER.Warn($"Error while indexing [{oIndexName}] von LookupGrid - ERROR: " & idxerr_message) + Logger.Warn($"Error while indexing [{oIndexName}] von LookupGrid - ERROR: " & idxerr_message) Exit For End If Else @@ -4334,7 +4340,7 @@ Public Class frmValidator If IDBData.SetVariableValue(oIndexName, oMyDT, oOVERWRITE_DATA, oIDBTyp) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing IDB-Object LookupGrid" - LOGGER.Warn($"Error while indexing IDB-Object LookupGrid [{oIndexName}] ") + Logger.Warn($"Error while indexing IDB-Object LookupGrid [{oIndexName}] ") Exit For End If End If @@ -4344,7 +4350,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, oValues.ToArray) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing von LookupGrid - ERROR: " & idxerr_message - LOGGER.Warn($"Error while indexing LookupGrid [{oIndexName}] ") + Logger.Warn($"Error while indexing LookupGrid [{oIndexName}] ") Exit For End If Else @@ -4363,7 +4369,7 @@ Public Class frmValidator If IsNothing(oMyInput) And oIsRequired = True Then oMissing = True oErrMsgMissingInput = $"Could not get FirstOrDefault-Value of LookUpGrid! - LookUPGridName: {lookup.Name}" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For ElseIf IsNothing(oMyInput) And oIsRequired = False Then For Each ochangedLookub In listChangedLookup @@ -4389,7 +4395,7 @@ Public Class frmValidator If oValueFromObject.Length = 1 Then oValueFromObject = oValueFromObject(0) Else ' - LOGGER.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") oValueFromObject = oValueFromObject(0) End If End If @@ -4399,26 +4405,26 @@ Public Class frmValidator End If If IsNothing(oValueFromObject) Then - LOGGER.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is NOTHING!") + Logger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is NOTHING!") oValueIsIndifferent = True End If If oValueIsIndifferent = False Then If IsDBNull(oValueFromObject) Then - LOGGER.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is DBNULL!") + Logger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is DBNULL!") oValueIsIndifferent = True End If End If Dim oValueSourceIsDifferent As Boolean = False If oValueIsIndifferent = False Then - LOGGER.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]") + Logger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]") Try If oValueFromObject <> oMyInput Then oValueSourceIsDifferent = True - LOGGER.Debug($"CheckUpdateIndex.LookUpGrid: There is a difference between oValueFromObject and [{oValueFromObject}]") + Logger.Debug($"CheckUpdateIndex.LookUpGrid: There is a difference between oValueFromObject and [{oValueFromObject}]") End If Catch ex As Exception oValueSourceIsDifferent = True - LOGGER.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object") + Logger.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object") End Try Else @@ -4435,7 +4441,7 @@ Public Class frmValidator If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing Textbox as VEKTOR - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4446,7 +4452,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing Textbox - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4472,21 +4478,25 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Case GetType(DevExpress.XtraEditors.TextEdit) + + Try 'Dim oWrongInputMessage = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmValidator.WrongInputControl") Dim oWrongInputMessage = S.Falsche_Eingabe + + If oRegexMatch <> String.Empty AndAlso Not Regex.IsMatch(oControl.Text, oRegexMatch) Then oMissing = True oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) If oRegexMessage <> String.Empty Then oErrMsgMissingInput &= ":" & vbCrLf & oRegexMessage End If @@ -4499,7 +4509,7 @@ Public Class frmValidator If Check_Missing_Control_Value(oControl, "txt") = True And oIsRequired = True Then 'NICHTS EINGETRAGEN oMissing = True oErrMsgMissingInput = oWrongInputMessage & " textbox '" & oControl.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) oControl.BackColor = Color.Red Exit For Else @@ -4519,7 +4529,7 @@ Public Class frmValidator If oSourceValue.Length = 1 Then oSourceValue = oSourceValue(0) Else ' - LOGGER.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") oSourceValue = oSourceValue(0) End If End If @@ -4555,7 +4565,7 @@ Public Class frmValidator If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing textbox as VEKTOR - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4566,7 +4576,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing Textbox - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4593,27 +4603,27 @@ Public Class frmValidator End If Catch ex As Exception oErrMsgMissingInput = "Unexpected error in Check_UpdateIndexe TextBox '" & oControl.Name & "' - Check the log" - LOGGER.Error(ex) + Logger.Error(ex) Dim st As New StackTrace(True) st = New StackTrace(ex, True) - LOGGER.Warn("Unexpected error in Check_UpdateIndexe TextBox :" & ex.Message, True) + Logger.Warn("Unexpected error in Check_UpdateIndexe TextBox :" & ex.Message, True) Return False End Try Case GetType(System.Windows.Forms.ComboBox) Try - LOGGER.Debug($"Working on Combobox...") + Logger.Debug($"Working on Combobox...") Dim cmb As Windows.Forms.ComboBox = oControl 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If cmb.SelectedIndex = -1 And oIsRequired = True Then oMissing = True oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For 'ElseIf cmb.SelectedIndex <> -1 Then Else 'Änderung 28.08.2018: Ein leerer Wert in der Combobox wird in den Index geschrieben oMyInput = cmb.Text - LOGGER.Debug($"inputvalue Combobox: {cmb.Text}") + Logger.Debug($"inputvalue Combobox: {cmb.Text}") Dim oValue 'den aktuellen Wert in windream auslesen If oIndexName.StartsWith("[%VKT") Then @@ -4622,7 +4632,7 @@ Public Class frmValidator oValue = GetVariableValuefromSource(oIndexName, oIDBTyp) End If If IsNothing(oValue) Then - LOGGER.Debug($"oValue is nothing...Value EmptyString will be used") + Logger.Debug($"oValue is nothing...Value EmptyString will be used") oValue = String.Empty End If Dim oIndexType As String = "Index" @@ -4631,31 +4641,31 @@ Public Class frmValidator oIndexType = "Vector" End If Catch ex As Exception - LOGGER.Debug($"Exception while oValue.ToString = System.Object[]...") + Logger.Debug($"Exception while oValue.ToString = System.Object[]...") End Try If oIndexType = "Vector" Then - LOGGER.Debug($"Control with ID{oControlId} is a vectorfield...") + Logger.Debug($"Control with ID{oControlId} is a vectorfield...") If oValue.Length = 1 Then oValue = oValue(0).ToString Else ' - LOGGER.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") oValue = oValue(0).ToString End If Else - LOGGER.Debug($"oValue is a regular item...") + Logger.Debug($"oValue is a regular item...") Dim oitsadifference As Boolean = False Try If oValue.ToString <> oMyInput.ToString Then oitsadifference = True End If Catch ex As Exception - LOGGER.Warn($"Could not convert the oValue of Control with ID{oControlId}...") - LOGGER.Error(ex.Message) + Logger.Warn($"Could not convert the oValue of Control with ID{oControlId}...") + Logger.Error(ex.Message) oitsadifference = True End Try 'wenn Wert in Windream <> der Eingabe darf indexiert werden If oitsadifference = True Then - LOGGER.Debug($"Index with ID{oControlId} will now be indexed...") + Logger.Debug($"Index with ID{oControlId} will now be indexed...") 'Wenn der Wert in ein Vektorfeld geschrieben wird If oIndexName.StartsWith("[%VKT") Then oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName) @@ -4663,7 +4673,7 @@ Public Class frmValidator If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing Combobox as VEKTOR - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4675,7 +4685,7 @@ Public Class frmValidator cmb.DroppedDown = True oMissing = True oErrMsgMissingInput = "Error while indexing Combobox - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4683,7 +4693,7 @@ Public Class frmValidator cmb.DroppedDown = True oMissing = True oErrMsgMissingInput = "Error indexing combobox idb" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If End If @@ -4700,7 +4710,7 @@ Public Class frmValidator End If Else - LOGGER.Debug($"oitsadifference = False...Index with ID {oControlId} will not be indexed...") + Logger.Debug($"oitsadifference = False...Index with ID {oControlId} will not be indexed...") 'Wenn der Wert in ein Vektorfeld geschrieben wird End If End If @@ -4709,11 +4719,11 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) Dim st As New StackTrace(True) st = New StackTrace(ex, True) MsgBox($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId} " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Error:") - LOGGER.Info($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId}" & ex.Message) + Logger.Info($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId}" & ex.Message) Return False End Try @@ -4724,7 +4734,7 @@ Public Class frmValidator If oIsRequired = True And dtp.Value.ToString = String.Empty Then oMissing = True oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For ElseIf dtp.Value.ToString <> "01.01.0001 00:00:00" Then oMyInput = CDate(dtp.Value) @@ -4749,7 +4759,7 @@ Public Class frmValidator If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing DatePicker as VEKTOR - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4760,14 +4770,14 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing DatePicker- ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else If IDBData.SetVariableValue(oIndexName, oMyInput) = False Then oMissing = True oErrMsgMissingInput = "Error indexing datepicker idb" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If End If @@ -4781,14 +4791,14 @@ Public Class frmValidator End If End If Else - LOGGER.Debug("Value WD ('" & oObjectValue.ToString & "') = Input-value ('" & oMyInput.ToString & "')") + Logger.Debug("Value WD ('" & oObjectValue.ToString & "') = Input-value ('" & oMyInput.ToString & "')") End If Else - LOGGER.Debug("DateValue is 01.01.0001 00:00:00") + Logger.Debug("DateValue is 01.01.0001 00:00:00") End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Case GetType(System.Windows.Forms.CheckBox) @@ -4799,7 +4809,7 @@ Public Class frmValidator If chk.CheckState = CheckState.Indeterminate And oIsRequired = True Then oMissing = True oErrMsgMissingInput = "Please set Checkbox value for field '" & chk.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If @@ -4824,7 +4834,7 @@ Public Class frmValidator If oObjectCheck.Length = 1 Then _Value = oObjectCheck(0) Else ' - LOGGER.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") + Logger.Info(" >> Vectorfield " & oIndexName & "' contains more then one value - First value will be used") _Value = oObjectCheck(0) End If Else @@ -4855,7 +4865,7 @@ Public Class frmValidator If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing Checkbox as VEKTOR - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4863,7 +4873,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, result) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing Checkbox - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4884,7 +4894,7 @@ Public Class frmValidator End If End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Case GetType(System.Windows.Forms.DataGridView) @@ -4903,7 +4913,7 @@ Public Class frmValidator If oIsRequired = True And Zeilen = 0 Then oMissing = True oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For ElseIf Zeilen > 0 Then Dim ZeilenGrid As Integer = 0 @@ -4948,7 +4958,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing Vektorfeld - ERROR: " & idxerr_message - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If Else @@ -4957,7 +4967,7 @@ Public Class frmValidator If IDBData.SetVariableValue(oIndexName, oDT, True) = False Then oMissing = True oErrMsgMissingInput = "Error indexing Datagridview idb" - LOGGER.Warn(oErrMsgMissingInput) + Logger.Warn(oErrMsgMissingInput) Exit For End If End If @@ -4965,7 +4975,7 @@ Public Class frmValidator 'Jetzt die Datei indexieren End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Case GetType(DevExpress.XtraGrid.GridControl) @@ -4993,24 +5003,24 @@ Public Class frmValidator ' If Error happened in inner For, exit the outer as well If oMissing = True Then - LOGGER.Info("oMissing = True...Exiting") + Logger.Info("oMissing = True...Exiting") Exit For End If Next If oMissing = True Then - LOGGER.Warn("Check_UpdateIndexe: ERROR or Missing Indexing - returning False") + Logger.Warn("Check_UpdateIndexe: ERROR or Missing Indexing - returning False") Return False Else - LOGGER.Debug("Check_UpdateIndexe: Everything OK - returning True") + Logger.Debug("Check_UpdateIndexe: Everything OK - returning True") Return True End If Catch ex As Exception - LOGGER.Warn($"Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") - LOGGER.Error(ex) + Logger.Warn($"Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") + Logger.Error(ex) Dim st As New StackTrace(ex, True) MsgBox($"Unexpected error in Check_UpdateIndexe ControlID,Name: {oControlId},{oControlName}" & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") - LOGGER.Info("Unexpected error in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) + Logger.Info("Unexpected error in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) Return False End Try @@ -5028,14 +5038,14 @@ Public Class frmValidator Try Dim oRowCount As Integer = pGrid.DataSource.Rows.Count - LOGGER.Debug("Grid Row Count: [{0}]", oRowCount) + Logger.Debug("Grid Row Count: [{0}]", oRowCount) 'Wenn kein Wert ausgewählt wurde und der Index aber gesetzt werden muss If pSettings.IsRequired = True And oRowCount = 0 Then pMissing = True pMissingMessage = "Fehlende Eingabe in Tabelle '" & pGrid.Name & "'" pGrid.BackColor = Color.Red - LOGGER.Warn(pMissingMessage) + Logger.Warn(pMissingMessage) 'Exit For Return False @@ -5111,9 +5121,9 @@ Public Class frmValidator str = String.Join(PMDelimiter, oValueList.ToArray) ' 22.10.2021 Attempt at fixing empty lines appearing in indexes - LOGGER.Debug("Grid Value before saving: [{0}]", str) + Logger.Debug("Grid Value before saving: [{0}]", str) If str.Trim.Length = 0 Or str.Trim.Replace(PMDelimiter, "").Length = 0 Then - LOGGER.Debug("Empty line in Grid [{0}]. Skipping.", pSettings.Name) + Logger.Debug("Empty line in Grid [{0}]. Skipping.", pSettings.Name) Continue For End If @@ -5139,7 +5149,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, pSettings.IndexName, myVektorArr) = False Then pMissing = True pMissingMessage = $"Error while indexing table (1) {pGrid.Name} - ERROR: " & idxerr_message - LOGGER.Warn(pMissingMessage) + Logger.Warn(pMissingMessage) 'Exit For Return False End If @@ -5149,7 +5159,7 @@ Public Class frmValidator If IDBData.SetVariableValue(pSettings.IndexName, oMyDT, True, pSettings.IDBAttributeType) = False Then pMissing = True pMissingMessage = $"Error while indexing table IDB (1) {pGrid.Name} - ERROR: " & idxerr_message - LOGGER.Warn(pMissingMessage) + Logger.Warn(pMissingMessage) 'Exit For Return False End If @@ -5166,7 +5176,7 @@ Public Class frmValidator pMissing = True 'oErrorMessage = "Error while indexing der Tabelle - ERROR: " & idxerr_message pMissingMessage = $"Error while indexing table (2) {pGrid.Name} - ERROR: " & idxerr_message - LOGGER.Warn(pMissingMessage) + Logger.Warn(pMissingMessage) 'Exit For Return False End If @@ -5176,11 +5186,11 @@ Public Class frmValidator If oTypeOldResult = "System.Data.DataTable" Then Dim oDT As DataTable = IDBData.GetVariableValue(pSettings.IndexName, pSettings.IDBAttributeType) If oDT.Rows.Count > 0 Then - LOGGER.Debug("User cleared the grid, so data needs to be erased!") + Logger.Debug("User cleared the grid, so data needs to be erased!") IDBData.Delete_AttributeData(CURRENT_DOC_ID, pSettings.IndexName) End If Else - LOGGER.Debug("(String) User cleared the grid, so data needs to be erased!") + Logger.Debug("(String) User cleared the grid, so data needs to be erased!") IDBData.Delete_AttributeData(CURRENT_DOC_ID, pSettings.IndexName) End If @@ -5190,7 +5200,7 @@ Public Class frmValidator Return True Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) Return False End Try End Function @@ -5211,13 +5221,13 @@ Public Class frmValidator 'Das Array der Idnexwerte überprüfen If pIndexValues Is Nothing = False Then If pIndexValues.Length() > 1 Then - LOGGER.Debug("Indexing Index '" & pIndexName & "' with Arrayvalue") + Logger.Debug("Indexing Index '" & pIndexName & "' with Arrayvalue") For Each oValue In pIndexValues Try - LOGGER.Debug("Current Index Value for [{0}] is [{1}]", pIndexName, oValue) + Logger.Debug("Current Index Value for [{0}] is [{1}]", pIndexName, oValue) Catch ex As Exception - LOGGER.Debug("Current Index Value for [{0}] could not be read!", pIndexName) + Logger.Debug("Current Index Value for [{0}] could not be read!", pIndexName) End Try Next @@ -5228,7 +5238,7 @@ Public Class frmValidator anzahl += 1 Next Else - LOGGER.Debug("Indexing Index '" & pIndexName & "' with value '" & pIndexValues(0) & "'") + Logger.Debug("Indexing Index '" & pIndexName & "' with value '" & pIndexValues(0) & "'") ReDim Preserve arrValue(0) arrValue(0) = pIndexValues(0).ToString End If @@ -5239,10 +5249,10 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) allgFunk.Insert_LogEntry($"ERROR Indexiere_File Validator >> {ex.Message}") idxerr_message = "Unexpected error in Indexiere_File: " & ex.Message.ToString - LOGGER.Info("Unexpected error in Indexiere_File: " & ex.Message.ToString, True) + Logger.Info("Unexpected error in Indexiere_File: " & ex.Message.ToString, True) Return False End Try End Function @@ -5253,15 +5263,15 @@ Public Class frmValidator Sub Datei_ueberspringen() Try - LOGGER.Debug("Skipping document....(Datei_ueberspringen)") + Logger.Debug("Skipping document....(Datei_ueberspringen)") 'Das Dokument freigeben Free_File() Dim oSQL = $"EXECUTE PRPM_FILES_NOT_INDEXED '{USER_USERNAME}',{CURRENT_ProfilGUID},'{WMDocPathWindows}',{CURRENT_DOC_GUID}" DatabaseFallback.ExecuteNonQueryECM(oSQL) - LOGGER.Debug($"Skipped DocGUID {CURRENT_DOC_GUID}") + Logger.Debug($"Skipped DocGUID {CURRENT_DOC_GUID}") Load_Next_Document(False) Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Fehler bei Überspringen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) End Try End Sub @@ -5271,7 +5281,7 @@ Public Class frmValidator Return DatabaseFallback.ExecuteNonQueryECM(sql) Catch ex As Exception allgFunk.Insert_LogEntry($"ERROR Free_File >> {ex.Message}") - LOGGER.Error(ex) + Logger.Error(ex) Return False End Try End Function @@ -5284,7 +5294,7 @@ Public Class frmValidator DocumentViewerValidator.CloseDocument() DocumentViewerValidator.Done() Catch ex As Exception - LOGGER.Warn($"Unexpected error in delete_active_File DocumentViewerValidator.Done: {ex.Message}") + Logger.Warn($"Unexpected error in delete_active_File DocumentViewerValidator.Done: {ex.Message}") End Try Thread.Sleep(500) Application.DoEvents() @@ -5303,7 +5313,7 @@ Public Class frmValidator End If End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Fehler bei Löschen windream-Datei:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) End Try @@ -5317,43 +5327,43 @@ Public Class frmValidator If CURRENT_WMFILE.aLocked Then ' unlock the windream object CURRENT_WMFILE.unlock() - LOGGER.Debug("## Delete_WMFile WMFile unlocked! ##") + Logger.Debug("## Delete_WMFile WMFile unlocked! ##") End If Try CURRENT_WMFILE.Delete() - LOGGER.Info("Manual deleting of file [" & CURRENT_WMFILE.aName & "] successfull!") + Logger.Info("Manual deleting of file [" & CURRENT_WMFILE.aName & "] successfull!") Return True Catch ex As Exception - LOGGER.Warn($"Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...") + Logger.Warn($"Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...") Try Try CURRENT_WMFILE.unlock() Catch exul As Exception - LOGGER.Warn($"Could not unlock WMFile - ERROR: [{exul.Message}] - now teh system.io.Delete...") + Logger.Warn($"Could not unlock WMFile - ERROR: [{exul.Message}] - now teh system.io.Delete...") End Try WMDocPathWindows = "" CURRENT_DOC_PATH = "" CURRENT_WMFILE = Nothing File.Delete(WMDocPathWindows) - LOGGER.Info("Deleting of file via system.io [" & WMDocPathWindows & "] successfull!") + Logger.Info("Deleting of file via system.io [" & WMDocPathWindows & "] successfull!") Return True Catch ex1 As Exception - LOGGER.Warn($"Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...") + Logger.Warn($"Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...") Return False End Try End Try Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Das windream-Objekt konnte nicht gelöscht werden!" & vbNewLine & vbNewLine & "Fehlermeldung:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) - LOGGER.Info(" windream-Objekt konnte nicht gelöscht werden - Fehlermeldung: " & ex.Message, True) + Logger.Info(" windream-Objekt konnte nicht gelöscht werden - Fehlermeldung: " & ex.Message, True) Return False End Try End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Fehler bei Delete_File") - LOGGER.Info(">> Fehlermeldung: " & ex.Message) + Logger.Error(ex) + Logger.Info("Fehler bei Delete_File") + Logger.Info(">> Fehlermeldung: " & ex.Message) Return False End Try End Function @@ -5453,11 +5463,11 @@ Public Class frmValidator Proc.EnableRaisingEvents = True Proc.StartInfo = psi Proc.Start() - LOGGER.Info(" - Datei wurde geöffnet!") + Logger.Info(" - Datei wurde geöffnet!") Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Fehler bei Datei öffnen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) - LOGGER.Info("Fehler bei Datei öffnen: " & ex.Message, True) + Logger.Info("Fehler bei Datei öffnen: " & ex.Message, True) End Try End Sub @@ -5495,7 +5505,7 @@ Public Class frmValidator _frmValidatorSearch = New frmValidatorSearch(Me, Environment) _frmValidatorSearch.Show() Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) End Try Load_Additional_Searches(False) End Sub @@ -5541,7 +5551,7 @@ Public Class frmValidator If Check_UpdateIndexe() = True Then SetStatusLabel($"Data saved", "LimeGreen") - LOGGER.Info("Workflowdata saved manually!") + Logger.Info("Workflowdata saved manually!") Dim ins = String.Format("INSERT INTO TBPM_FILES_WORK_HISTORY (PROFIL_ID, DOC_ID,WORKED_BY,WORKED_WHERE,STATUS_COMMENT) VALUES ({0},{1},'{2}','{3}','{4}')", CURRENT_ProfilGUID, CURRENT_DOC_ID, USER_USERNAME, System.Environment.MachineName, "Manual Save via button") DatabaseFallback.ExecuteNonQueryECM(ins) Else @@ -5554,8 +5564,8 @@ Public Class frmValidator Dim xml As String = GetXML_OverviewLayoutName(pProfilID, pControlID) pGridView.SaveLayoutToXml(xml) Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Error while saving GridLayout: " & ex.Message) + Logger.Error(ex) + Logger.Info("Error while saving GridLayout: " & ex.Message) End Try End Sub @@ -5568,8 +5578,8 @@ Public Class frmValidator End If Catch ex As Exception - LOGGER.Error(ex) - LOGGER.Info("Error while restoring layout: " & ex.Message) + Logger.Error(ex) + Logger.Info("Error while restoring layout: " & ex.Message) End Try End Sub Private Function GetXML_OverviewLayoutName(pProfilID As Integer, pControlID As Integer) @@ -5602,7 +5612,7 @@ Public Class frmValidator Dim oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename) If Not IsNothing(oExportFilename) Then If IsDBNull(oExportFilename) Then - LOGGER.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}") + Logger.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}") oExportFilename = "" End If If oExportFilename <> String.Empty Then @@ -5629,7 +5639,7 @@ Public Class frmValidator oExtension = Path.GetExtension(oFromFilename) If Not IsNothing(oExportFilename) Then If IsDBNull(oExportFilename) Then - LOGGER.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}") + Logger.Info($"#### ATTENTION: oExportFilename is DBNULL - SQL: {oSQLGetFilename}") oExportFilename = "" End If If oExportFilename <> String.Empty Then @@ -5638,7 +5648,7 @@ Public Class frmValidator oCount += 1 Else Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}]!" - LOGGER.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}") + Logger.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}") MsgBox(omsg & vbNewLine & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) End If End If @@ -5652,7 +5662,7 @@ Public Class frmValidator MsgBox($"[{oCount}] file/s successfully exported to target [{FolderBrowserDialog1.SelectedPath}]!", MsgBoxStyle.Information, ADDITIONAL_TITLE) End If Catch ex As Exception - LOGGER.Error(ex) + Logger.Error(ex) MsgBox("Could not move file to target: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) End Try