diff --git a/app/TaskFlow/ClassIDBData.vb b/app/TaskFlow/ClassIDBData.vb index 89eeecd..afe38ab 100644 --- a/app/TaskFlow/ClassIDBData.vb +++ b/app/TaskFlow/ClassIDBData.vb @@ -39,9 +39,7 @@ Next Dim oBatchSQL = String.Join(vbNewLine, oNumberedStatements) - - LOGGER.Debug($"CommitBatch - Executing {oStatements.Count} statements as one batch:{vbNewLine}{oBatchSQL}") - + LOGGER.Debug($"⚡ CommitBatch - Executing {oStatements.Count} statements as one batch:{vbNewLine}{oBatchSQL}") Dim oResult = DatabaseFallback.ExecuteNonQueryIDB(oBatchSQL) _sqlBatch.Clear() Return oResult @@ -191,7 +189,7 @@ LOGGER.Debug($"oAttributeValue for Attribute [{oAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ") End If Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({CURRENT_DOC_ID},'{oAttributeName}','{USER_LANGUAGE}',CONVERT(BIT,'{IDB_USES_WMFILESTORE}'))" - LOGGER.Debug($"GetVariableValue: {oFNSQL}") + LOGGER.Debug($": {oFNSQL}") oAttributeValue = DatabaseFallback.GetDatatableIDB(oFNSQL) Dim odt As DataTable = oAttributeValue If odt.Rows.Count = 1 Then diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index defb2f9..a7bdb3a 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/app/TaskFlow/frmMain.resx b/app/TaskFlow/frmMain.resx index b8c8a43..77b0e07 100644 --- a/app/TaskFlow/frmMain.resx +++ b/app/TaskFlow/frmMain.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw - CAAAAk1TRnQBSQFMAgEBAgEAAcABCwHAAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAcgBCwHIAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -1496,9 +1496,36 @@ 0, 0 + + Allgemein + + + Auswertungen + + + Verwaltung + + + Grundeinstellungen + + + Workflow + + + Funktionen/App Start + + + Ad Hoc Workflows + Start + + Funktionen + + + Workflow Tabelle + Tabelle @@ -1556,6 +1583,24 @@ 0 + + True + + + Tahoma, 9.75pt, style=Bold + + + 3, 3 + + + 127, 16 + + + 0 + + + Choose a profile ... + lblCaptionMainGrid @@ -1647,6 +1692,12 @@ 863, 17 + + 219, 26 + + + Starte Validierung für Profil + 220, 30 @@ -1829,69 +1880,6 @@ 2 - - Allgemein - - - Auswertungen - - - Verwaltung - - - Grundeinstellungen - - - Workflow - - - Funktionen/App Start - - - Ad Hoc Workflows - - - Funktionen - - - Workflow Tabelle - - - True - - - Tahoma, 9.75pt, style=Bold - - - 3, 3 - - - 127, 16 - - - 0 - - - Choose a profile ... - - - lblCaptionMainGrid - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Panel2 - - - 0 - - - 219, 26 - - - Starte Validierung für Profil - 986, 17 @@ -1901,6 +1889,27 @@ 1220, 17 + + 290, 30 + + + Popup Erinnerung deaktivieren + + + 287, 6 + + + 290, 30 + + + In den Vordergrund + + + 290, 30 + + + Out of Range - Fenster wiederherstellen + 291, 100 @@ -1996,27 +2005,6 @@ True - - 290, 30 - - - Popup Erinnerung deaktivieren - - - 287, 6 - - - 290, 30 - - - In den Vordergrund - - - 290, 30 - - - Out of Range - Fenster wiederherstellen - 605, 17 @@ -2105,7 +2093,7 @@ True - 147 + 123 9, 19 @@ -3444,9 +3432,6 @@ &Ansicht - - &Hintergrund - &Seiten Layout @@ -3459,6 +3444,9 @@ Bars + + &Hintergrund + PDF Dokument diff --git a/app/TaskFlow/frmMain.vb b/app/TaskFlow/frmMain.vb index 772aa7e..0da3c4f 100644 --- a/app/TaskFlow/frmMain.vb +++ b/app/TaskFlow/frmMain.vb @@ -2266,6 +2266,13 @@ Public Class frmMain Exit Function End If + + If oIds.Count > 1000 Then + Dim omsg = String.Format("You chose more than 1000 Workflows. Please select fewer items.", vbNewLine) + FormHelper.ShowInfoMessage(omsg, omsgTitleAttention) + Exit Function + End If + ' ========== DB-OPERATIONEN ========== LOGGER.Debug("Cleaning up queued DocIds..") Dim oDelete = $"DELETE FROM TBPM_VALIDATION_PROFILE_GROUP_USER WHERE UserID = {USER_ID}" @@ -3432,11 +3439,26 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G End Sub Private Sub bwBasicData_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles bwBasicData.RunWorkerCompleted - If USER_IS_ADMIN Then - 'bsiDebug.Caption = $"{ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("LicenseCountCaption")}: {USERCOUNT_LOGGED_IN}" - bsiDebug.Caption = String.Format(S.Anzahl_Lizenzen___0_, USERCOUNT_LOGGED_IN) - End If - BarEditItem1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + Try + If e.Error IsNot Nothing Then + LOGGER.Error(e.Error) + LOGGER.Warn($"bwBasicData completed with error: {e.Error.Message}") + End If + + If USER_IS_ADMIN Then + bsiDebug.Caption = String.Format(S.Anzahl_Lizenzen___0_, USERCOUNT_LOGGED_IN) + End If + Catch ex As Exception + LOGGER.Error(ex) + Finally + BarEditItem1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + ' Caption zurücksetzen, falls sie noch auf "busy" steht + If bsiMessage.Caption = "bwBasicData is busy - no Refreshing" Then + bsiMessage.Caption = "" + bsiMessage.ItemAppearance.Normal.BackColor = Color.Transparent + bsiMessage.ItemAppearance.Normal.ForeColor = Color.Empty + End If + End Try End Sub Private Sub bwBasicData_ProgressChanged(sender As Object, e As ProgressChangedEventArgs) Handles bwBasicData.ProgressChanged diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 931acc8..f9136c5 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -226,7 +226,7 @@ Public Class frmValidator End If Catch ex As Exception - MyValidationLogger.Warn($"Error in frmValidation_load1: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error in frmValidation_load1: {ex.Message}") End Try Try @@ -586,30 +586,67 @@ Public Class frmValidator End Try End Sub Private _isClosingGuard As Boolean = False + Private Sub DetachAllGridEvents(parent As Control) + For Each ctrl As Control In parent.Controls + If TypeOf ctrl Is GridControl Then + Dim gc = DirectCast(ctrl, GridControl) + Try + For Each view In gc.Views + If TypeOf view Is GridView Then + Dim gv = DirectCast(view, GridView) + RemoveHandler gv.CellValueChanged, AddressOf GridView_CellValueChanged + RemoveHandler gv.KeyDown, AddressOf GridView_KeyDown + RemoveHandler gv.RowDeleting, AddressOf GridView_RowDeleting + ' DataSource-Events ebenfalls trennen + If TypeOf gv.DataController.DataSource Is DataTable Then + Dim dt = DirectCast(gv.DataController.DataSource, DataTable) + RemoveHandler dt.RowDeleted, AddressOf GridDataSource_RowDeleted + End If + End If + Next + Catch ex As Exception + MyValidationLogger.Warn($"[DetachAllGridEvents] Grid [{ctrl.Name}]: {ex.Message}") + End Try + End If + If ctrl.Controls.Count > 0 Then + DetachAllGridEvents(ctrl) + End If + Next + End Sub Private Sub frmValidation_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing - ' ========== FIX 4: Re-Entry-Guard (Klassenfeld statt Static) ========== + ' Guard: Re-Entry und Post-Dispose-Aufrufe verhindern If _isClosingGuard Then - MyValidationLogger.Warn("[FormClosing] Bereits aktiv → Exit Sub (Re-Entry verhindert)") + MyValidationLogger.Warn("[FormClosing] Guard aktiv – Exit") Return End If _isClosingGuard = True - ' ========== ENDE FIX 4 ========== + _FormClosing = True + + ' ===== FIX: Grid-Events SOFORT deregistrieren ===== + ' Der GridControl-Lambda läuft noch asynchron weiter und greift sonst + ' nach DocumentViewer.Done() auf bereits freigegebene UI-Objekte zu. + Try + DetachAllGridEvents(Me) + Catch ex As Exception + MyValidationLogger.Warn($"[FormClosing] DetachAllGridEvents: {ex.Message}") + End Try + ' ===== ENDE FIX ===== Try If LOG_HOTSPOTS Then ' ========== DIAGNOSE: Wer schließt die Form? ========== - MyValidationLogger.Warn($" frmValidator_FormClosing aufgerufen!") - MyValidationLogger.Warn($" CloseReason: {e.CloseReason}") - MyValidationLogger.Warn($" Cancel: {e.Cancel}") + MyValidationLogger.Debug($"frmValidator_FormClosing aufgerufen!") + MyValidationLogger.Debug($"CloseReason: {e.CloseReason}") + MyValidationLogger.Debug($"Cancel: {e.Cancel}") ' *** KORREKTUR: StackTrace richtig erstellen *** Dim st As New StackTrace(True) - MyValidationLogger.Warn($" StackTrace: {st.ToString()}") + MyValidationLogger.Debug($"StackTrace: {st.ToString()}") ' Zusätzliche Diagnostik - MyValidationLogger.Warn($" _FormClosing-Flag: {_FormClosing}") - MyValidationLogger.Warn($" CURRENT_DOC_GUID: {CURRENT_DOC_GUID}") - MyValidationLogger.Warn($" CURRENT_ProfilGUID: {CURRENT_ProfilGUID}") + MyValidationLogger.Debug($"_FormClosing-Flag: {_FormClosing}") + MyValidationLogger.Debug($"CURRENT_DOC_GUID: {CURRENT_DOC_GUID}") + MyValidationLogger.Debug($"CURRENT_ProfilGUID: {CURRENT_ProfilGUID}") ' ========== ENDE DIAGNOSE ========== End If @@ -629,7 +666,7 @@ Public Class frmValidator Try frmMessages.Close() Catch ex As Exception - MyValidationLogger.Warn($"[FormClosing] frmMessages.Close() failed: {ex.Message}") + MyValidationLogger.Warn($"⚠️ [FormClosing] frmMessages.Close() failed: {ex.Message}") End Try End If End If @@ -649,7 +686,7 @@ Public Class frmValidator My.Settings.frmValidatorWindowState = If(Me.WindowState = FormWindowState.Maximized, "Maximized", "Normal") My.Settings.Save() Catch ex As Exception - MyValidationLogger.Warn($"[FormClosing] Settings.Save() failed: {ex.Message}") + MyValidationLogger.Warn($"⚠️ [FormClosing] Settings.Save() failed: {ex.Message}") MyValidationLogger.Error(ex) End Try End If @@ -665,7 +702,7 @@ Public Class frmValidator Try frmMain.Timer_Inactivity_Reset_Disable("FormClosing") Catch ex As Exception - MyValidationLogger.Warn($"[FormClosing] Timer_Inactivity failed: {ex.Message}") + MyValidationLogger.Warn($"⚠️ [FormClosing] Timer_Inactivity failed: {ex.Message}") End Try End If ' ========== ENDE FIX 7 ========== @@ -711,7 +748,7 @@ Public Class frmValidator DocumentViewer1.Done() End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in DocumentViewerValidator.Done: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in DocumentViewerValidator.Done: {ex.Message}") End Try ' ========== ENDE FIX 9 ========== @@ -944,7 +981,7 @@ Public Class frmValidator Continue For End If If clsPatterns.HasComplexPatterns(oSQLStatement) Then - MyValidationLogger.Warn($"Unexpected error LoadSQLData2 - sql Statement still has complex patterns! [{oSQLStatement}]") + MyValidationLogger.Warn($"⚠️ Unexpected error LoadSQLData2 - sql Statement still has complex patterns! [{oSQLStatement}]") Continue For End If @@ -958,7 +995,20 @@ Public Class frmValidator If TypeOf control Is LookupControl3 Then Try Dim lookup As LookupControl3 = control - + MyValidationLogger.Debug($"[LoadSQLData DEBUG] Lookup [{name}] konfiguriert:") + MyValidationLogger.Debug($" DataSource-Typ: {lookup.Properties.DataSource?.GetType()}") + MyValidationLogger.Debug($" ValueMember: [{lookup.Properties.ValueMember}]") + MyValidationLogger.Debug($" DisplayMember: [{lookup.Properties.DisplayMember}]") + Dim ds = TryCast(lookup.Properties.DataSource, DataTable) + If ds IsNot Nothing Then + MyValidationLogger.Debug($" DataSource hat {ds.Rows.Count} Zeilen, {ds.Columns.Count} Spalten") + If ds.Rows.Count > 0 Then + MyValidationLogger.Debug($" Erster Wert: [{ds.Rows(0)(lookup.Properties.ValueMember)}]") + MyValidationLogger.Debug($" Spalten: {String.Join(", ", ds.Columns.Cast(Of DataColumn)().Select(Function(c) c.ColumnName))}") + End If + Else + MyValidationLogger.Warn($"⚠️ DataSource ist NICHT vom Typ DataTable!") + End If ' ========== BUGFIX: Wert SICHERN bevor DataSource überschrieben wird ========== Dim previousSelectedValues As List(Of String) = Nothing @@ -973,7 +1023,27 @@ Public Class frmValidator lookup.Properties.DataSource = oDTContent lookup.Properties.ValueMember = oDTContent.Columns.Item(0).ColumnName lookup.Properties.DisplayMember = oDTContent.Columns.Item(0).ColumnName + ' *** DEBUG-CODE HIER EINFÜGEN *** + MyValidationLogger.Debug($"[LoadSQLData DEBUG] Lookup [{name}] konfiguriert:") + MyValidationLogger.Debug($" DataSource-Typ: {lookup.Properties.DataSource?.GetType()}") + MyValidationLogger.Debug($" ValueMember: [{lookup.Properties.ValueMember}]") + MyValidationLogger.Debug($" DisplayMember: [{lookup.Properties.DisplayMember}]") + ds = TryCast(lookup.Properties.DataSource, DataTable) + If ds IsNot Nothing Then + MyValidationLogger.Debug($" DataSource hat {ds.Rows.Count} Zeilen, {ds.Columns.Count} Spalten") + If ds.Rows.Count > 0 Then + Try + MyValidationLogger.Debug($" Erster Wert: [{ds.Rows(0)(lookup.Properties.ValueMember)}]") + MyValidationLogger.Debug($" Spalten: {String.Join(", ", ds.Columns.Cast(Of DataColumn)().Select(Function(c) c.ColumnName))}") + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ Error in LookUpLoadSQLData: {ex.Message}") + End Try + End If + Else + MyValidationLogger.Warn($"⚠️ DataSource ist NICHT vom Typ DataTable!") + End If + ' *** ENDE DEBUG-CODE *** ' ========== CRITICAL: Nach DataSource-Zuweisung sind SelectedValues GELÖSCHT! ========== ' Daher müssen wir sie WIEDERHERSTELLEN: If previousSelectedValues IsNot Nothing AndAlso previousSelectedValues.Count > 0 Then @@ -994,7 +1064,7 @@ Public Class frmValidator validValues.Add(oldValue) MyValidationLogger.Debug($"[LoadSQLData BUGFIX] Wert [{oldValue}] existiert im neuen DataSource ✓") Else - MyValidationLogger.Warn($"[LoadSQLData BUGFIX] Wert [{oldValue}] existiert NICHT im neuen DataSource ✗") + MyValidationLogger.Warn($"⚠️ [LoadSQLData BUGFIX] Wert [{oldValue}] existiert NICHT im neuen DataSource ✗") End If Next @@ -1003,7 +1073,7 @@ Public Class frmValidator lookup.Properties.SelectedValues = validValues MyValidationLogger.Debug($"[LoadSQLData BUGFIX] SelectedValues wiederhergestellt: [{String.Join(",", validValues)}]") Else - MyValidationLogger.Warn($"[LoadSQLData BUGFIX] Keine Werte zum Wiederherstellen vorhanden!") + MyValidationLogger.Warn($"⚠️ [LoadSQLData BUGFIX] Keine Werte zum Wiederherstellen vorhanden!") End If End If @@ -1071,7 +1141,7 @@ Public Class frmValidator End If Next Catch ex As Exception - MyValidationLogger.Warn($"{ex.Message} - Loading ControlID: {pControlId}") + MyValidationLogger.Warn($"⚠️ {ex.Message} - Loading ControlID: {pControlId}") MsgBox("Error in LoadSQLData: " & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) End Try End Sub @@ -1186,7 +1256,7 @@ Public Class frmValidator oMyControl = txt MyValidationLogger.Debug($"[{oControlInfo}] - TXT Created!!") Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Create_Controls TXT [{oControlInfo}]: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Create_Controls TXT [{oControlInfo}]: {ex.Message}") End Try Case "LBL" oControlInfo = "LBL#" & oControlInfo @@ -1254,7 +1324,7 @@ Public Class frmValidator oComboBox.EndUpdate() End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in CMB GetValues SQL - Error: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in CMB GetValues SQL - Error: {ex.Message}") End Try Else MyValidationLogger.Debug("Else Row 571") @@ -1337,7 +1407,7 @@ Public Class frmValidator End If End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in LOOKUP GetValues SQL - Error: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in LOOKUP GetValues SQL - Error: {ex.Message}") End Try End If @@ -1524,7 +1594,7 @@ Public Class frmValidator ' ========== 3. Name-Guard für Cache ========== If String.IsNullOrEmpty(oMeta.Name) Then - MyValidationLogger.Warn($"[{CountAction}] oMeta.Name ist leer!") + MyValidationLogger.Warn($"⚠️ [{CountAction}] oMeta.Name ist leer!") Exit Sub End If ' ========== ENDE Guards ========== @@ -1712,7 +1782,7 @@ Public Class frmValidator Try OverrideAll = oDT_ACTIONS?.Rows(0).Item("OverrideAll") Catch ex As Exception - MyValidationLogger.Warn($"Could not set OverrideAll {ex.Message}") + MyValidationLogger.Warn($"⚠️ Could not set OverrideAll {ex.Message}") OverrideAll = False End Try @@ -1787,7 +1857,7 @@ Public Class frmValidator MessageBox.Show(oQuestion, oTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) Case Else MsgBox($"No configured action provided for onCustomButtonClick [{oAction}]", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) - MyValidationLogger.Warn($"No configured action provided for onCustomButtonClick [{oAction}]") + MyValidationLogger.Warn($"⚠️ No configured action provided for onCustomButtonClick [{oAction}]") End Select Catch ex As Exception MyValidationLogger.Error(ex) @@ -1907,7 +1977,7 @@ Public Class frmValidator End If ' *** DEPTH-GUARD: Verhindert extrem tiefe Rekursionen *** If _lookupUpdateDepth >= MAX_LOOKUP_DEPTH Then - MyValidationLogger.Warn($"Lookup recursion depth exceeded ({_lookupUpdateDepth}). Aborting.") + MyValidationLogger.Warn($"⚠️ Lookup recursion depth exceeded ({_lookupUpdateDepth}). Aborting.") Exit Sub End If Try @@ -1995,7 +2065,7 @@ Public Class frmValidator End If Next Catch ex As Exception - MyValidationLogger.Warn($"GridDataSource_RowDeleted: {ex.Message}") + MyValidationLogger.Warn($"⚠️ GridDataSource_RowDeleted: {ex.Message}") End Try End Sub @@ -2027,7 +2097,7 @@ Public Class frmValidator oDataSource.AcceptChanges() End If Catch ex As Exception - MyValidationLogger.Warn($"CleanupDeletedRows: {ex.Message}") + MyValidationLogger.Warn($"⚠️ CleanupDeletedRows: {ex.Message}") End Try End Sub ' ========== ENDE NEU ========== @@ -2090,7 +2160,7 @@ Public Class frmValidator e.Handled = True Catch ex As Exception - MyValidationLogger.Warn($"GridView_KeyDown (Delete): {ex.Message}") + MyValidationLogger.Warn($"⚠️ GridView_KeyDown (Delete): {ex.Message}") End Try End Sub Private Sub GridView_RowDeleting(sender As Object, e As RowDeletingEventArgs) @@ -2130,7 +2200,7 @@ Public Class frmValidator e.Cancel = True oView.RefreshData() Catch ex As Exception - MyValidationLogger.Warn($"GridView_RowDeleting: {ex.Message}") + MyValidationLogger.Warn($"⚠️ GridView_RowDeleting: {ex.Message}") End Try End Sub Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs) @@ -2267,13 +2337,19 @@ Public Class frmValidator oControl.BackColor = oControlBackColor oControl.ForeColor = oControlFontColor + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, DirectCast(oControl, BaseEdit).EditValue) Catch ex As Exception - MyValidationLogger.Warn($"Error while Control2Set (TextEdit): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error while Control2Set (TextEdit): {ex.Message}") End Try Case oControl.GetType() = GetType(LookupControl3) Try Dim oDependingLookup As LookupControl3 = oControl + If oDependingLookup.Properties.SelectedValues Is Nothing Then + oDependingLookup.Properties.SelectedValues = New List(Of String)() + End If + If oDependingLookup.Properties.MultiSelect = True Then If oControlTextOption = "Replace" Then oDependingLookup.Properties.SelectedValues = New List(Of String) From {oControlCaption} @@ -2283,8 +2359,10 @@ Public Class frmValidator Else oDependingLookup.Properties.SelectedValues = New List(Of String) From {oControlCaption} End If + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, oDependingLookup.Properties.SelectedValues) Catch ex As Exception - MyValidationLogger.Warn($"Error while Control2Set (LookupControl3): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error while Control2Set (LookupControl3): {ex.Message}") End Try Case oControl.GetType() = GetType(Windows.Forms.ComboBox) @@ -2293,7 +2371,9 @@ Public Class frmValidator Dim oIndex As Integer = oDependingCombobox.FindStringExact(oControlCaption) If oIndex <> -1 Then - oDependingCombobox.SelectedIndex = oIndex + If oDependingCombobox.SelectedIndex <> oIndex Then + oDependingCombobox.SelectedIndex = oIndex + End If Try oDependingCombobox.BackColor = oControlBackColor Catch ex As Exception @@ -2302,9 +2382,12 @@ Public Class frmValidator oDependingCombobox.ForeColor = oControlFontColor Catch ex As Exception End Try + + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, oDependingCombobox.Text) End If Catch ex As Exception - MyValidationLogger.Warn($"Error while Control2Set (Combobox): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error while Control2Set (Combobox): {ex.Message}") End Try Case oControl.GetType() = GetType(DevExpress.XtraEditors.DateEdit) @@ -2322,25 +2405,29 @@ Public Class frmValidator Else oDateEdit.EditValue = Nothing End If + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, oDateEdit.EditValue) Catch ex As Exception - MyValidationLogger.Warn($"Error While Control2Set (DateEdit): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error While Control2Set (DateEdit): {ex.Message}") End Try Case oControl.GetType() = GetType(System.Windows.Forms.DateTimePicker) Try Dim dtp As System.Windows.Forms.DateTimePicker = DirectCast(oControl, System.Windows.Forms.DateTimePicker) Dim parsed As DateTime - If String.IsNullOrWhiteSpace(oControlCaption) Then - dtp.Value = DateTimePicker.MinimumDateTime - ElseIf DateTime.TryParse(oControlCaption, parsed) _ - OrElse DateTime.TryParse(oControlCaption, CultureInfo.CurrentCulture, DateTimeStyles.None, parsed) _ - OrElse DateTime.TryParse(oControlCaption, CultureInfo.InvariantCulture, DateTimeStyles.None, parsed) Then + Dim hasValue = Not String.IsNullOrWhiteSpace(oControlCaption) + + If hasValue AndAlso (DateTime.TryParse(oControlCaption, parsed) _ + OrElse DateTime.TryParse(oControlCaption, CultureInfo.CurrentCulture, DateTimeStyles.None, parsed) _ + OrElse DateTime.TryParse(oControlCaption, CultureInfo.InvariantCulture, DateTimeStyles.None, parsed)) Then dtp.Value = parsed + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, dtp.Value) Else dtp.Value = DateTimePicker.MinimumDateTime End If Catch ex As Exception - MyValidationLogger.Warn($"Error While Control2Set (DateTimePicker): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error While Control2Set (DateTimePicker): {ex.Message}") End Try Case oControl.GetType() = GetType(Windows.Forms.CheckBox) @@ -2356,8 +2443,10 @@ Public Class frmValidator oDependingCheckbox.ForeColor = oControlFontColor Catch ex As Exception End Try + oMeta.IsDirty = True + clsPatterns.UpdateControlInCache(oMeta.Name, oDependingCheckbox.Checked) Catch ex As Exception - MyValidationLogger.Warn($"Error while Control2Set (Checkbox) {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error while Control2Set (Checkbox) {ex.Message}") End Try Case Else @@ -2366,7 +2455,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MyValidationLogger.Warn($"Error while Control2Set for [{oControlname2Set}]: " & ex.Message) + MyValidationLogger.Warn($"⚠️ Error while Control2Set for [{oControlname2Set}]: " & ex.Message) Finally _SetControlValue_In_Action = False End Try @@ -2434,7 +2523,7 @@ Public Class frmValidator Dim oDTDEPENDING_RESULT As DataTable = GetCachedDatatable(oSqlCommand, oRowDependingControl.Item("CONNECTION_ID")) If oDTDEPENDING_RESULT Is Nothing Then - MyValidationLogger.Warn($"Datatable for Depending Controls was nothing! Check the SQL [{oSqlCommand}]") + MyValidationLogger.Warn($"⚠️ Datatable for Depending Controls was nothing! Check the SQL [{oSqlCommand}]") _DependingControl_In_Action = False Continue For End If @@ -2463,7 +2552,7 @@ Public Class frmValidator oValue = ObjectEx.NotNull(Of Object)(oValue, Nothing) DirectCast(oControl, DevExpress.XtraEditors.TextEdit).EditValue = oValue Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Checking oTEXT: {ex.Message}") End Try Try @@ -2507,12 +2596,12 @@ Public Class frmValidator Catch End Try Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Checking oCheckBoxDependingControlLOOKUP: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Checking oCheckBoxDependingControlLOOKUP: {ex.Message}") End Try End Select Catch ex As Exception - MyValidationLogger.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error while setting depending control-value for [{oDEPENDING_CtrlName}]: {ex.Message}") Finally _suppressLookupEvents = wasSuppressed _DependingControl_In_Action = False @@ -2564,11 +2653,11 @@ Public Class frmValidator 'oControl.Text = oValue DirectCast(oControl, DevExpress.XtraEditors.TextEdit).EditValue = oValue Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Checking oTEXT: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Checking oTEXT: {ex.Message}") End Try Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Dim oTEXT = oDTDEPENDING_RESULT.Rows(0).Item(0): {ex.Message}") End Try Dim oColor @@ -2610,7 +2699,7 @@ Public Class frmValidator End Try Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Checking oCheckBoxDependingControlCHK: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Checking oCheckBoxDependingControlCHK: {ex.Message}") End Try @@ -2624,7 +2713,7 @@ Public Class frmValidator MyValidationLogger.Debug($"Could not find the depending Control with ID {oDEPENDING_GUID} on panel!!!") End If Catch ex As Exception - MyValidationLogger.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) + MyValidationLogger.Warn($"⚠️ Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message) _DependingControl_In_Action = False End Try @@ -2869,7 +2958,7 @@ Public Class frmValidator ' ========== ENDE OPTIMIERUNG ========== Catch ex As Exception - MyValidationLogger.Warn($"Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) + MyValidationLogger.Warn($"⚠️ Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) Finally _DependingControl_In_Action = False End Try @@ -2907,8 +2996,8 @@ Public Class frmValidator oControl.Enabled = CBool(oResult) Catch ex As Exception - MyValidationLogger.Warn($"Could not convert value [oResult] to Boolean!") - MyValidationLogger.Warn($"Error en/disabling control onLoad: [{ex.Message}]") + MyValidationLogger.Warn($"⚠️ Could not convert value [oResult] to Boolean!") + MyValidationLogger.Warn($"⚠️ Error en/disabling control onLoad: [{ex.Message}]") End Try End If @@ -3022,7 +3111,7 @@ Public Class frmValidator _CachedSqlDataCache(cacheKey) = dt Return dt Catch ex As Exception - MyValidationLogger.Warn($"GetControlMetaBySql cache filter failed, fallback to DB: {ex.Message}") + MyValidationLogger.Warn($"⚠️ GetControlMetaBySql cache filter failed, fallback to DB: {ex.Message}") End Try End If @@ -3133,16 +3222,16 @@ Public Class frmValidator Try oNewGUID = oDT.Rows(0).Item(0) Catch ex As Exception - MyValidationLogger.Warn($">> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") - MyValidationLogger.Warn($"ERRORMESSAGE [{ex.Message}]") + MyValidationLogger.Warn($"⚠️ >> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") + MyValidationLogger.Warn($"⚠️ ERRORMESSAGE [{ex.Message}]") End Try Try CURRENT_DOC_ID = oDT.Rows(0).Item(1) MyValidationLogger.Debug($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...") Catch ex As Exception - MyValidationLogger.Warn($">> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]") - MyValidationLogger.Warn($"ERRORMESSAGE [{ex.Message}]") + MyValidationLogger.Warn($"⚠️ >> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]") + MyValidationLogger.Warn($"⚠️ ERRORMESSAGE [{ex.Message}]") End Try Try @@ -3252,7 +3341,7 @@ Public Class frmValidator Else MyValidationLogger.Info($"Second FileExists also returned false [{path1}]!") DocPathWindows = path1 - MyValidationLogger.Warn($"GetDocPathWindows: File [{path1}] not existing!") + MyValidationLogger.Warn($"⚠️ GetDocPathWindows: File [{path1}] not existing!") Return False End If End If @@ -3437,7 +3526,7 @@ Public Class frmValidator Try DocCurrency = DocCurrency.ToString Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Converting oCurreny to string: " & ex.Message) + MyValidationLogger.Warn($"⚠️ Unexpected error in Converting oCurreny to string: " & ex.Message) DocCurrency = "EUR" End Try End If @@ -3572,7 +3661,7 @@ Public Class frmValidator Next End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in display format Currency: " & ex.Message) + MyValidationLogger.Warn($"⚠️ Unexpected error in display format Currency: " & ex.Message) End Try If LOG_HOTSPOTS Then @@ -4207,7 +4296,7 @@ Public Class frmValidator End If End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Set Backcolor [{oControl.Name}]: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Set Backcolor [{oControl.Name}]: {ex.Message}") MyValidationLogger.Error(ex) End Try @@ -4322,7 +4411,7 @@ Public Class frmValidator MyValidationLogger.Debug($"Grid [{oControl.Name}]: {oDTColumnsPerDevExGrid.Rows.Count} Spalten aus Cache geladen") Else oDTColumnsPerDevExGrid = DT_COLUMNS_GRID.Clone() - MyValidationLogger.Warn($"Grid [{oControl.Name}]: Keine Spalten-Definition gefunden!") + MyValidationLogger.Warn($"⚠️ Grid [{oControl.Name}]: Keine Spalten-Definition gefunden!") End If ' ========== ENDE OPTIMIERUNG 6 ========== @@ -4434,37 +4523,91 @@ Public Class frmValidator ElseIf oValueType = "System.Data.DataTable" Then Dim oMyDatatable As DataTable = oValueFromSource - MyValidationLogger.Debug($"IDB Fill Grid [{oControl.Name}] With Datatable - Rows " & oMyDatatable.Rows.Count) + Dim oIsGridReadOnly As Boolean = CBool(oControlRow.Item("READ_ONLY")) + MyValidationLogger.Debug($"IDB Fill Grid [{oControl.Name}] With Datatable - Rows {oMyDatatable.Rows.Count} - ReadOnly: {oIsGridReadOnly}") + + ' ========== FIX: Spaltenanzahl-Prüfung EINMALIG vor dem Loop ========== + Dim oConfiguredColumns As Integer = oDTColumnsPerDevExGrid.Rows.Count + Dim oMaxSourceColumns As Integer = If(oMyDatatable.Rows.Count > 0, + oMyDatatable.Rows.Cast(Of DataRow)(). + Max(Function(r) Split(r.Item(0).ToString, PMDelimiter).Length), + 0) + + If oMaxSourceColumns > oConfiguredColumns Then + If oIsGridReadOnly Then + MyValidationLogger.Info($"⚠️ [DataTable] Grid [{oControl.Name}] ist ReadOnly → {oMaxSourceColumns} Quelldaten, {oConfiguredColumns} Spalten konfiguriert. Überzählige Felder werden ignoriert.") + Else + ' ========== FIX: Sprachabhängige Texte ========== + Dim oTitle As String + Dim oQuestion As String + Select Case USER_LANGUAGE + Case "de-DE" + oTitle = "Spaltenkonfiguration prüfen" + oQuestion = $"Das Grid '{oControl.Name}' enthält Zeilen mit bis zu {oMaxSourceColumns} Datenwerten," & vbCrLf & + $"aber nur {oConfiguredColumns} Spalten sind konfiguriert." & vbCrLf & + $"Es werden nur die ersten {oConfiguredColumns} Werte je Zeile angezeigt." & vbCrLf & vbCrLf & + "Möchten Sie trotzdem fortfahren?" + Case "fr-FR" + oTitle = "Vérifier la configuration des colonnes" + oQuestion = $"La grille '{oControl.Name}' contient des lignes avec jusqu'à {oMaxSourceColumns} valeurs," & vbCrLf & + $"mais seulement {oConfiguredColumns} colonnes sont configurées." & vbCrLf & + $"Seules les {oConfiguredColumns} premières valeurs par ligne seront affichées." & vbCrLf & vbCrLf & + "Voulez-vous continuer quand même?" + Case Else ' en-US, en-GB, etc. + oTitle = "Check column configuration" + oQuestion = $"The grid '{oControl.Name}' contains rows with up to {oMaxSourceColumns} values," & vbCrLf & + $"but only {oConfiguredColumns} columns are configured." & vbCrLf & + $"Only the first {oConfiguredColumns} values per row will be displayed." & vbCrLf & vbCrLf & + "Do you want to continue anyway?" + End Select + ' ========== ENDE FIX ========== + + Dim oResult = MessageBox.Show( + oQuestion, + oTitle, + MessageBoxButtons.YesNo, + MessageBoxIcon.Warning) + + If oResult = DialogResult.No Then + MyValidationLogger.Warn($"⚠️ [DataTable] Benutzer hat Fortfahren für Grid [{oControl.Name}] abgebrochen.") + Exit Select + End If + End If + End If + ' ========== ENDE FIX ========== + For Each oRow As DataRow In oMyDatatable.Rows Try MyValidationLogger.Debug($"IDB ROW Vector {oRow.Item(0).ToString}...") oColValuesfromSource = Split(oRow.Item(0).ToString, PMDelimiter) - - If oColValuesfromSource.Length > 8 Then - MyValidationLogger.Warn("⚠️ Fill Grid With DatatableSplit Error - Max 8 columns can be configured!") - End If MyValidationLogger.Debug($"oColValuesfromSource splitted - Length ({oColValuesfromSource.Length.ToString})") + Dim oRowData As New List(Of Object) - For index = 1 To oColValuesfromSource.Length + For index = 1 To oConfiguredColumns Try + Dim oRawValue As String = If(index <= oColValuesfromSource.Length, + oColValuesfromSource(index - 1), + String.Empty) Dim oColumnType = oDTColumnsPerDevExGrid.Rows.Item(index - 1).Item("TYPE_COLUMN") MyValidationLogger.Debug($"oColumnType Of DGView-Column ({oColumnType.ToString})...") - Dim oConvertedValue = ClassFormat.GetConvertedValue(oColValuesfromSource(index - 1), oColumnType) + Dim oConvertedValue = ClassFormat.GetConvertedValue(oRawValue, oColumnType) oRowData.Add(oConvertedValue) Catch ex As Exception - MyValidationLogger.Warn($"Error While converting/adding Value To oRowData " & ex.Message) + MyValidationLogger.Warn($"⚠️ Error While converting/adding Value To oRowData " & ex.Message) + oRowData.Add(String.Empty) End Try Next oDataSource.Rows.Add(oRowData.ToArray()) + Catch ex As Exception - MyValidationLogger.Warn($"Error While adding datarow [{oRow.Item(0).ToString}] To Grid " & ex.Message) + MyValidationLogger.Warn($"⚠️ Error While adding datarow [{oRow.Item(0).ToString}] To Grid " & ex.Message) End Try Next End If End If Else - MyValidationLogger.Info($"DevExpressGrid There are no columns configured/listed For control {oControlId}.") + MyValidationLogger.Info($"⚠️ DevExpressGrid There are no columns configured/listed For control {oControlId}.") End If Case Else @@ -4476,7 +4619,7 @@ Public Class frmValidator Next End Select Else - MyValidationLogger.Warn($"Could Not load Devexpress.Grid [{oControl.Name }] As omytype Is [{oValueType}]!") + MyValidationLogger.Warn($"⚠️ Could Not load Devexpress.Grid [{oControl.Name }] As omytype Is [{oValueType}]!") End If Else If first = False Then @@ -4692,7 +4835,7 @@ Public Class frmValidator oLookup.Properties.SelectedValues = New List(Of String) MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: SelectedValues auf leere Liste zurückgesetzt") Catch ex As Exception - MyValidationLogger.Warn($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: Fehler beim Zurücksetzen SelectedValues: {ex.Message}") + MyValidationLogger.Warn($"⚠️ [FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: Fehler beim Zurücksetzen SelectedValues: {ex.Message}") End Try ' Finale SelectedValues setzen @@ -4789,17 +4932,17 @@ Public Class frmValidator If _CachedControlsByGuid.TryGetValue(oDEPENDING_CTRL_ID, oControl) Then ControlCreator.GridTables_CacheDatatableForColumn(oDEPENDING_CTRL_ID, oDEPENDING_COLUMN, oSqlCommand, oCONNID, oAdvancedLookup) Else - MyValidationLogger.Warn($"Control mit ID {oDEPENDING_CTRL_ID} nicht gefunden!") + MyValidationLogger.Warn($"⚠️ Control mit ID {oDEPENDING_CTRL_ID} nicht gefunden!") End If Else - MyValidationLogger.Warn($"FillIndexValues - oDTRESULT_FOR_COLUMN is nothing!") + MyValidationLogger.Warn($"⚠️ FillIndexValues - oDTRESULT_FOR_COLUMN is nothing!") End If Catch ex As Exception - MyValidationLogger.Warn($"FillIndexValues - Unexpected error in creating Grid-Dropdown-Column [{oDEPENDING_COLUMN}] for CONTROL-ID [{oDEPENDING_CTRL_ID}]: " & ex.Message) + MyValidationLogger.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 - MyValidationLogger.Warn($"FillIndexValues - Unexpected error in creating dropdown for Grid: " & ex.Message) + MyValidationLogger.Warn($"⚠️ FillIndexValues - Unexpected error in creating dropdown for Grid: " & ex.Message) End Try ' ========== ENDE OPTIMIERUNG 8+9 ========== @@ -4864,11 +5007,11 @@ Public Class frmValidator RibbonPageGroup2.Visible = False End If Else - MyValidationLogger.Warn($"oDTINFO is nothing!!") + MyValidationLogger.Warn($"⚠️ oDTINFO is nothing!!") RibbonPageGroup2.Visible = False End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Setting PMINFO - ERROR: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Setting PMINFO - ERROR: {ex.Message}") RibbonPageGroup2.Visible = False End Try Else @@ -4904,7 +5047,7 @@ Public Class frmValidator End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}") errormessage = $"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}" & vbNewLine & "Check Logfile" My.Settings.Save() frmError.ShowDialog() @@ -4920,14 +5063,14 @@ Public Class frmValidator Try ControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER) Catch ex As Exception - MyValidationLogger.Warn($"GridTables_HandleControlValueChange Fehler: {ex.Message}") + MyValidationLogger.Warn($"⚠️ GridTables_HandleControlValueChange Fehler: {ex.Message}") End Try ' ========== ENDE OPTIMIERUNG 11 ========== If LOG_HOTSPOTS Then Dim totalMs = (DateTime.Now - perfStart).TotalMilliseconds If totalMs > 6000 Then - MyValidationLogger.Warn($"[PERF FillIndexValues] ⚠️ GESAMT LANGSAM: {totalMs}ms (Schwellwert: 6000ms)") + MyValidationLogger.Warn($"⚠️ [PERF FillIndexValues] ⚠️ GESAMT LANGSAM: {totalMs}ms (Schwellwert: 6000ms)") Else MyValidationLogger.Info($"[PERF FillIndexValues] GESAMT: {totalMs}ms") End If @@ -5036,12 +5179,12 @@ Public Class frmValidator MyValidationLogger.Debug("Setting default export path to [{0}]", FolderBrowserDialog1.SelectedPath) Else - MyValidationLogger.Warn($"### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###") + MyValidationLogger.Warn($"⚠️ ### Dis/Enabale Export2Path - RootFolder {ButtonExport2Folder_RootFolder} not existing or accessible!###") End If End If Catch ex As Exception - MyValidationLogger.Warn($"### Error Dis/Enabale Export2Path: {ex.Message} !###") + MyValidationLogger.Warn($"⚠️ ### Error Dis/Enabale Export2Path: {ex.Message} !###") End Try End If @@ -5185,7 +5328,7 @@ Public Class frmValidator Try oQuestion = oDT_ACTIONS?.Rows(0).Item("Question") Catch ex As Exception - MyValidationLogger.Warn($"btnFinishContinue - No QUESTION-Column in select-Result!") + MyValidationLogger.Warn($"⚠️ btnFinishContinue - No QUESTION-Column in select-Result!") oQuestion = "" End Try Try @@ -5222,7 +5365,7 @@ Public Class frmValidator Return True Case Else MsgBox($"No valid action provided [{oMsgType}] in btnFinishContinue - Check Your log and inform the WorkflowTeam", MsgBoxStyle.Exclamation, "") - MyValidationLogger.Warn($"No valid action provided [{oMsgType}] in btnFinishContinue!") + MyValidationLogger.Warn($"⚠️ No valid action provided [{oMsgType}] in btnFinishContinue!") Return False End Select Catch ex As Exception @@ -5325,7 +5468,7 @@ Public Class frmValidator frmError.ShowDialog() oErrorOcurred = True Else - MyValidationLogger.Warn($"FinalIndexResult from SQL is DBNull - AttributeName [{oFinalIndexRow.Item("INDEXNAME")}] - oContinueOnIndifferentState = true, Continuing with next Attribute and Replacing with empty String") + MyValidationLogger.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 @@ -5411,7 +5554,7 @@ Public Class frmValidator Next End If Catch ex As Exception - MyValidationLogger.Warn($"Error in finalIndexing: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Error in finalIndexing: {ex.Message}") oErrorOcurred = True End Try End If @@ -5625,7 +5768,7 @@ Public Class frmValidator MyValidationLogger.Debug("Validation of document ended successfully!") Dim oPROCSQL = $"EXEC PRPM_CHECK_NEXT_WF {CURRENT_DOC_GUID}" If DatabaseFallback.ExecuteNonQueryECM(oPROCSQL) = False Then - MyValidationLogger.Warn($"Attention: Error executing proc [{oPROCSQL}]") + MyValidationLogger.Warn($"⚠️ Attention: Error executing proc [{oPROCSQL}]") End If If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF] Finish_WFStep nach PRPM_CHECK_NEXT_WF: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") @@ -5892,7 +6035,7 @@ Public Class frmValidator If lookup.Properties.SelectedValues.Count = 0 And oIsRequired = True Then oMissing = True oErrMsgMissingInput = $"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'" - MyValidationLogger.Warn($"Kein Auswahl getroffen in LookupGrid '{oControl.Name}'") + MyValidationLogger.Warn($"⚠️ Kein Auswahl getroffen in LookupGrid '{oControl.Name}'") oControl.BackColor = Color.Red frmError.ShowDialog() Exit For @@ -5913,7 +6056,7 @@ Public Class frmValidator If Indexiere_File(CURRENT_WMFILE, oIndexName, myVektorArr) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing von LookupGrid - ERROR: " & idxerr_message - MyValidationLogger.Warn($"Error while indexing [{oIndexName}] von LookupGrid - ERROR: " & idxerr_message) + MyValidationLogger.Warn($"⚠️ Error while indexing [{oIndexName}] von LookupGrid - ERROR: " & idxerr_message) frmError.ShowDialog() Exit For End If @@ -5922,7 +6065,7 @@ Public Class frmValidator If IDBData.SetVariableValue(oIndexName, oMyDT, oOVERWRITE_DATA, oIDBTyp) = False Then oMissing = True oErrMsgMissingInput = "Error while indexing IDB-Object LookupGrid" - MyValidationLogger.Warn($"Error while indexing IDB-Object LookupGrid [{oIndexName}] ") + MyValidationLogger.Warn($"⚠️ Error while indexing IDB-Object LookupGrid [{oIndexName}] ") frmError.ShowDialog() Exit For End If @@ -5933,7 +6076,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 - MyValidationLogger.Warn($"Error while indexing LookupGrid [{oIndexName}] ") + MyValidationLogger.Warn($"⚠️ Error while indexing LookupGrid [{oIndexName}] ") frmError.ShowDialog() Exit For End If @@ -6222,7 +6365,7 @@ Public Class frmValidator oitsadifference = True End If Catch ex As Exception - MyValidationLogger.Warn($"Could not convert the oValue of Control with ID{oControlId}...") + MyValidationLogger.Warn($"⚠️ Could not convert the oValue of Control with ID{oControlId}...") MyValidationLogger.Error(ex.Message) oitsadifference = True End Try @@ -6566,7 +6709,7 @@ Public Class frmValidator End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") MyValidationLogger.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:") @@ -6915,7 +7058,7 @@ Public Class frmValidator End If Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in delete_active_File DocumentViewerValidator.Done: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in delete_active_File DocumentViewerValidator.Done: {ex.Message}") End Try Thread.Sleep(500) Application.DoEvents() @@ -6955,12 +7098,12 @@ Public Class frmValidator MyValidationLogger.Info("Manual deleting of file [" & CURRENT_WMFILE.aName & "] successfull!") Return True Catch ex As Exception - MyValidationLogger.Warn($"Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...") + MyValidationLogger.Warn($"⚠️ Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...") Try Try CURRENT_WMFILE.unlock() Catch exul As Exception - MyValidationLogger.Warn($"Could not unlock WMFile - ERROR: [{exul.Message}] - now teh system.io.Delete...") + MyValidationLogger.Warn($"⚠️ Could not unlock WMFile - ERROR: [{exul.Message}] - now teh system.io.Delete...") End Try WMDocPathWindows = "" CURRENT_DOC_PATH = "" @@ -6969,7 +7112,7 @@ Public Class frmValidator MyValidationLogger.Info("Deleting of file via system.io [" & WMDocPathWindows & "] successfull!") Return True Catch ex1 As Exception - MyValidationLogger.Warn($"Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...") + MyValidationLogger.Warn($"⚠️ Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...") Return False End Try @@ -7461,7 +7604,7 @@ Public Class frmValidator oCommentSoFar = DirectCast(oControl, DevExpress.XtraEditors.TextEdit).EditValue Exit For Catch ex As Exception - MyValidationLogger.Warn($"Unexpected error in Checking EditValue: {ex.Message}") + MyValidationLogger.Warn($"⚠️ Unexpected error in Checking EditValue: {ex.Message}") End Try End If End If @@ -7484,12 +7627,12 @@ Public Class frmValidator Try OverrideAll = oOverrideDT?.Rows(0).Item("OverrideAll") Catch ex As Exception - MyValidationLogger.Warn($"Could not set OverrideAll {ex.Message}") + MyValidationLogger.Warn($"⚠️ Could not set OverrideAll {ex.Message}") End Try Try oIncludeFI = oOverrideDT?.Rows(0).Item("IncludeFI") Catch ex As Exception - MyValidationLogger.Warn($"Could not set oIncludeFI {ex.Message}") + MyValidationLogger.Warn($"⚠️ Could not set oIncludeFI {ex.Message}") End Try Else MyValidationLogger.Info(String.Format("Result of oProfile_NOT_RESP_SQL did not delivered a Datatable - OverrideAll = True")) @@ -7512,7 +7655,7 @@ Public Class frmValidator ' DirectCast(oControl, DevExpress.XtraEditors.TextEdit).EditValue = frmDialog.oComment ' Exit For ' Catch ex As Exception - ' Logger.Warn($"Unexpected error in Setting EditValue NotResponsible: {ex.Message}") + ' Logger.Warn($"⚠️ Unexpected error in Setting EditValue NotResponsible: {ex.Message}") ' End Try ' End If ' End If