diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index 785044a..4031100 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -617,6 +617,12 @@ Public Class ClassControlCreator oView.OptionsView.NewItemRowPosition = NewItemRowPosition.None End If End If + Logger.Debug("Grid [{0}] setup: READ_ONLY(Row)=[{1}], View.Editable=[{2}], View.ReadOnly=[{3}], AllowAddRows=[{4}]", + oControl.Name, + row.Item("READ_ONLY"), + oView.OptionsBehavior.Editable, + oView.OptionsBehavior.ReadOnly, + oView.OptionsBehavior.AllowAddRows.ToString()) End If @@ -836,8 +842,11 @@ Public Class ClassControlCreator GridTables.Add(pControlId, New Dictionary(Of String, RepositoryItem)) End If - Dim oRepositoryItem = GridTables_GetRepositoryItemForColumn(pColumnName, oTable, pAdvancedLookup) Dim oColumnDictionary = GridTables.Item(pControlId) + Dim oExistingItem As RepositoryItem = Nothing + oColumnDictionary.TryGetValue(pColumnName, oExistingItem) + + Dim oRepositoryItem = GridTables_GetRepositoryItemForColumn(pColumnName, oTable, pAdvancedLookup, oExistingItem) If oColumnDictionary.ContainsKey(pColumnName) Then oColumnDictionary.Item(pColumnName) = oRepositoryItem @@ -849,10 +858,15 @@ Public Class ClassControlCreator End Try End Sub - Public Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem + Public Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean, Optional pExistingItem As RepositoryItem = Nothing) As RepositoryItem If pIsAdvancedLookup Then - Dim oEditor = New RepositoryItemLookupControl3 + ' Bestehendes RepositoryItem wiederverwenden (Objekt-Identität stabil halten), statt ColumnEdit + ' auf ein neues Objekt umzubiegen – sonst verwirft DevExpress den bereits erzeugten ActiveEditor. + Dim oEditor = TryCast(pExistingItem, RepositoryItemLookupControl3) + If oEditor Is Nothing Then + oEditor = New RepositoryItemLookupControl3 + End If If pDataTable IsNot Nothing Then oEditor.DisplayMember = pDataTable.Columns.Item(0).ColumnName @@ -862,17 +876,13 @@ Public Class ClassControlCreator Return oEditor Else - Dim oEditor = New RepositoryItemComboBox() - Dim oItems As New List(Of String) + Dim oEditor = TryCast(pExistingItem, RepositoryItemComboBox) + Dim oIsNewEditor As Boolean = (oEditor Is Nothing) + If oIsNewEditor Then + oEditor = New RepositoryItemComboBox() + End If - AddHandler oEditor.Validating, Sub(_sender As ComboBoxEdit, _e As CancelEventArgs) - If oItems.Contains(_sender.EditValue) Then - _e.Cancel = False - Else - _e.Cancel = True - End If - - End Sub + oEditor.Items.Clear() If pDataTable IsNot Nothing Then For Each oRow2 As DataRow In pDataTable.Rows @@ -886,10 +896,23 @@ Public Class ClassControlCreator End Try oEditor.Items.Add(oValue) - oItems.Add(oValue) Next End If + ' Validating-Handler nur beim allerersten Anlegen verdrahten; er prüft live gegen + ' oEditor.Items, sodass spätere Refreshs (s.o.) keinen erneuten (Re-)Hook benötigen. + If oIsNewEditor Then + AddHandler oEditor.Validating, Sub(_sender As Object, _e As CancelEventArgs) + Dim oComboBox = TryCast(_sender, ComboBoxEdit) + Dim oComboProperties = TryCast(oComboBox?.Properties, RepositoryItemComboBox) + If oComboBox IsNot Nothing AndAlso oComboProperties IsNot Nothing AndAlso oComboProperties.Items.Contains(oComboBox.EditValue) Then + _e.Cancel = False + Else + _e.Cancel = True + End If + End Sub + End If + Return oEditor End If End Function @@ -948,14 +971,14 @@ Public Class ClassControlCreator ' ========== NEU: {#IDBA#...}-Platzhalter vorab ersetzen ========== If oSqlStatement.Contains("{#IDBA#") Then oSqlStatement = clsPatterns.ReplaceIDBAttributes(oSqlStatement, True) - Logger.Debug($"GridTables_HandleControlValueChange -> Nach ReplaceIDBAttributes für [{oColumnName}]: [{oSqlStatement}]") + 'Logger.Debug($"GridTables_HandleControlValueChange -> Nach ReplaceIDBAttributes für [{oColumnName}]: [{oSqlStatement}]") End If ' ========== ENDE NEU ========== oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pControlPanel, True) GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup) ' Force-setting Editor for GridColumns - Logger.Debug("Force-setting Editor for all Gridcells..") + 'Logger.Debug("Force-setting Editor for all Gridcells..") For Each oControl As Control In pControlPanel.Controls Try If oControl.Tag IsNot Nothing AndAlso TypeOf oControl.Tag Is ControlMetadata Then @@ -964,13 +987,14 @@ Public Class ClassControlCreator Dim oGrid As GridControl = DirectCast(oControl, GridControl) If oGrid.FocusedView IsNot Nothing AndAlso TypeOf oGrid.FocusedView Is GridView Then DirectCast(oGrid.FocusedView, GridView).FocusInvalidRow() - Logger.Debug($"Force-setting Editor for Grid [{oGrid.Name}]") + ' Logger.Debug($"Force-setting Editor for Grid [{oGrid.Name}]") End If Exit For End If End If Catch ex As Exception Logger.Error($"GridTables_HandleControlValueChange -> Fehler beim Force-setting Editor: {ex.Message}") + Logger.Warn($"GridTables_HandleControlValueChange -> Fehler beim Force-setting Editor für Control [{oControl.Name}] - [{oSqlStatement}]") End Try Next End If @@ -984,7 +1008,7 @@ Public Class ClassControlCreator ' Schritt 3 - Prüfe und restauriere Lookup-Werte mit SQL-Abhängigkeiten ' ============================================================================ If lookupBackups.Count > 0 Then - Logger.Debug($"GridTables_HandleControlValueChange -> Prüfe {lookupBackups.Count} Lookups auf Wiederherstellung...") + ' Logger.Debug($"GridTables_HandleControlValueChange -> Prüfe {lookupBackups.Count} Lookups auf Wiederherstellung...") For Each oControl As Control In pControlPanel.Controls If TypeOf oControl Is LookupControl3 Then @@ -1018,7 +1042,7 @@ Public Class ClassControlCreator ' Schritt 4 - Prüfe und restauriere ComboBox-Werte mit SQL-Abhängigkeiten ' ============================================================================ If comboBoxBackups.Count > 0 Then - Logger.Debug($"GridTables_HandleControlValueChange -> Prüfe {comboBoxBackups.Count} ComboBoxes auf Wiederherstellung...") + ' Logger.Debug($"GridTables_HandleControlValueChange -> Prüfe {comboBoxBackups.Count} ComboBoxes auf Wiederherstellung...") For Each oControl As Control In pControlPanel.Controls If TypeOf oControl Is Windows.Forms.ComboBox Then diff --git a/app/TaskFlow/ClassFormat.vb b/app/TaskFlow/ClassFormat.vb index 433c7c6..1b60a95 100644 --- a/app/TaskFlow/ClassFormat.vb +++ b/app/TaskFlow/ClassFormat.vb @@ -39,7 +39,7 @@ Public Class ClassFormat Dim normalized As String = pValue.Trim() - LOGGER.Debug($"[NormalizeNumericString] Input: [{pValue}]") + 'LOGGER.Debug($"[NormalizeNumericString] Input: [{pValue}]") ' Entferne Währungssymbole und Leerzeichen normalized = System.Text.RegularExpressions.Regex.Replace(normalized, "[€$£¥\s]", "") @@ -47,14 +47,14 @@ Public Class ClassFormat Dim hasDot As Boolean = normalized.Contains(".") Dim hasComma As Boolean = normalized.Contains(",") - LOGGER.Debug($"[NormalizeNumericString] After cleanup: [{normalized}], HasDot={hasDot}, HasComma={hasComma}") + 'LOGGER.Debug($"[NormalizeNumericString] After cleanup: [{normalized}], HasDot={hasDot}, HasComma={hasComma}") If hasDot AndAlso hasComma Then ' Beide vorhanden: Das letzte ist der Dezimaltrenner Dim lastDotPos As Integer = normalized.LastIndexOf(".") Dim lastCommaPos As Integer = normalized.LastIndexOf(",") - LOGGER.Debug($"[NormalizeNumericString] Both separators found: LastDotPos={lastDotPos}, LastCommaPos={lastCommaPos}") + ' LOGGER.Debug($"[NormalizeNumericString] Both separators found: LastDotPos={lastDotPos}, LastCommaPos={lastCommaPos}") If lastDotPos > lastCommaPos Then normalized = normalized.Replace(",", "") @@ -64,12 +64,12 @@ Public Class ClassFormat ElseIf hasComma Then Dim commaCount As Integer = normalized.Count(Function(c) c = ","c) - LOGGER.Debug($"[NormalizeNumericString] Only comma found: CommaCount={commaCount}") + 'LOGGER.Debug($"[NormalizeNumericString] Only comma found: CommaCount={commaCount}") If commaCount = 1 Then Dim lastCommaPos As Integer = normalized.LastIndexOf(",") Dim digitsAfterComma As Integer = normalized.Length - lastCommaPos - 1 - LOGGER.Debug($"[NormalizeNumericString] Single comma: DigitsAfterComma={digitsAfterComma}") + ' LOGGER.Debug($"[NormalizeNumericString] Single comma: DigitsAfterComma={digitsAfterComma}") If digitsAfterComma <= 3 Then normalized = normalized.Replace(",", ".") @@ -82,13 +82,13 @@ Public Class ClassFormat ElseIf hasDot Then Dim dotCount As Integer = normalized.Count(Function(c) c = "."c) - LOGGER.Debug($"[NormalizeNumericString] Only dot found: DotCount={dotCount}") + ' LOGGER.Debug($"[NormalizeNumericString] Only dot found: DotCount={dotCount}") If dotCount = 1 Then Dim lastDotPos As Integer = normalized.LastIndexOf(".") Dim digitsAfterDot As Integer = normalized.Length - lastDotPos - 1 - LOGGER.Debug($"[NormalizeNumericString] Single dot: DigitsAfterDot={digitsAfterDot}") + ' LOGGER.Debug($"[NormalizeNumericString] Single dot: DigitsAfterDot={digitsAfterDot}") ' ✅ KRITISCHE ÄNDERUNG: Prüfe auch Stellen VOR dem Punkt Dim digitsBeforeDot As Integer = lastDotPos @@ -102,7 +102,7 @@ Public Class ClassFormat normalized = normalized.Replace(".", "") ElseIf digitsAfterDot >= 1 AndAlso digitsAfterDot <= 3 Then ' Wahrscheinlich Dezimaltrenner (z.B. 5464.17 oder 120.5) - LOGGER.Debug($"[NormalizeNumericString] Dot treated as decimal separator ({digitsBeforeDot} digits before, {digitsAfterDot} after)") + ' LOGGER.Debug($"[NormalizeNumericString] Dot treated as decimal separator ({digitsBeforeDot} digits before, {digitsAfterDot} after)") Else ' digitsAfterDot = 0 → Punkt am Ende, vermutlich Fehler LOGGER.Warn($"⚠️ [NormalizeNumericString] Dot at end of string → removing") @@ -110,11 +110,11 @@ Public Class ClassFormat End If Else ' Mehrere Punkte → Tausendertrenner - LOGGER.Debug($"[NormalizeNumericString] Multiple dots → removing all") + 'LOGGER.Debug($"[NormalizeNumericString] Multiple dots → removing all") normalized = normalized.Replace(".", "") End If Else - LOGGER.Debug($"[NormalizeNumericString] No separators found → integer or already normalized") + 'LOGGER.Debug($"[NormalizeNumericString] No separators found → integer or already normalized") End If LOGGER.Debug($"[NormalizeNumericString] Output: [{normalized}]") diff --git a/app/TaskFlow/ClassInit.vb b/app/TaskFlow/ClassInit.vb index 5e147f7..c51cb0c 100644 --- a/app/TaskFlow/ClassInit.vb +++ b/app/TaskFlow/ClassInit.vb @@ -554,14 +554,15 @@ Public Class ClassInit Public Sub InitBasics2() Try Dim oStopWatch As New RefreshHelper.SW("InitBasics2") - Dim oSql = String.Format("SELECT * FROM VWPM_PROFILE_USER WHERE USER_ID = {0}", USER_ID) - BASEDATA_DT_VW_PROFILE_USER = DatabaseFallback.GetDatatable("VWPM_PROFILE_USER", New GetDatatableOptions(oSql, DatabaseType.ECM) With { - .FilterExpression = $"USER_ID = {USER_ID}" - }) + Dim oSql = "" + 'Dim oSql = String.Format("SELECT * FROM VWPM_PROFILE_USER WHERE USER_ID = {0}", USER_ID) + 'BASEDATA_DT_VW_PROFILE_USER = DatabaseFallback.GetDatatable("VWPM_PROFILE_USER", New GetDatatableOptions(oSql, DatabaseType.ECM) With { + ' .FilterExpression = $"USER_ID = {USER_ID}" + '}) - If BASEDATA_DT_VW_PROFILE_USER.Rows.Count = 0 Then - LOGGER.Warn($"no profiles for user: '{USER_USERNAME}' configured - Check SQL [{oSql}]!", False) - End If + 'If BASEDATA_DT_VW_PROFILE_USER.Rows.Count = 0 Then + ' LOGGER.Warn($"no profiles for user: '{USER_USERNAME}' configured - Check SQL [{oSql}]!", False) + 'End If oSql = "SELECT KEY_NAME, VALUE_TEXT1 FROM TBDD_USER_KEY_VALUE_PAIR WITH (NOLOCK) diff --git a/app/TaskFlow/ClassParamRefresh.vb b/app/TaskFlow/ClassParamRefresh.vb index 7d3f975..55ee50c 100644 --- a/app/TaskFlow/ClassParamRefresh.vb +++ b/app/TaskFlow/ClassParamRefresh.vb @@ -61,255 +61,9 @@ Public Class ClassParamRefresh Dim oMode As String For Each oMode In oSplitWorkMode ProcessWorkingModeParameter(oMode, pMode) - 'LOGGER.Debug($"oWorkingMode Parameter: {oMode}") - 'If oMode = "PM.FORCE_LAYOUT_OVERVIEW" Then - ' FORCE_LAYOUT_OVERVIEW = True - ' LOGGER.Debug($"FORCE_LAYOUT_OVERVIEW [{FORCE_LAYOUT_OVERVIEW}]") - 'ElseIf oMode = "PM.NO_MASS_VALIDATOR" Then - ' SHOW_MASS_VALIDATOR = False - ' LOGGER.Info($"SHOW_MASS_VALIDATOR [{SHOW_MASS_VALIDATOR}]") - 'ElseIf oMode = "PM.NO_CHARTS" Then - ' SHOW_CHARTS = False - ' LOGGER.Debug($"SHOW_CHARTS [{SHOW_CHARTS}]") - 'ElseIf oMode = "PM.DEBUG_LOG" Then - ' DEBUG = True - ' LOGCONFIG.Debug = True - 'ElseIf oMode = "PM.LOG_HOTSPOTS" Then - ' LOG_HOTSPOTS = True - 'ElseIf oMode.StartsWith("OPERATION_MODE_FS") Then - ' OPERATION_MODE_FS = oMode.Replace("OPERATION_MODE_FS=", "") - ' If OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM Then - ' IDB_USES_WMFILESTORE = True - ' End If - ' LOGGER.Info("OPERATION_MODE_FS: " + OPERATION_MODE_FS) - 'ElseIf oMode = "PM.IDBWITHWMFS" Then - ' IDB_USES_WMFILESTORE = True - 'ElseIf oMode = "PM.NO_BASICCONF" Then - ' BASIC_CONF_VISIBLE = False - ' LOGGER.Info($"BASIC_CONF_VISIBLE [{BASIC_CONF_VISIBLE}]") - 'ElseIf oMode = "PM.SYS_LOCKED_MAINTENANCE" Then - ' SYS_LOCKED_MAINTENANCE = True - 'ElseIf oMode.StartsWith("PM.IDB_CONID!") Then - ' If CONNECTION_STRING_IDB <> "" And dbIDBInitialized = True Then - ' IDB_ACTIVE = True - ' Continue For - ' Else - ' Dim Database_IDB As MSSQLServer = Nothing - ' Dim CON_ID = oMode.Replace("PM.IDB_CONID!", "") - ' Dim oConString = DatabaseFallback.GetConnectionString(CON_ID) - ' CONNECTION_STRING_IDB = oConString - ' Database_IDB = New MSSQLServer(LOGCONFIG, CONNECTION_STRING_IDB) - ' If Database_IDB.DBInitialized = True Then - ' IDB_ACTIVE = True - ' LOGGER.Info($"IDB is active - IDB-Connection [{CON_ID}]!") - ' DatabaseFallback.InitializeIDB(Database_IDB) - ' Else - ' IDB_ACTIVE = False - ' End If - ' End If - 'ElseIf oMode = "PM.EXCEL_OVERVIEW" Then - ' EXCEL_OVERVIEW = True - ' LOGGER.Info($"EXCEL_OVERVIEW [{EXCEL_OVERVIEW}]") - 'ElseIf oMode = "PM.MONITORING" Then - ' MONITORING_ACTIVE = True - ' LOGGER.Debug($"MONITORING_ACTIVE [{MONITORING_ACTIVE}]") - 'ElseIf oMode = "PM.GHOSTMODE" Then - ' GHOSTMODE_ACTIVE = True - ' LOGGER.Info($"GHOSTMODE_ACTIVE [{GHOSTMODE_ACTIVE}]") - 'ElseIf oMode.StartsWith("PM.COLORSCHEME") Then - ' Dim oColorScheme = oMode.Replace("PM.COLORSCHEME=", "") - ' RIBBON_COLOR_SCHEME = oColorScheme.ToUpper - ' LOGGER.Debug($"RIBBON_COLOR_SCHEME [{RIBBON_COLOR_SCHEME}]") - 'ElseIf oMode.StartsWith("PM.NO_DETAIL_PROFILES") Then - ' NO_DETAIL_PROFILES = True - ' LOGGER.Debug($"NO_DETAIL_PROFILES [{NO_DETAIL_PROFILES}]") - 'ElseIf oMode = "PM.NO_POPUP" Then - ' POPUP_REMINDER_ACTIVE = False - ' LOGGER.Debug($"POPUP_REMINDER_ACTIVE [{POPUP_REMINDER_ACTIVE}]") - 'ElseIf oMode.StartsWith("PM.POPUP_TIMELAPS_OVERRIDE") Then - ' Dim oTimeLapse = oMode.Replace("PM.POPUP_TIMELAPS_OVERRIDE=", "") - ' LOGGER.Info($"CENTRAL POPUP_TIMELAPS_OVERRIDE [{oTimeLapse}]") - ' Try - ' CONFIG.Config.ReminderTimer = oTimeLapse - ' Catch ex As Exception - ' End Try - 'ElseIf oMode.StartsWith("PM.CONV_IDENTIFICATION") Then - ' Dim oIdent = oMode.Replace("PM.CONV_IDENTIFICATION=", "") - ' CONV_IDENTIFICATION = oIdent - 'ElseIf oMode.StartsWith("PM.INACTIVITY_DURATION") Then - ' Dim oInactivityDuration = oMode.Replace("PM.INACTIVITY_DURATION=", "") - ' Try - ' INACTIVITY_DURATION = CInt(oInactivityDuration) - ' LOGGER.Debug($"InactivityDuration [{INACTIVITY_DURATION}]") - ' Catch ex As Exception - ' LOGGER.Warn($"INACTIVITY_DURATION = 0 - {ex.Message}") - ' INACTIVITY_DURATION = 0 - ' End Try - 'ElseIf oMode.StartsWith("PM.COL_LAST_EDITED") Then - ' Dim oLEDITEDCOL = oMode.Replace("PM.COL_LAST_EDITED=", "") - ' Try - ' LAST_EDITED_COLUMN = oLEDITEDCOL - ' LOGGER.Debug($"LAST_EDITED_COLUMN: {oLEDITEDCOL}") - ' Catch ex As Exception - ' LAST_EDITED_COLUMN = "" - - ' End Try - 'ElseIf oMode.StartsWith("PM.COL_LAST_ADDED") Then - ' Dim oLEDITEDCOL = oMode.Replace("PM.COL_LAST_ADDED=", "") - ' Try - ' LAST_ADDED_COLUMN = oLEDITEDCOL - ' LOGGER.Debug($"LAST_ADDED_COLUMN: {oLEDITEDCOL}") - ' Catch ex As Exception - ' LAST_ADDED_COLUMN = "" - - ' End Try - 'ElseIf oMode.StartsWith("PM.MON_COL_CHANGED_WHEN") Then - ' Dim oLEDITEDCOL = oMode.Replace("PM.MON_COL_CHANGED_WHEN=", "") - ' Try - ' MON_EDITED_COLUMN = oLEDITEDCOL - ' LOGGER.Debug($"MON_EDITED_COLUMN: {oLEDITEDCOL}") - ' Catch ex As Exception - - ' End Try - 'ElseIf oMode.StartsWith("PM.MON_COL_ADDED_WHEN") Then - ' Dim oLEDITEDCOL = oMode.Replace("PM.MON_COL_ADDED_WHEN=", "") - ' Try - ' MON_ADDED_COLUMN = oLEDITEDCOL - ' LOGGER.Debug($"MON_COL_ADDED_WHEN: {oLEDITEDCOL}") - ' Catch ex As Exception - - ' End Try - 'ElseIf oMode.StartsWith("PM.USE_APPSERVER") Then - ' Dim oUSE_APPSERVER = oMode.Replace("PM.USE_APPSERVER=", "") - ' Try - ' USE_APPSERVER = CBool(oUSE_APPSERVER) - ' Catch ex As Exception - ' USE_APPSERVER = False - ' End Try - 'ElseIf oMode.StartsWith("PM.COPYWM2TEMP") Then - ' Dim oCOPYWM2TEMP = oMode.Replace("PM.COPYWM2TEMP=", "") - ' Try - ' COPY_WMFILE_2TEMP = CBool(oCOPYWM2TEMP) - ' Catch ex As Exception - ' COPY_WMFILE_2TEMP = False - ' End Try - 'ElseIf oMode.StartsWith("PM.MAP_SHARE_DRIVE") Then - ' Dim oMAP_SHARE_DRIVE = oMode.Replace("PM.MAP_SHARE_DRIVE=", "") - ' Try - ' MAP_SHARE_DRIVE = oMAP_SHARE_DRIVE - ' Catch ex As Exception - ' oMAP_SHARE_DRIVE = String.Empty - ' End Try - 'ElseIf oMode.StartsWith("PM.MAP_BLACKLIST") Then - ' Dim oMAP_BLACKLIST = oMode.Replace("PM.MAP_BLACKLIST=", "") - ' Try - ' MAP_BLACKLIST = oMAP_BLACKLIST - ' Catch ex As Exception - ' MAP_BLACKLIST = String.Empty - ' End Try - 'ElseIf oMode.StartsWith("PM.SEARCH1") Then - ' Dim oSearch1 = oMode.Replace("PM.SEARCH1=", "") - ' Try - ' SEARCH1 = oSearch1 - ' Catch ex As Exception - ' SEARCH1 = "" - ' End Try - 'ElseIf oMode.StartsWith("PM.SEARCH2") Then - ' Dim oSearch2 = oMode.Replace("PM.SEARCH2=", "") - ' Try - ' SEARCH2 = oSearch2 - ' Catch ex As Exception - ' SEARCH2 = "" - ' End Try - 'ElseIf oMode.StartsWith("PM.TRAFFICLIGHT_ICON") Then - ' Dim oParam = oMode.Replace("PM.TRAFFICLIGHT_ICON=", "") - ' Try - ' TL_ICON = CBool(oParam) - ' Catch ex As Exception - ' TL_ICON = False - ' End Try - 'ElseIf oMode.StartsWith("PM.TITLE_NOTIFICATIONS") Then - ' Dim oParam = oMode.Replace("PM.TITLE_NOTIFICATIONS=", "") - ' Try - ' TITLE_NOTIFICATIONS = oParam - ' Catch ex As Exception - ' TITLE_NOTIFICATIONS = "" - ' End Try - 'ElseIf oMode.StartsWith("TF.InheritanceMsgAmount") And pMode = "Load" Then - ' Dim oParam = oMode.Replace("TF.InheritanceMsgAmount=", "") - ' Try - ' InheritanceMsgAmount = oParam - ' Catch ex As Exception - - ' End Try - 'ElseIf oMode.StartsWith("TF.InheritanceCalcReset") And pMode = "Load" Then - ' Dim oParam = oMode.Replace("TF.InheritanceCalcReset=", "") - ' Try - ' If CBool(oParam) = True Then - ' LOGGER.Info("Inheritance_Counts werden auf 0 zurückgesetzt bzw gelöscht") - ' Dim oDELETESQL = "DELETE FROM TBDD_USER_KEY_VALUE_PAIR - ' WHERE FK_USER_ID = " & USER_ID & " And [FK_MODULE_ID] = '" & USER_MODULE_ID & "' AND KEY_NAME LIKE 'INHERITANCE_CONFIRM_%'" - ' DatabaseECM.ExecuteNonQuery(oDELETESQL) - - ' UserInheritance_ConfirmationByColumn = Nothing - ' CONFIG.Save() - ' End If - ' Catch ex As Exception - - ' End Try - 'ElseIf oMode.StartsWith("PM.START_CW") Then - ' Dim oAfterReplace = oMode.Replace("PM.START_CW=", "") - ' Try - ' START_CW = True - ' LOGGER.Debug("PM.START_CW = True") - ' Dim oSplit As String() = oAfterReplace.Split("~") - ' START_CW_CAPTION = oSplit(0) - ' Try - ' START_CW_LOC_VARIANT = oSplit(1) - ' Catch ex As Exception - ' START_CW_LOC_VARIANT = "-1" - ' LOGGER.Warn($"Could not read START_CW_LOCVARIANT : {ex.Message}") - ' End Try - - ' Catch ex As Exception - ' LOGGER.Warn($"Could not read START_CW Param: {ex.Message}") - ' START_CW = False - ' End Try - 'ElseIf oMode.StartsWith("PM.RibbonPageCustTitle") Then - ' Dim oAfterReplace = oMode.Replace("PM.RibbonPageCustTitle=", "") - ' RibbonPageCustTitle = oAfterReplace - 'ElseIf oMode.StartsWith("PM.RibbonPageCustItm1") Then - ' Dim oAfterReplace = oMode.Replace("PM.RibbonPageCustItm1=", "") - ' RibbonPageCustItm1 = oAfterReplace - 'ElseIf oMode.StartsWith("PM.ButtonExport2FolderCaption") Then - ' Dim oAfterReplace = oMode.Replace("PM.ButtonExport2FolderCaption=", "") - ' ButtonExport2Folder_Caption = oAfterReplace - 'ElseIf oMode.StartsWith("PM.ButtonExport2Folder_Mode") Then - ' Dim oAfterReplace = oMode.Replace("PM.ButtonExport2Folder_Mode=", "") - ' ButtonExport2Folder_Mode = oAfterReplace - 'ElseIf oMode.StartsWith("PM.ButtonExport2Folder_RootFolder") Then - ' Dim oAfterReplace = oMode.Replace("PM.ButtonExport2Folder_RootFolder=", "") - ' ButtonExport2Folder_RootFolder = oAfterReplace - 'ElseIf oMode = "MAINFORM_ALLOW_LOGFILES" Then - ' MAINFORM_CREATE_LOG_FILES = True - 'Else - ' LOGGER.Info($"Wrong oMode: {oMode}") - 'End If Next - 'If IDB_ACTIVE Then - ' If CONNECTION_STRING_APP_SERVER <> String.Empty Then - ' If USE_APPSERVER = True Then - ' CONNECTION_STRING_IDB_READ = CONNECTION_STRING_APP_SERVER - ' Else - ' CONNECTION_STRING_IDB_READ = CONNECTION_STRING_IDB - ' End If - ' Else - ' CONNECTION_STRING_IDB_READ = CONNECTION_STRING_IDB - ' End If - ' CONNECTION_STRING_IDB_WRITE = CONNECTION_STRING_IDB - 'End If End If oStopwatch.Done() End Sub diff --git a/app/TaskFlow/ControlCreator/GridControl.vb b/app/TaskFlow/ControlCreator/GridControl.vb index 76d6c7a..5b2f6c2 100644 --- a/app/TaskFlow/ControlCreator/GridControl.vb +++ b/app/TaskFlow/ControlCreator/GridControl.vb @@ -218,10 +218,10 @@ Namespace ControlCreator Try Dim oComboboxDataTable As DataTable = Nothing Dim oColumnName As String = oRow.Item("SPALTENNAME") - _Logger.Debug("Working on SQL [{0}] for Column[{1}]...", oSqlCommand, oColumnName) + '_Logger.Debug("Working on SQL [{0}] for Column[{1}]...", oSqlCommand, oColumnName) If oSqlCommand.Contains("{#IDBA#") Then oSqlCommand = clsPatterns.ReplaceIDBAttributes(oSqlCommand, True) - _Logger.Debug("FillGridTables -> Nach ReplaceIDBAttributes für [{0}]: [{1}]", oColumnName, oSqlCommand) + '_Logger.Debug("FillGridTables -> Nach ReplaceIDBAttributes für [{0}]: [{1}]", oColumnName, oSqlCommand) End If If Not clsPatterns.HasComplexPatterns(oSqlCommand) Then _Logger.Debug("SQL has no complex patterns!") @@ -230,7 +230,7 @@ Namespace ControlCreator .ConnectionId = oConnectionId }) Else - _Logger.Debug("...has complex patterns!!") + _Logger.Debug("contains CTRL/complex patterns -> deferred to GridTables_HandleControlValueChange") End If Dim oRepositoryItem = GridTables_GetRepositoryItemForColumn(oColumnName, oComboboxDataTable, oRow.Item("ADVANCED_LOOKUP")) @@ -658,8 +658,8 @@ Namespace ControlCreator Dim oDeCultureInfo As CultureInfo = New CultureInfo("de-DE") e.DisplayText = oValue.ToString("N2", oDeCultureInfo) & " " & currentSymbol - _Logger.Debug("[CustomColumnDisplayText] CURRENCY [{0}]: DisplayText=[{1}], Symbol=[{2}] (from Shared Dict in ConfigureViewColumnsCurrency)", - e.Column.FieldName, e.DisplayText, currentSymbol) + '_Logger.Debug("[CustomColumnDisplayText] CURRENCY [{0}]: DisplayText=[{1}], Symbol=[{2}] (from Shared Dict in ConfigureViewColumnsCurrency)", + 'e.Column.FieldName, e.DisplayText, currentSymbol) Catch ex As Exception _Logger.Warn("⚠️ Could not format currency value [{0}] for column [{1}]: {2}", @@ -773,8 +773,8 @@ Namespace ControlCreator Dim oDeCultureInfo As CultureInfo = New CultureInfo("de-DE") e.DisplayText = oValue.ToString("N2", oDeCultureInfo) & " " & currentSymbol - _Logger.Debug("[CustomColumnDisplayText] CURRENCY [{0}]: DisplayText=[{1}], Symbol=[{2}] (from Shared Dict in ConfigureViewEvents)", - e.Column.FieldName, e.DisplayText, currentSymbol) + '_Logger.Debug("[CustomColumnDisplayText] CURRENCY [{0}]: DisplayText=[{1}], Symbol=[{2}] (from Shared Dict in ConfigureViewEvents)", + 'e.Column.FieldName, e.DisplayText, currentSymbol) Catch ex As Exception _Logger.Warn("⚠️ Could not format currency value [{0}] for column [{1}]: {2}", @@ -799,18 +799,12 @@ Namespace ControlCreator Dim oColumnName As String = e.Column.FieldName If GridTables_TestEditorExistsByControlAndColumn(pControlId, oColumnName) Then Dim oEditor = _GridTables.Item(pControlId).Item(oColumnName) - _Logger.Debug("Assigning Editor to Column [{0}]", oColumnName) + '_Logger.Debug("Assigning Editor to Column [{0}]", oColumnName) e.RepositoryItem = oEditor Else Dim oColumnType As String = ObjectEx.NotNull(oColumnData.Item("TYPE_COLUMN"), String.Empty).ToString() - If oColumnType = "CURRENCY" Then - If _FormulaColumnNames.Contains(oColumnName) Then - _Logger.Debug("CURRENCY column [{0}] is formula/readonly – CustomColumnDisplayText handles display", oColumnName) - Else - _Logger.Debug("CURRENCY column [{0}] – NO e.RepositoryItem set. Display via CustomColumnDisplayText, Edit via GridColumn.ColumnEdit", oColumnName) - End If - Else - _Logger.Debug("Editor for Column [{0}] does not exist", oColumnName) + If oColumnType = "CURRENCY" AndAlso _FormulaColumnNames.Contains(oColumnName) Then + _Logger.Debug("CURRENCY column [{0}] is formula/readonly – CustomColumnDisplayText handles display", oColumnName) End If End If Catch ex As Exception @@ -953,15 +947,13 @@ Namespace ControlCreator AddHandler pControl.LostFocus, AddressOf Control_LostFocus AddHandler pGridView.ShowingEditor, - Sub(sender As Object, e As CancelEventArgs) - Try - Dim oView As GridView = TryCast(sender, GridView) - If oView Is Nothing Then Return + Sub(sender As Object, e As CancelEventArgs) + Try + Dim oView As GridView = TryCast(sender, GridView) + If oView Is Nothing Then Return - _Logger.Debug("Showing editor.") - - ' Formel-Spalten dürfen keinen Editor öffnen (gilt für EXPRESSION UND SQL) - If oView.FocusedColumn IsNot Nothing Then + ' Formel-Spalten dürfen keinen Editor öffnen (gilt für EXPRESSION UND SQL) + If oView.FocusedColumn IsNot Nothing Then Dim oFieldName As String = oView.FocusedColumn.FieldName If _FormulaColumnNames.Contains(oFieldName) Then _Logger.Debug("Cancelling editor – column [{0}] is a formula column (Expression or SQL).", oFieldName) diff --git a/app/TaskFlow/ModuleRuntimeVariables.vb b/app/TaskFlow/ModuleRuntimeVariables.vb index 7b21b1a..beff8cc 100644 --- a/app/TaskFlow/ModuleRuntimeVariables.vb +++ b/app/TaskFlow/ModuleRuntimeVariables.vb @@ -32,7 +32,7 @@ Module ModuleRuntimeVariables Public Property BASEDATA_DT_PROFILES_SEARCHES_DATA As DataTable Public Property DT_FILTERED_PROFILE_SEARCHES_DATA As DataTable - Public Property BASEDATA_DT_VW_PROFILE_USER As DataTable + 'Public Property BASEDATA_DT_VW_PROFILE_USER As DataTable Public Property BASEDATA_TBDD_COLUMNS_FORMAT As DataTable diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 09907b3..1cd3635 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/clsPatterns.vb b/app/TaskFlow/clsPatterns.vb index 100d2d5..2a65519 100644 --- a/app/TaskFlow/clsPatterns.vb +++ b/app/TaskFlow/clsPatterns.vb @@ -161,7 +161,7 @@ Public Class clsPatterns Return oResult End If - LOGGER.Debug($"input BEFORE replacing: [{oResult}]") + 'LOGGER.Debug($"input BEFORE replacing: [{oResult}]") oResult = ReplaceInternalValues(oResult) If Not IsNothing(CURRENT_WMFILE) Then @@ -175,7 +175,7 @@ Public Class clsPatterns If Not IsNothing(oResult) Then oResult = ReplaceUserValues(oResult) - LOGGER.Debug($"input AFTER replacing: [{oResult}]") + 'LOGGER.Debug($"input AFTER replacing: [{oResult}]") End If Return oResult @@ -302,7 +302,7 @@ Public Class clsPatterns End SyncLock Try - LOGGER.Debug($"Starting ReplaceControlValues with input: [{oResult}] for document ID: {CURRENT_DOC_ID}") + 'LOGGER.Debug($"Starting ReplaceControlValues with input: [{oResult}] for document ID: {CURRENT_DOC_ID}") Dim oTryCounter = 0 While ContainsPattern(oResult, PATTERN_CTRL) @@ -322,7 +322,7 @@ Public Class clsPatterns oColumnName = oSplitName.Last() End If - LOGGER.Debug("Found placeholder for control [{0}].", oControlName) + 'LOGGER.Debug("Found placeholder for control [{0}].", oControlName) ' Beim Cache-Zugriff Lock verwenden Dim oControl As Control = Nothing SyncLock _ControlLookupCache @@ -346,11 +346,11 @@ Public Class clsPatterns If oControl IsNot Nothing Then Dim oReplaceValue As String - LOGGER.Debug("oControl.GetType [{0}].", oControl.GetType.ToString) + 'LOGGER.Debug("oControl.GetType [{0}].", oControl.GetType.ToString) Select Case oControl.GetType Case GetType(TextBox) oReplaceValue = oControl.Text - LOGGER.Debug("TextBox- oReplaceValue will be [{0}].", oReplaceValue) + 'LOGGER.Debug("TextBox- oReplaceValue will be [{0}].", oReplaceValue) Case GetType(TextEdit) Try oReplaceValue = ClassAllgemeineFunktionen.NotNullString(DirectCast(oControl, TextEdit).EditValue, String.Empty) @@ -358,7 +358,7 @@ Public Class clsPatterns LOGGER.Warn($"Error in ReplaceValue MemoEdit: {ex.Message}") oReplaceValue = "" End Try - LOGGER.Debug("TextEdit- oReplaceValue will be [{0}].", oReplaceValue) + ' LOGGER.Debug("TextEdit- oReplaceValue will be [{0}].", oReplaceValue) Case GetType(MemoEdit) Try oReplaceValue = ClassAllgemeineFunktionen.NotNullString(DirectCast(oControl, MemoEdit).EditValue, String.Empty) @@ -366,7 +366,7 @@ Public Class clsPatterns LOGGER.Warn($"Error in ReplaceValue MemoEdit: {ex.Message}") oReplaceValue = "" End Try - LOGGER.Debug("MemoEdit- oReplaceValue will be [{0}].", oReplaceValue) + 'LOGGER.Debug("MemoEdit- oReplaceValue will be [{0}].", oReplaceValue) Case GetType(LookupControl3) Dim oLookupControl3 As LookupControl3 = oControl @@ -388,7 +388,7 @@ Public Class clsPatterns oReplaceValue = ERROR_REPLACE_VALUE ' ========== FIX END ========== ElseIf selectedValues.Count > 1 Then - LOGGER.Debug($"LookupControl3 [{oControlName}] mit mehr als 1 Value") + 'LOGGER.Debug($"LookupControl3 [{oControlName}] mit mehr als 1 Value") Dim oIndex As Integer = 0 For Each oString As String In selectedValues If oIndex = 0 Then @@ -400,12 +400,12 @@ Public Class clsPatterns Next oIsSQL = False Else ' Count = 1 - LOGGER.Debug($"LookupControl3 [{oControlName}] mit genau einem Value") + 'LOGGER.Debug($"LookupControl3 [{oControlName}] mit genau einem Value") oReplaceValue = selectedValues(0) End If - LOGGER.Debug($"oReplaceValue nach Durchlaufen selectedValues: {oReplaceValue}") - LOGGER.Debug($"oReplaceValue nach Durchlaufen selectedValues: {oReplaceValue}") + 'LOGGER.Debug($"oReplaceValue nach Durchlaufen selectedValues: {oReplaceValue}") + 'LOGGER.Debug($"oReplaceValue nach Durchlaufen selectedValues: {oReplaceValue}") Case GetType(Windows.Forms.ComboBox) oReplaceValue = oControl.Text @@ -437,7 +437,7 @@ Public Class clsPatterns Case Else oReplaceValue = ERROR_REPLACE_VALUE End Select - LOGGER.Debug($"[SQL-ESCAPE CHECK] Control: [{oControlName}], oReplaceValue Type: [{If(oReplaceValue?.GetType()?.Name, "NULL")}], Value: [{oReplaceValue}], IsSQL: [{oIsSQL}]") + 'LOGGER.Debug($"[SQL-ESCAPE CHECK] Control: [{oControlName}], oReplaceValue Type: [{If(oReplaceValue?.GetType()?.Name, "NULL")}], Value: [{oReplaceValue}], IsSQL: [{oIsSQL}]") If oReplaceValue Is Nothing Then LOGGER.Warn($"⚠️ oReplaceValue is Nothing for control [{oControlName}]! Setting to ERROR_REPLACE_VALUE") oReplaceValue = ERROR_REPLACE_VALUE @@ -465,8 +465,6 @@ Public Class clsPatterns End Try End Function Private Shared Function SafeSqlEscape(value As Object) As String - LOGGER.Debug($"[SafeSqlEscape] Input Type: [{If(value?.GetType()?.Name, "NULL")}], Value: [{value}]") - If value Is Nothing Then LOGGER.Warn("[SafeSqlEscape] Value is Nothing → returning ERROR_REPLACE_VALUE") Return ERROR_REPLACE_VALUE @@ -487,7 +485,6 @@ Public Class clsPatterns End If Dim escaped = strValue.Replace("'", "''") - LOGGER.Debug($"[SafeSqlEscape] Output: [{escaped}]") Return escaped End Function Public Shared Function ReplaceWindreamIndicies(pInput As String, pDocument As WMObject, pIsSQL As Boolean) As String @@ -540,7 +537,7 @@ Public Class clsPatterns Try Dim result = input Dim oTryCounter As Integer = 0 - LOGGER.Debug($"Starting ReplaceIDBAttributes with input: [{result}] for document ID: {CURRENT_DOC_ID}") + ' LOGGER.Debug($"Starting ReplaceIDBAttributes with input: [{result}] for document ID: {CURRENT_DOC_ID}") While ContainsPattern(result, PATTERN_IDBA) Dim indexName As String = GetNextPattern(result, PATTERN_IDBA).Value @@ -565,7 +562,7 @@ Public Class clsPatterns If oIDBValue IsNot Nothing Or Not IsDBNull(oIDBValue) Then Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}" If IS_SQL = True Then - LOGGER.Debug($"IS_SQL = True - oReplaceValue = [{oReplaceValue}]") + 'LOGGER.Debug($"IS_SQL = True - oReplaceValue = [{oReplaceValue}]") If indexName <> "ObjectID" And indexName <> "OBJID" And indexName <> "DocID" Then Try oIDBValue = oIDBValue.Replace("'", "''") @@ -575,7 +572,7 @@ Public Class clsPatterns End Try End If - LOGGER.Debug($"oIDBValue = {oIDBValue}") + 'LOGGER.Debug($"oIDBValue = {oIDBValue}") End If result = result.Replace(oReplaceValue, oIDBValue) Else @@ -587,7 +584,7 @@ Public Class clsPatterns ' Increase counter by 10 to avoid DDOSing the Database/IDB Service oTryCounter += 10 End While - LOGGER.Debug("sql after ReplaceIDBAttributes: " & input) + 'LOGGER.Debug("sql after ReplaceIDBAttributes: " & input) Return result Catch ex As Exception LOGGER.Error(ex) diff --git a/app/TaskFlow/frmAdministration.vb b/app/TaskFlow/frmAdministration.vb index 8b7f5f6..e439e6b 100644 --- a/app/TaskFlow/frmAdministration.vb +++ b/app/TaskFlow/frmAdministration.vb @@ -70,7 +70,7 @@ Public Class frmAdministration End Try If IDB_ACTIVE = True Then IDBData.Init() - lblSearch.Text = "Datei-Suche (SQL):" + lblSearch.Text = "Datei-Suche IDB (SQL):" btnWMopenSuche.Visible = False SORT_BY_LATESTCheckBox.Visible = False 'PRIORITYNumericUpDown.Visible = False diff --git a/app/TaskFlow/frmMain.resx b/app/TaskFlow/frmMain.resx index 117d579..9d12f43 100644 --- a/app/TaskFlow/frmMain.resx +++ b/app/TaskFlow/frmMain.resx @@ -1725,46 +1725,46 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw - CAAAAk1TRnQBSQFMAgEBAgEAAfgBDAH4AQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo - AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA - AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 - AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA - AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm - AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM - AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA - ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz - AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ - AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM - AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA - AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA - AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ - AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ - AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA - AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm - ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ - Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz - AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA - AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM - AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM - ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM - Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA - AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM - AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ - AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz - AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm - AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw - AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/0YAAQgEcgEICgABGgEc - AnQBHAEaKQABcgFVAVoCWwFaAVUBTwgAAXQBeQF6AuUBegF5AXQnAAJVAVoBWwLkAVsBWgJVBgABdAJ6 - BOUBegF5AVIlAAFPAVUCWgRbAVoCVQFPBAABUgFZAXoG5QF6AlIjAAEIAlUIWgJVAQgCAAEaAVIBWQF6 - BuUBWQFYAVIBGiIAAU8CVQdaA1UBTwIAAUwBUgpZAVIBTCIAAU8BNApVATQBLgIAAUwBUgFTCFkBUwFS - AUwiAAEtAzMHNAIzAS0CAAIrAjIGUwIyAisiAAFPAS0BMwhVATQCLQIAAUwCKwhTAVICKyIAAQgBLQFV - CJcBVQEtAQgCAAEaASsBUgh1AVIBKwEaIwABAgGXCJgBlwEtBAABKgF0CJoBdAErJQABTwEIARsFwgHx - AU8GAAFMARoBGwQaARsBGgFSJwABTwEIAfMC/wHzAQgBcggAAUwBGgT2ARoBdCkAAQgEcgEICgABGgR0 - ARplAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAE/wQAAfgBHwH4AR8EAAHw - AQ8B8AEPBAAB4AEHAeABBwQAAcABAwHAAQMEAAGAAQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAGA - AQEBgAEBBAABgAEBAYABAQQAAYABAQGAAQEEAAHAAQMBwAEDBAAB4AEHAeABBwQAAfABDwHwAQ8EAAH4 - AR8B+AEfBAAE/wQACw== + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADu + CAAAAk1TRnQBSQFMAgEBAgIAAQ0BAAENARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA + AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA + AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm + AwABmQMAAcwCAAEzAwACMwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZ + AgABZgHMAgABZgH/AgABmQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFm + AgABzAGZAgACzAIAAcwB/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEz + AQABmQEAATMBAAHMAQABMwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFm + AgABMwFmATMBAAEzAmYBAAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFm + AQABMwKZAQABMwGZAcwBAAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEA + ATMBzAH/AQABMwH/ATMBAAEzAf8BZgEAATMB/wGZAQABMwH/AcwBAAEzAv8BAAFmAwABZgEAATMBAAFm + AQABZgEAAWYBAAGZAQABZgEAAcwBAAFmAQAB/wEAAWYBMwIAAWYCMwEAAWYBMwFmAQABZgEzAZkBAAFm + ATMBzAEAAWYBMwH/AQACZgIAAmYBMwEAA2YBAAJmAZkBAAJmAcwBAAFmAZkCAAFmAZkBMwEAAWYBmQFm + AQABZgKZAQABZgGZAcwBAAFmAZkB/wEAAWYBzAIAAWYBzAEzAQABZgHMAZkBAAFmAswBAAFmAcwB/wEA + AWYB/wIAAWYB/wEzAQABZgH/AZkBAAFmAf8BzAEAAcwBAAH/AQAB/wEAAcwBAAKZAgABmQEzAZkBAAGZ + AQABmQEAAZkBAAHMAQABmQMAAZkCMwEAAZkBAAFmAQABmQEzAcwBAAGZAQAB/wEAAZkBZgIAAZkBZgEz + AQABmQEzAWYBAAGZAWYBmQEAAZkBZgHMAQABmQEzAf8BAAKZATMBAAKZAWYBAAOZAQACmQHMAQACmQH/ + AQABmQHMAgABmQHMATMBAAFmAcwBZgEAAZkBzAGZAQABmQLMAQABmQHMAf8BAAGZAf8CAAGZAf8BMwEA + AZkBzAFmAQABmQH/AZkBAAGZAf8BzAEAAZkC/wEAAcwDAAGZAQABMwEAAcwBAAFmAQABzAEAAZkBAAHM + AQABzAEAAZkBMwIAAcwCMwEAAcwBMwFmAQABzAEzAZkBAAHMATMBzAEAAcwBMwH/AQABzAFmAgABzAFm + ATMBAAGZAmYBAAHMAWYBmQEAAcwBZgHMAQABmQFmAf8BAAHMAZkCAAHMAZkBMwEAAcwBmQFmAQABzAKZ + AQABzAGZAcwBAAHMAZkB/wEAAswCAALMATMBAALMAWYBAALMAZkBAAPMAQACzAH/AQABzAH/AgABzAH/ + ATMBAAGZAf8BZgEAAcwB/wGZAQABzAH/AcwBAAHMAv8BAAHMAQABMwEAAf8BAAFmAQAB/wEAAZkBAAHM + ATMCAAH/AjMBAAH/ATMBZgEAAf8BMwGZAQAB/wEzAcwBAAH/ATMB/wEAAf8BZgIAAf8BZgEzAQABzAJm + AQAB/wFmAZkBAAH/AWYBzAEAAcwBZgH/AQAB/wGZAgAB/wGZATMBAAH/AZkBZgEAAf8CmQEAAf8BmQHM + AQAB/wGZAf8BAAH/AcwCAAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEA + AcwB/wFmAQAC/wGZAQAC/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEA + ASEBAAGlAQADXwEAA3cBAAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7 + Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/9GAAEIBHIBCAoAARoBHAJ0 + ARwBGikAAXIBVQFaAlsBWgFVAU8IAAF0AXkBegLlAXoBeQF0JwACVQFaAVsC5AFbAVoCVQYAAXQCegTl + AXoBeQFSJQABTwFVAloEWwFaAlUBTwQAAVIBWQF6BuUBegJSIwABCAJVCFoCVQEIAgABGgFSAVkBegbl + AVkBWAFSARoiAAFPAlUHWgNVAU8CAAFMAVIKWQFSAUwiAAFPATQKVQE0AS4CAAFMAVIBUwhZAVMBUgFM + IgABLQMzBzQCMwEtAgACKwIyBlMCMgIrIgABTwEtATMIVQE0Ai0CAAFMAisIUwFSAisiAAEIAS0BVQiX + AVUBLQEIAgABGgErAVIIdQFSASsBGiMAAQIBlwiYAZcBLQQAASoBdAiaAXQBKyUAAU8BCAEbBcIB8QFP + BgABTAEaARsEGgEbARoBUicAAU8BCAHzAv8B8wEIAXIIAAFMARoE9gEaAXQpAAEIBHIBCAoAARoEdAEa + ZQABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEABP8EAAH4AR8B+AEfBAAB8AEP + AfABDwQAAeABBwHgAQcEAAHAAQMBwAEDBAABgAEBAYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABgAEB + AYABAQQAAYABAQGAAQEEAAGAAQEBgAEBBAABwAEDAcABAwQAAeABBwHgAQcEAAHwAQ8B8AEPBAAB+AEf + AfgBHwQABP8EAAs= diff --git a/app/TaskFlow/frmMain.vb b/app/TaskFlow/frmMain.vb index 2602b62..d807327 100644 --- a/app/TaskFlow/frmMain.vb +++ b/app/TaskFlow/frmMain.vb @@ -1429,6 +1429,13 @@ Public Class frmMain LOGGER.Warn("⚠️ ATTENTION: GROUP COLUMNS NOT PART OF GRID") End If End Try + Try + If GridViewWorkflows.Columns.ColumnByFieldName("ROW_COLOR") IsNot Nothing Then + GridViewWorkflows.Columns.Item("ROW_COLOR").Visible = False + End If + Catch ex As Exception + + End Try Catch ex As Exception LOGGER.Error(ex) @@ -1734,7 +1741,7 @@ Public Class frmMain End If ' ========== PROFILE VALIDIEREN ========== - If BASEDATA_DT_VW_PROFILE_USER.Rows.Count = 0 Then + If CURR_DT_VWPM_PROFILE_ACTIVE Is Nothing OrElse CURR_DT_VWPM_PROFILE_ACTIVE.Rows.Count = 0 Then LOGGER.Info("Attention: No profiles for user: '" & USER_USERNAME & "' configured!", False) NO_WORKFLOW_ITEMS = True bsiMessage.Caption = "NO PROFILES FOR USER" @@ -2951,6 +2958,10 @@ Public Class frmMain GridViewWorkflows.Columns.Item("GROUP_COLOR").Visible = False Catch ex As Exception End Try + Try + GridViewWorkflows.Columns.Item("ROW_COLOR").Visible = False + Catch ex As Exception + End Try For index = 0 To GridViewWorkflows.GroupCount - 1 'Dim v = GridViewWorkflows.GroupedColumns(index).ToString LOGGER.Debug($"Adding tag [{GridViewWorkflows.Columns.Item("PROFILE_ID")}] for group...") @@ -3020,7 +3031,7 @@ Public Class frmMain End If ' ========== DATEN VALIDIEREN ========== - If BASEDATA_DT_VW_PROFILE_USER.Rows.Count = 0 Then + If CURR_DT_VWPM_PROFILE_ACTIVE Is Nothing OrElse CURR_DT_VWPM_PROFILE_ACTIVE.Rows.Count = 0 Then LOGGER.Info("Attention: No profiles for user: '" & USER_USERNAME & "' configured!", False) NO_WORKFLOW_ITEMS = True bsiMessage.Caption = "NO PROFILES FOR USER" diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 447bcff..97b4859 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -52,7 +52,7 @@ Public Class frmValidator ''' ''' Contains all grid columns for the current profile which have an sql but don't have a reference to a control ''' - Private Property DT_COLUMNS_GRID_WITH_SQL As DataTable + Private Property DT_GRID_COLUMNS_WITH_SQL As DataTable ''' ''' Contains all grid columns for the current profile which have an sql and have a reference to a control @@ -146,6 +146,9 @@ Public Class frmValidator ' ========== BUGFIX START: Alte SelectedValues SICHERN bevor DataSource überschrieben wird ========== Private previousLUSelectedValues As List(Of String) = Nothing Private hadPreviousLUSelection As Boolean = False + Private _idbBatchOpen As Boolean = False + Private _idbBatchDocId As Long = 0 + Private ReadOnly _idbBatchProcessedControlIds As New HashSet(Of Integer)() Private Class Translation_Strings Inherits My.Resources.frmValidator_Strings @@ -301,7 +304,7 @@ Public Class frmValidator ' === MESSPUNKT 1: Start === Dim perfStart As DateTime = If(LOG_HOTSPOTS, DateTime.Now, Nothing) Dim perfLastCheck As DateTime = perfStart - If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF frmValidation_Load] START") + If LOG_HOTSPOTS Then MyValidationLogger.Debug($"[PERF frmValidation_Load] START") Try MyValidationLogger.Debug("###frmValidation_Load###") @@ -330,7 +333,7 @@ Public Class frmValidator If LOG_HOTSPOTS Then - MyValidationLogger.Info($"[PERF frmValidation_Load] Nach Initialisierung: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") + MyValidationLogger.Debug($"[PERF frmValidation_Load] Nach Initialisierung: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") perfLastCheck = DateTime.Now End If @@ -410,7 +413,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbcrlf & ex.Message, MsgBoxStyle.Critical, "Attention:") + MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Attention:") MyValidationLogger.Info(">> Error in LOADING profile-data: " & ex.Message, True) Me.Close() End Try @@ -425,18 +428,14 @@ Public Class frmValidator End If _step = 4 - MyValidationLogger.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 - MyValidationLogger.Debug("Step 5") If CURRENT_DT_PROFILE.Rows.Count = 1 Then _step = 6 - MyValidationLogger.Debug("Step 6") - Dim profileLangAll = CURRENT_DT_PROFILE_LANGUAGE.AsEnumerable(). GroupBy(Function(r) r.Field(Of String)("TITLE")). ToDictionary(Function(g) g.Key, Function(g) g.First()) @@ -546,7 +545,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error loading final profile text:" & vbcrlf & ex.Message, MsgBoxStyle.Critical, "Attention:") + MsgBox("Error loading final profile text:" & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Attention:") MyValidationLogger.Info(">> Error loading final profile text: " & ex.Message, True) End Try @@ -681,7 +680,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error LOADING Profile-Data1:" & vbcrlf & ex.Message, MsgBoxStyle.Critical, "Attention:") + MsgBox("Error LOADING Profile-Data1:" & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Attention:") MyValidationLogger.Info("Unexpected error in LOADING Profile-Data1: " & ex.Message) End Try End Sub @@ -698,6 +697,9 @@ Public Class frmValidator RemoveHandler gv.CellValueChanged, AddressOf GridView_CellValueChanged RemoveHandler gv.KeyDown, AddressOf GridView_KeyDown RemoveHandler gv.RowDeleting, AddressOf GridView_RowDeleting + RemoveHandler gv.ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit + RemoveHandler gv.ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql + RemoveHandler gv.HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp ' DataSource-Events ebenfalls trennen If TypeOf gv.DataController.DataSource Is DataTable Then Dim dt = DirectCast(gv.DataController.DataSource, DataTable) @@ -722,7 +724,7 @@ Public Class frmValidator End If _isClosingGuard = True _FormClosing = True - + RollbackIdbBatchIfOpen("FormClosing") ' KRITISCH: Dokument freigeben bevor Form schließt If Current_Document IsNot Nothing Then PRTF_PROFILE_FILES_WORK("FreeFile") @@ -821,7 +823,7 @@ Public Class frmValidator DatabaseFallback.ExecuteNonQueryECM(oSQL) Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error in delete jumped files:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) + MsgBox("Error in delete jumped files:" & vbCrLf & ex.Message, MsgBoxStyle.Critical) End Try If LOG_HOTSPOTS Then @@ -1269,10 +1271,10 @@ 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}]") + '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 originalValueMember = lookup.Properties.ValueMember Dim originalDisplayMember = lookup.Properties.DisplayMember @@ -1308,7 +1310,7 @@ Public Class frmValidator If exists Then validValues.Add(oldValue) - MyValidationLogger.Debug($"[LoadSQLData BUGFIX] Wert [{oldValue}] existiert im neuen DataSource ✓") + 'MyValidationLogger.Debug($"[LoadSQLData BUGFIX] Wert [{oldValue}] existiert im neuen DataSource ✓") Else MyValidationLogger.Warn($"⚠️ [LoadSQLData BUGFIX] Wert [{oldValue}] existiert NICHT im neuen DataSource ✗") End If @@ -1341,19 +1343,35 @@ Public Class frmValidator ElseIf TypeOf control Is Windows.Forms.ComboBox Then Try Dim oMyComboBox As Windows.Forms.ComboBox = control - ' Aktuellen TEXT sichern (nicht Index – der kann nach Refresh an anderer Position sein) + ' Aktuellen TEXT sichern (stabiler als SelectedIndex bei Refresh) Dim previousText As String = oMyComboBox.Text - Dim oselectedIndex = oMyComboBox.SelectedIndex - MyValidationLogger.Debug($"oMyComboBox {oMyComboBox.Name} - Saving selected index {oselectedIndex}") + MyValidationLogger.Debug($"oMyComboBox {oMyComboBox.Name} - Saving text [{previousText}]") Dim list As New List(Of String) For Each _row As DataRow In oDTContent.Rows - list.Add(_row.Item(0)) + list.Add(_row.Item(0).ToString()) Next - oMyComboBox.DataSource = list - oMyComboBox.SelectedIndex = oselectedIndex + oMyComboBox.BeginUpdate() + Try + oMyComboBox.DataSource = Nothing + oMyComboBox.DataSource = list + Finally + oMyComboBox.EndUpdate() + End Try + + ' Restore per Wert statt per Index + If Not String.IsNullOrWhiteSpace(previousText) Then + Dim restoreIndex As Integer = oMyComboBox.FindStringExact(previousText) + If restoreIndex >= 0 Then + oMyComboBox.SelectedIndex = restoreIndex + Else + oMyComboBox.SelectedIndex = -1 + End If + Else + oMyComboBox.SelectedIndex = -1 + End If Catch ex As Exception MyValidationLogger.Warn("⚠️ Error in ComboBoxLoadSQLData: " & ex.Message) @@ -1438,7 +1456,7 @@ Public Class frmValidator .SortByColumn = "SEQUENCE" }) oSQL = "SELECT T1.GUID As CONTROL_ID, T1.PROFIL_ID, T.CONNECTION_ID, T.SQL_COMMAND, T.SPALTENNAME,T.FORMATTYPE,T.FORMATSTRING, T.ADVANCED_LOOKUP from TBPM_CONTROL_TABLE T WITH (NOLOCK), TBPM_PROFILE_CONTROLS T1 WITH (NOLOCK) WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T1.PROFIL_ID = " & CURRENT_ProfilGUID & " AND LEN(T.SQL_COMMAND) > 0 ORDER BY T.SEQUENCE" - DT_COLUMNS_GRID_WITH_SQL = DatabaseFallback.GetDatatable("DTGRID_SQL_DEFINITION", New GetDatatableOptions(oSQL, DatabaseType.ECM) With { + DT_GRID_COLUMNS_WITH_SQL = DatabaseFallback.GetDatatable("DTGRID_SQL_DEFINITION", New GetDatatableOptions(oSQL, DatabaseType.ECM) With { .FilterExpression = $"PROFIL_ID = {CURRENT_ProfilGUID}", .SortByColumn = "SEQUENCE" }) @@ -1482,7 +1500,6 @@ Public Class frmValidator Try oControlInfo = ClassControlCreator.PREFIX_TEXTBOX & "#" & oControlInfo - MyValidationLogger.Debug($"[{oControlInfo}] - TXT Try to create control...") Dim txt As BaseEdit = ControlCreator.CreateExistingTextbox(oControlRow, False) If oIndexName = "@@DISPLAY_ONLY" Then @@ -1495,7 +1512,6 @@ Public Class frmValidator AddHandler txt.EditValueChanged, AddressOf OnTextBoxEditValueChanged oMyControl = txt - MyValidationLogger.Debug($"[{oControlInfo}] - TXT Created!!") Catch ex As Exception MyValidationLogger.Warn($"⚠️ Unexpected error in Create_Controls TXT [{oControlInfo}]: {ex.Message}") End Try @@ -1622,15 +1638,15 @@ Public Class frmValidator Dim MyLookupControl As LookupControl3 = ControlCreator.CreateExistingLookupControl(oControlRow, False) MyLookupControl.Properties.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES") - 'MyLookupControl.Properties.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM") MyLookupControl.Properties.MultiSelect = oMultiselect - Dim oCommandSQL_UBPF + + Dim oCommandSQL_UBPF As String = "" Try - oCommandSQL_UBPF = oControlRow.Item("SQL_UEBERPRUEFUNG") - oCommandSQL_UBPF = oControlRow.Item("SQL_UEBERPRUEFUNG") + oCommandSQL_UBPF = oControlRow.ItemEx("SQL_UEBERPRUEFUNG", "") Catch ex As Exception oCommandSQL_UBPF = "" End Try + If oCommandSQL_UBPF <> String.Empty Then Try oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG"), "String") @@ -1642,7 +1658,7 @@ Public Class frmValidator Dim oDT As DataTable = GetCachedDatatable(oSQL, 1) MyLookupControl.Properties.DataSource = Nothing - If Not IsNothing(oDT) AndAlso oDT.Rows.Count > 0 Then + If oDT IsNot Nothing AndAlso oDT.Rows.Count > 0 Then MyLookupControl.Properties.DataSource = oDT MyLookupControl.Properties.ValueMember = oDT.Columns.Item(0).ColumnName MyLookupControl.Properties.DisplayMember = oDT.Columns.Item(0).ColumnName @@ -1653,37 +1669,44 @@ Public Class frmValidator End Try End If - If ObjectEx.NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then MyLookupControl.Properties.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")} End If oMyControl = MyLookupControl _CachedLookupControlsByRepository(MyLookupControl.Properties) = MyLookupControl + + RemoveHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf LookupListChanged + RemoveHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue + RemoveHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue_Control2Set + AddHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf LookupListChanged - Dim oFilteredData As DataTable = DT_CONTROLS.Clone() - Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oMyControl.Name}%'" - DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredData, LoadOption.PreserveChanges) - If oFilteredData.Rows.Count >= 1 Then - MyValidationLogger.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which are depending on {oMyControl.Name}") - AddHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue + Dim needsLookupHandler As Boolean = False + Dim oExpression As String + Dim rows() As DataRow + + oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{oMyControl.Name}%'" + rows = DT_CONTROLS.Select(oExpression) + If rows IsNot Nothing AndAlso rows.Length > 0 Then + needsLookupHandler = True End If - oFilteredData = DT_CONTROLS.Clone() + oExpression = $"SQL_ENABLE like '%#CTRL#{oMyControl.Name}%'" - DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredData, LoadOption.PreserveChanges) - If oFilteredData.Rows.Count >= 1 Then - MyValidationLogger.Debug($"createControlsLU - Found {oFilteredData.Rows.Count} Controls which' enable state is depending on {oMyControl.Name}") + rows = DT_CONTROLS.Select(oExpression) + If rows IsNot Nothing AndAlso rows.Length > 0 Then + needsLookupHandler = True + End If + + If needsLookupHandler Then AddHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue End If - oFilteredData = DT_CONTROLS.Clone() oExpression = $"GUID = {oControlRow.Item("GUID")} and Len(SET_CONTROL_DATA) > 0" - DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredData, LoadOption.PreserveChanges) - If oFilteredData.Rows.Count = 1 Then + rows = DT_CONTROLS.Select(oExpression) + If rows IsNot Nothing AndAlso rows.Length = 1 Then AddHandler MyLookupControl.Properties.SelectedValuesChanged, AddressOf onLookUpselectedValue_Control2Set End If - oFilteredData = DT_CONTROLS.Clone() AddHandler MyLookupControl.GotFocus, Sub(sender As Control, e As EventArgs) If DirectCast(MyLookupControl.Tag, ClassControlCreator.ControlMetadata).ReadOnly = False Then @@ -1727,6 +1750,10 @@ Public Class frmValidator AddHandler DirectCast(oGrid.DataSource, DataTable).RowDeleted, AddressOf GridDataSource_RowDeleted AddHandler DirectCast(oGrid.MainView, GridView).KeyDown, AddressOf GridView_KeyDown AddHandler DirectCast(oGrid.MainView, GridView).RowDeleting, AddressOf GridView_RowDeleting + ' NEU: Dropdown-SQL bei Editor-Öffnung erneut vorbereiten + AddHandler DirectCast(oGrid.MainView, GridView).ShowingEditor, AddressOf GridView_ShowingEditor_EnsureLookupColumnEdit + AddHandler DirectCast(oGrid.MainView, GridView).ShownEditor, AddressOf GridView_ShownEditor_RefreshLookupSql + AddHandler DirectCast(oGrid.MainView, GridView).HiddenEditor, AddressOf GridView_HiddenEditor_DetachQueryPopUp Case "LINE" oMyControl = ControlCreator.CreateExistingLine(oControlRow, False) @@ -1736,7 +1763,6 @@ Public Class frmValidator AddHandler obutton.Click, AddressOf onCustomButtonClick oMyControl = obutton End Select - MyValidationLogger.Debug($"[{oControlInfo}]: End of Select...") If TypeOf oMyControl IsNot Label Then listofControls.Add(oMyControl.Name) @@ -1819,6 +1845,10 @@ Public Class frmValidator End Sub Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs) + If _SetControlValue_In_Action Then + 'MyValidationLogger.Debug("OnTextBoxLostFocus skipped (_SetControlValue_In_Action=True)") + Exit Sub + End If CountAction += 1 Dim oTextbox As BaseEdit = TryCast(sender, BaseEdit) @@ -2177,11 +2207,19 @@ Public Class frmValidator End Sub Public Sub onLookUpselectedValue(sender As Object, SelectedValues As List(Of String)) + If _SetControlValue_In_Action Then + ' MyValidationLogger.Debug("onLookUpselectedValue skipped (_SetControlValue_In_Action=True)") + Exit Sub + End If Try + If _FormLoaded = False Or _suppressLookupEvents Then + ' MyValidationLogger.Debug("onLookUpselectedValue suppressed (global guard active)") + Exit Sub + End If MyValidationLogger.Debug("onLookUpselectedValue") ' *** GLOBALER GUARD: Bei Refresh KOMPLETT blockieren *** If _FormLoaded = False Or _suppressLookupEvents Then - MyValidationLogger.Debug("onLookUpselectedValue suppressed (global guard active)") + 'MyValidationLogger.Debug("onLookUpselectedValue suppressed (global guard active)") ' FIX: Auch unter Guard tracken, wenn Formular bereits geladen ist. ' Verhindert, dass FillIndexValues-Resets das Dirty-Tracking überschreiben. @@ -2251,13 +2289,16 @@ Public Class frmValidator Private Const MAX_LOOKUP_DEPTH As Integer = 5 Public Sub LookupListChanged(sender As Object, SelectedValues As List(Of String)) + If _SetControlValue_In_Action Then + 'MyValidationLogger.Debug("LookupListChanged skipped (_SetControlValue_In_Action=True)") + Exit Sub + End If If _FormLoaded = False Or PanelValidatorControl.Enabled = False Then Exit Sub End If - ' *** GLOBALER GUARD: Blockiert ALLE Lookup-Updates während Verarbeitung *** If _suppressLookupEvents Then - MyValidationLogger.Debug("LookupListChanged suppressed (global guard active)") + 'MyValidationLogger.Debug("LookupListChanged suppressed (global guard active)") Exit Sub End If ' *** DEPTH-GUARD: Verhindert extrem tiefe Rekursionen *** @@ -2323,10 +2364,175 @@ Public Class frmValidator _suppressLookupEvents = False ' <-- Globaler Guard deaktivieren End Try End Sub + Private Sub GridView_ShowingEditor_EnsureLookupColumnEdit(sender As Object, e As CancelEventArgs) + Try + Dim oView As GridView = TryCast(sender, GridView) + If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub + + ' KRITISCH: vor Editor-Erstellung laden/zuweisen + RefreshGridDropdownSqlForCurrentColumn(oView) + + Dim hasEdit As Boolean = (oView.FocusedColumn.ColumnEdit IsNot Nothing) + MyValidationLogger.Debug($"[GridRefresh] ShowingEditor: Column=[{oView.FocusedColumn.FieldName}], HasColumnEdit=[{hasEdit}]") + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [GridView_ShowingEditor_EnsureLookupColumnEdit] {ex.Message}") + End Try + End Sub + Private Sub GridView_ShownEditor_RefreshLookupSql(sender As Object, e As EventArgs) + Try + Dim oView As GridView = TryCast(sender, GridView) + If oView Is Nothing OrElse oView.ActiveEditor Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub + + MyValidationLogger.Debug($"[GridRefresh] ShownEditor: Column=[{oView.FocusedColumn.FieldName}], Editor=[{oView.ActiveEditor.GetType().Name}]") + + ' WICHTIG: initial sofort laden (nicht erst bei QueryPopUp) + RefreshGridDropdownSqlForCurrentColumn(oView) + + Dim oPopupEditor As PopupBaseEdit = TryCast(oView.ActiveEditor, PopupBaseEdit) + If oPopupEditor Is Nothing Then Exit Sub + + RemoveHandler oPopupEditor.QueryPopUp, AddressOf GridEditor_QueryPopUpRefreshSql + AddHandler oPopupEditor.QueryPopUp, AddressOf GridEditor_QueryPopUpRefreshSql + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [GridView_ShownEditor_RefreshLookupSql] {ex.Message}") + End Try + End Sub + Private Sub GridView_HiddenEditor_DetachQueryPopUp(sender As Object, e As EventArgs) + Try + Dim oView As GridView = TryCast(sender, GridView) + If oView Is Nothing Then Exit Sub + + Dim oPopupEditor As PopupBaseEdit = TryCast(oView.ActiveEditor, PopupBaseEdit) + If oPopupEditor Is Nothing Then Exit Sub + + RemoveHandler oPopupEditor.QueryPopUp, AddressOf GridEditor_QueryPopUpRefreshSql + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [GridView_HiddenEditor_DetachQueryPopUp] {ex.Message}") + End Try + End Sub + Private Sub GridEditor_QueryPopUpRefreshSql(sender As Object, e As CancelEventArgs) + Try + Dim oEditor As PopupBaseEdit = TryCast(sender, PopupBaseEdit) + If oEditor Is Nothing Then Exit Sub + + Dim oView As GridView = Nothing + For Each ctrl As Control In PanelValidatorControl.Controls + If TypeOf ctrl Is GridControl Then + Dim gc = DirectCast(ctrl, GridControl) + Dim gv = TryCast(gc.FocusedView, GridView) + If gv IsNot Nothing AndAlso gv.ActiveEditor Is oEditor Then + oView = gv + Exit For + End If + End If + Next + + If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub + + Dim oMeta As ClassControlCreator.ControlMetadata = TryCast(oView.GridControl.Tag, ClassControlCreator.ControlMetadata) + If oMeta Is Nothing Then Exit Sub + + Dim oControlId As Integer = oMeta.Guid + Dim oColumnName As String = oView.FocusedColumn.FieldName + + Dim oRows = DT_GRID_COLUMNS_WITH_SQL.Select($"CONTROL_ID = {oControlId} AND SPALTENNAME = '{oColumnName.Replace("'", "''")}'") + If oRows Is Nothing OrElse oRows.Length = 0 Then Exit Sub + + For Each oRow As DataRow In oRows + Dim oConnId As Integer = oRow.ItemEx("CONNECTION_ID", 1) + Dim oSql As String = oRow.ItemEx("SQL_COMMAND", String.Empty) + Dim oAdvancedLookup = oRow.ItemEx("ADVANCED_LOOKUP", False) + + If String.IsNullOrWhiteSpace(oSql) Then Continue For + + oSql = clsPatterns.ReplaceAllValues(oSql, PanelValidatorControl, True) + If String.IsNullOrWhiteSpace(oSql) OrElse clsPatterns.HasComplexPatterns(oSql) Then Continue For + + Dim cacheKey = $"{oConnId}|{oSql}" + If _CachedSqlDataCache.ContainsKey(cacheKey) Then + _CachedSqlDataCache.Remove(cacheKey) + End If + + Dim oDT = GetCachedDatatable(oSql, oConnId) + If oDT IsNot Nothing Then + ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSql, oConnId, oAdvancedLookup) + End If + Next + + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [GridEditor_QueryPopUpRefreshSql] {ex.Message}") + End Try + End Sub + + Private Sub RefreshGridDropdownSqlForCurrentColumn(oView As GridView) + If oView Is Nothing OrElse oView.FocusedColumn Is Nothing Then Exit Sub + + Dim oMeta = TryCast(oView.GridControl.Tag, ClassControlCreator.ControlMetadata) + If oMeta Is Nothing Then Exit Sub + + Dim oControlId As Integer = oMeta.Guid + Dim oFieldName As String = oView.FocusedColumn.FieldName + Dim oRows = ResolveGridSqlRows(oControlId, oFieldName) + + If oRows Is Nothing OrElse oRows.Length = 0 Then + Dim available = DT_GRID_COLUMNS_WITH_SQL.AsEnumerable(). + Where(Function(r) r.ItemEx("CONTROL_ID", 0) = oControlId). + Select(Function(r) r.ItemEx("SPALTENNAME", String.Empty)). + Distinct(). + ToList() + + MyValidationLogger.Debug($"[GridRefresh] No SQL-definition for column [{oFieldName}] (ControlId={oControlId}). Available: [{String.Join(", ", available)}]") + Exit Sub + End If + + For Each oRow As DataRow In oRows + Dim oConnId As Integer = oRow.ItemEx("CONNECTION_ID", 1) + Dim oSql As String = oRow.ItemEx("SQL_COMMAND", String.Empty) + Dim oAdvancedLookup As Boolean = oRow.ItemEx("ADVANCED_LOOKUP", False) + + If String.IsNullOrWhiteSpace(oSql) Then Continue For + + oSql = clsPatterns.ReplaceAllValues(oSql, PanelValidatorControl, True) + If String.IsNullOrWhiteSpace(oSql) OrElse clsPatterns.HasComplexPatterns(oSql) Then Continue For + + Dim cacheKey = $"{oConnId}|{oSql}" + If _CachedSqlDataCache.ContainsKey(cacheKey) Then _CachedSqlDataCache.Remove(cacheKey) + + ControlCreator.GridTables_CacheDatatableForColumn(oControlId, oFieldName, oSql, oConnId, oAdvancedLookup) + + If ControlCreator.GridTables.ContainsKey(oControlId) AndAlso ControlCreator.GridTables(oControlId).ContainsKey(oFieldName) Then + oView.FocusedColumn.ColumnEdit = ControlCreator.GridTables(oControlId)(oFieldName) + MyValidationLogger.Debug($"[GridRefresh] ColumnEdit assigned for [{oFieldName}]") + End If + Next + End Sub + Private Function ResolveGridSqlRows(controlId As Integer, fieldName As String) As DataRow() + If DT_GRID_COLUMNS_WITH_SQL Is Nothing OrElse DT_GRID_COLUMNS_WITH_SQL.Rows.Count = 0 Then + Return Array.Empty(Of DataRow)() + End If + + Dim escapedField = fieldName.Replace("'", "''") + Dim exact = DT_GRID_COLUMNS_WITH_SQL.Select($"CONTROL_ID = {controlId} AND SPALTENNAME = '{escapedField}'") + If exact IsNot Nothing AndAlso exact.Length > 0 Then + Return exact + End If + + Dim normalizedField = fieldName + If normalizedField.StartsWith("col", StringComparison.OrdinalIgnoreCase) AndAlso normalizedField.Length > 3 Then + normalizedField = normalizedField.Substring(3) + End If + + Dim fallback = DT_GRID_COLUMNS_WITH_SQL.AsEnumerable(). + Where(Function(r) r.ItemEx("CONTROL_ID", 0) = controlId). + Where(Function(r) String.Equals(r.ItemEx("SPALTENNAME", String.Empty), normalizedField, StringComparison.OrdinalIgnoreCase)). + ToArray() + + Return fallback + End Function Private Sub GridView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs) ' Prevent cascading events during validation If _isShowingErrorDialog Then - MyValidationLogger.Debug("GridView_CellValueChanged suppressed (currently showing error dialog)") + 'MyValidationLogger.Debug("GridView_CellValueChanged suppressed (currently showing error dialog)") Return End If Dim oView As GridView = sender @@ -2502,6 +2708,10 @@ Public Class frmValidator End Try End Sub Public Sub onCheckBox_CheckedChange(sender As Object, e As EventArgs) + If _SetControlValue_In_Action Then + 'MyValidationLogger.Debug("onCheckBox_CheckedChange skipped (_SetControlValue_In_Action=True)") + Exit Sub + End If MyValidationLogger.Debug("onCheckBox_CheckedChange") If _FormLoaded = False Then @@ -2526,13 +2736,35 @@ Public Class frmValidator End Try End Sub Public Sub onLookUpselectedValue_Control2Set(sender As Object, SelectedValues As List(Of String)) - - If _FormLoaded = False Or PanelValidatorControl.Enabled = False Then + If _SetControlValue_In_Action Then + 'MyValidationLogger.Debug("onLookUpselectedValue_Control2Set skipped (_SetControlValue_In_Action=True)") Exit Sub End If + + If _suppressLookupEvents Then + 'MyValidationLogger.Debug("onLookUpselectedValue_Control2Set skipped (_suppressLookupEvents=True)") + Exit Sub + End If + + If _FormLoaded = False OrElse PanelValidatorControl.Enabled = False Then + Exit Sub + End If + + If SelectedValues Is Nothing OrElse SelectedValues.Count = 0 Then + Exit Sub + End If + + Dim oRepositoryItem As RepositoryItemLookupControl3 = TryCast(sender, RepositoryItemLookupControl3) + If oRepositoryItem Is Nothing Then + Exit Sub + End If + + Dim oLookup As LookupControl3 = TryCast(oRepositoryItem.OwnerEdit, LookupControl3) + If oLookup Is Nothing Then + Exit Sub + End If + MyValidationLogger.Debug("onLookUpselectedValue_Control2Set") - Dim oRepositoryItem As RepositoryItemLookupControl3 = sender - Dim oLookup As LookupControl3 = oRepositoryItem.OwnerEdit SetControlValues_FromControl(oLookup) End Sub @@ -2587,15 +2819,25 @@ Public Class frmValidator oControlDataSql = clsPatterns.ReplaceAllValues(oControlDataSql, PanelValidatorControl, True) MyValidationLogger.Debug($"[SetControlValues_FromControl] Nach ReplaceAllValues: [{oControlDataSql}]") + Dim cacheKey As String = $"{oConnectionId}|{oControlDataSql}" + MyValidationLogger.Debug($"[SetControlValues_FromControl][DBG] CacheKey=[{cacheKey}], CacheHit={_CachedSqlDataCache.ContainsKey(cacheKey)}") + + Dim oControlDataResult As DataTable = GetCachedDatatable(oControlDataSql, oConnectionId) If oControlDataResult Is Nothing Then MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] SQL returned Nothing for control [{oControlname2Set}]") Exit Sub End If - MyValidationLogger.Debug($"[SetControlValues_FromControl] SQL returned {oControlDataResult.Rows.Count} rows") + Dim availableGuids = PanelValidatorControl.Controls.Cast(Of Control)(). + Select(Function(c) TryCast(c.Tag, ClassControlCreator.ControlMetadata)). + Where(Function(m) m IsNot Nothing). + Select(Function(m) m.Guid). + OrderBy(Function(g) g). + ToList() + MyValidationLogger.Debug($"[SetControlValues_FromControl] Available panel GUIDs: {String.Join(",", availableGuids)}") Dim oButtonFinishSet As Boolean = False ' ========== NEU: Liste der geänderten Controls für Enable-Check ========== @@ -2678,9 +2920,46 @@ Public Class frmValidator Case oControl.GetType() = GetType(LookupControl3) Try Dim oDependingLookup As LookupControl3 = oControl - Dim oldValues = If(oDependingLookup.Properties.SelectedValues IsNot Nothing, - String.Join(",", oDependingLookup.Properties.SelectedValues), - "") + Dim oValueToSet As String = oResultRow.ItemEx("SelectedValue", oControlCaption) + + If String.IsNullOrWhiteSpace(oValueToSet) Then + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Lookup [{oControl.Name}]: Kein Wert zum Setzen.") + Exit Select + End If + + Dim valueMember As String = oDependingLookup.Properties.ValueMember + Dim valueExists As Boolean = False + + Dim dt As DataTable = TryCast(oDependingLookup.Properties.DataSource, DataTable) + If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then + If String.IsNullOrWhiteSpace(valueMember) OrElse Not dt.Columns.Contains(valueMember) Then + valueMember = dt.Columns(0).ColumnName + End If + + valueExists = dt.AsEnumerable().Any(Function(r) r.Item(valueMember).ToString() = oValueToSet) + End If + + ' Neu: Wenn Wert fehlt -> DataSource neu laden + Cache erneuern + If Not valueExists Then + MyValidationLogger.Debug($"[SetControlValues_FromControl] Lookup [{oControl.Name}]: Wert [{oValueToSet}] fehlt -> Reload DataSource") + Dim reloadOk = ReloadLookupDataSourceFromSql(oDependingLookup, oMeta) + + If reloadOk Then + dt = TryCast(oDependingLookup.Properties.DataSource, DataTable) + valueMember = oDependingLookup.Properties.ValueMember + If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then + If String.IsNullOrWhiteSpace(valueMember) OrElse Not dt.Columns.Contains(valueMember) Then + valueMember = dt.Columns(0).ColumnName + End If + valueExists = dt.AsEnumerable().Any(Function(r) r.Item(valueMember).ToString() = oValueToSet) + End If + End If + End If + + If Not valueExists Then + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Lookup [{oControl.Name}]: Wert [{oValueToSet}] weiterhin nicht vorhanden.") + Exit Select + End If If oDependingLookup.Properties.SelectedValues Is Nothing Then oDependingLookup.Properties.SelectedValues = New List(Of String)() @@ -2688,31 +2967,24 @@ Public Class frmValidator If oDependingLookup.Properties.MultiSelect = True Then If oControlTextOption = "Replace" Then - oDependingLookup.Properties.SelectedValues = New List(Of String) From {oControlCaption} - Else - oDependingLookup.Properties.SelectedValues.Add(oControlCaption) + oDependingLookup.Properties.SelectedValues = New List(Of String) From {oValueToSet} + ElseIf Not oDependingLookup.Properties.SelectedValues.Contains(oValueToSet) Then + oDependingLookup.Properties.SelectedValues.Add(oValueToSet) End If Else - oDependingLookup.Properties.SelectedValues = New List(Of String) From {oControlCaption} + oDependingLookup.Properties.SelectedValues = New List(Of String) From {oValueToSet} End If - Dim newValues = If(oDependingLookup.Properties.SelectedValues IsNot Nothing, - String.Join(",", oDependingLookup.Properties.SelectedValues), - "") - MyValidationLogger.Debug($"[SetControlValues_FromControl] Lookup [{oControl.Name}]: '{oldValues}' → '{newValues}' (Mode: {oControlTextOption})") oMeta.IsDirty = True - ' FIX: IDB-Cache-Bypass → immer indexieren If Not _listForceReindex.Contains(oControl.Name) Then _listForceReindex.Add(oControl.Name) - MyValidationLogger.Debug($"[SetControlValues_FromControl] Force-Reindex vorgemerkt für: [{oControl.Name}]") End If clsPatterns.UpdateControlInCache(oMeta.Name, oDependingLookup.Properties.SelectedValues) - ' ========== NEU: Control für Enable-Check vormerken ========== If Not changedControlNames.Contains(oControl.Name) Then changedControlNames.Add(oControl.Name) End If - ' ========== ENDE NEU ========== + Catch ex As Exception MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error while Control2Set (LookupControl3): {ex.Message}") End Try @@ -2886,13 +3158,21 @@ Public Class frmValidator OrderBy(Function(r) r.Field(Of Integer)("SEQUENCE")) If gridColRows.Any() Then oDTColumnsPerDevExGrid = gridColRows.CopyToDataTable() End If + If oDTColumnsPerDevExGrid Is Nothing Then oDTColumnsPerDevExGrid = DT_COLUMNS_GRID.Clone() MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] GridControl [{oControl.Name}]: Keine Spalten-Definition gefunden!") End If MyValidationLogger.Debug($"[SetControlValues_FromControl] GridControl [{oControl.Name}]: Reload (Index: {oGridSourceIndexName})") - FillGridControlFromSource(oMyGridControl, oDTColumnsPerDevExGrid, oGridSourceIndexName, oGridTyp, oGridIDBTyp, False, oGridIsReadOnly, True, True) + ReloadGridWithOverlaySafe(oMyGridControl, oDTColumnsPerDevExGrid, oGridSourceIndexName, oGridTyp, oGridIDBTyp, oGridIsReadOnly) + + ' Fallback nur wenn DataSource wirklich nicht nutzbar: + Dim dsAfter As DataTable = TryCast(oMyGridControl.DataSource, DataTable) + If dsAfter Is Nothing OrElse dsAfter.Columns.Count = 0 Then + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] GridControl [{oControl.Name}] DataSource nicht nutzbar -> Fallback ReloadGridDataSourceFromSql") + ReloadGridDataSourceFromSql(oMyGridControl, oMeta) + End If oMeta.IsDirty = True If Not _listForceReindex.Contains(oControl.Name) Then @@ -2938,6 +3218,280 @@ Public Class frmValidator MyValidationLogger.Debug($"[SetControlValues_FromControl] END für Control: [{oControlName}], ButtonFinishSet={oButtonFinishSet}") End Sub + Private Sub ReloadGridWithOverlaySafe( + pGrid As GridControl, + pColumns As DataTable, + pSourceIndexName As String, + pTyp As String, + pIDBTyp As String, + pIsReadOnly As Boolean) + + Dim overlayHandle As Object = Nothing + Dim view As GridView = TryCast(pGrid.MainView, GridView) + Dim dt As DataTable = TryCast(pGrid.DataSource, DataTable) + + Try + Try + overlayHandle = SplashScreenManager.ShowOverlayForm(pGrid) + Catch ex As Exception + MyValidationLogger.Debug($"[ReloadGridWithOverlaySafe] Overlay konnte nicht geöffnet werden: {ex.Message}") + End Try + + pGrid.BeginUpdate() + If view IsNot Nothing Then + view.BeginDataUpdate() + End If + If dt IsNot Nothing Then + dt.BeginLoadData() + End If + + FillGridControlFromSource( + pGrid, + pColumns, + pSourceIndexName, + pTyp, + pIDBTyp, + False, + pIsReadOnly, + True, + False) + + If dt IsNot Nothing Then + dt.EndLoadData() + dt.AcceptChanges() + End If + + pGrid.ForceInitialize() + pGrid.RefreshDataSource() + If view IsNot Nothing Then + view.RefreshData() + view.LayoutChanged() + End If + + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [ReloadGridWithOverlaySafe] Fehler: {ex.Message}") + Finally + Try + If dt IsNot Nothing AndAlso dt.IsInitialized Then + ' no-op, nur defensive Struktur + End If + Catch + End Try + + If view IsNot Nothing Then + Try + view.EndDataUpdate() + Catch + End Try + End If + + Try + pGrid.EndUpdate() + Catch + End Try + + If overlayHandle IsNot Nothing Then + Try + SplashScreenManager.CloseOverlayForm(overlayHandle) + Catch ex As Exception + MyValidationLogger.Debug($"[ReloadGridWithOverlaySafe] Overlay-Close-Fehler: {ex.Message}") + End Try + End If + End Try + End Sub + Private Function ReloadLookupDataSourceFromSql(pLookup As LookupControl3, pMeta As ClassControlCreator.ControlMetadata) As Boolean + Try + If DT_CONTROLS Is Nothing OrElse DT_CONTROLS.Rows.Count = 0 Then + Return False + End If + + Dim controlRow = DT_CONTROLS.AsEnumerable(). + FirstOrDefault(Function(r) CInt(r.Item("GUID")) = pMeta.Guid) + + If controlRow Is Nothing Then + MyValidationLogger.Warn($"⚠️ [ReloadLookupDataSourceFromSql] Keine Control-Definition für GUID [{pMeta.Guid}] gefunden.") + Return False + End If + + Dim connectionId As Integer = controlRow.ItemEx("CONNECTION_ID", 1) + If connectionId <= 0 Then + connectionId = 1 + End If + Dim sql As String = controlRow.ItemEx("SQL_UEBERPRUEFUNG", String.Empty) + + If String.IsNullOrWhiteSpace(sql) Then + MyValidationLogger.Warn($"⚠️ [ReloadLookupDataSourceFromSql] SQL_UEBERPRUEFUNG ist leer für [{pLookup.Name}]") + Return False + End If + + sql = clsPatterns.ReplaceAllValues(sql, PanelValidatorControl, True) + + If String.IsNullOrWhiteSpace(sql) OrElse clsPatterns.HasComplexPatterns(sql) Then + MyValidationLogger.Warn($"⚠️ [ReloadLookupDataSourceFromSql] SQL ungültig nach Replace für [{pLookup.Name}]") + Return False + End If + + ' Cache-Eintrag explizit invalidieren und neu laden + Dim cacheKey = $"{connectionId}|{sql}" + If _CachedSqlDataCache.ContainsKey(cacheKey) Then + _CachedSqlDataCache.Remove(cacheKey) + End If + + Dim dt As DataTable = GetCachedDatatable(sql, connectionId) + If dt Is Nothing OrElse dt.Rows.Count = 0 Then + MyValidationLogger.Warn($"⚠️ [ReloadLookupDataSourceFromSql] Kein Ergebnis für [{pLookup.Name}]") + Return False + End If + + Dim valueMember = pLookup.Properties.ValueMember + Dim displayMember = pLookup.Properties.DisplayMember + + If String.IsNullOrWhiteSpace(valueMember) OrElse Not dt.Columns.Contains(valueMember) Then + valueMember = dt.Columns(0).ColumnName + End If + If String.IsNullOrWhiteSpace(displayMember) OrElse Not dt.Columns.Contains(displayMember) Then + displayMember = valueMember + End If + + pLookup.Properties.BeginUpdate() + Try + pLookup.Properties.DataSource = dt + pLookup.Properties.ValueMember = valueMember + pLookup.Properties.DisplayMember = displayMember + Finally + pLookup.Properties.EndUpdate() + End Try + + MyValidationLogger.Debug($"[ReloadLookupDataSourceFromSql] DataSource neu geladen für [{pLookup.Name}] mit {dt.Rows.Count} Zeilen.") + Return True + + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [ReloadLookupDataSourceFromSql] Fehler: {ex.Message}") + Return False + End Try + End Function + Private Function ReloadComboBoxDataSourceFromSql(pCombo As Windows.Forms.ComboBox, pMeta As ClassControlCreator.ControlMetadata) As Boolean + Try + If DT_CONTROLS Is Nothing OrElse DT_CONTROLS.Rows.Count = 0 Then + Return False + End If + + Dim controlRow = DT_CONTROLS.AsEnumerable(). + FirstOrDefault(Function(r) CInt(r.Item("GUID")) = pMeta.Guid) + + If controlRow Is Nothing Then + MyValidationLogger.Warn($"⚠️ [ReloadComboBoxDataSourceFromSql] Keine Control-Definition für GUID [{pMeta.Guid}] gefunden.") + Return False + End If + + Dim connectionId As Integer = controlRow.ItemEx("CONNECTION_ID", 1) + If connectionId <= 0 Then + connectionId = 1 + End If + Dim sql As String = controlRow.ItemEx("SQL_UEBERPRUEFUNG", String.Empty) + + If String.IsNullOrWhiteSpace(sql) Then + MyValidationLogger.Warn($"⚠️ [ReloadComboBoxDataSourceFromSql] SQL_UEBERPRUEFUNG ist leer für [{pCombo.Name}]") + Return False + End If + + sql = clsPatterns.ReplaceAllValues(sql, PanelValidatorControl, True) + If String.IsNullOrWhiteSpace(sql) OrElse clsPatterns.HasComplexPatterns(sql) Then + MyValidationLogger.Warn($"⚠️ [ReloadComboBoxDataSourceFromSql] SQL ungültig nach Replace für [{pCombo.Name}]") + Return False + End If + + Dim cacheKey = $"{connectionId}|{sql}" + If _CachedSqlDataCache.ContainsKey(cacheKey) Then + _CachedSqlDataCache.Remove(cacheKey) + End If + + Dim dt As DataTable = GetCachedDatatable(sql, connectionId) + If dt Is Nothing OrElse dt.Rows.Count = 0 Then + MyValidationLogger.Warn($"⚠️ [ReloadComboBoxDataSourceFromSql] Kein Ergebnis für [{pCombo.Name}]") + Return False + End If + + Dim previousText As String = pCombo.Text + Dim list As New List(Of String) + + For Each r As DataRow In dt.Rows + list.Add(r.Item(0).ToString()) + Next + + pCombo.BeginUpdate() + Try + pCombo.DataSource = Nothing + pCombo.DataSource = list + Finally + pCombo.EndUpdate() + End Try + + If Not String.IsNullOrWhiteSpace(previousText) Then + Dim restoreIndex As Integer = pCombo.FindStringExact(previousText) + If restoreIndex >= 0 Then + pCombo.SelectedIndex = restoreIndex + Else + pCombo.SelectedIndex = -1 + End If + Else + pCombo.SelectedIndex = -1 + End If + + MyValidationLogger.Debug($"[ReloadComboBoxDataSourceFromSql] DataSource neu geladen für [{pCombo.Name}] mit {dt.Rows.Count} Zeilen.") + Return True + + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [ReloadComboBoxDataSourceFromSql] Fehler: {ex.Message}") + Return False + End Try + End Function + + Private Function ReloadGridDataSourceFromSql(pGrid As GridControl, pMeta As ClassControlCreator.ControlMetadata) As Boolean + Try + Dim gridRow = (From form In DTVWCONTROL_INDEX.AsEnumerable() + Where form.Item("GUID") = pMeta.Guid).SingleOrDefault() + + If gridRow Is Nothing Then + MyValidationLogger.Warn($"⚠️ [ReloadGridDataSourceFromSql] Keine Control-Row in DTVWCONTROL_INDEX für [{pGrid.Name}]") + Return False + End If + + Dim sourceIndexName As String = gridRow.Item("INDEX_NAME") + Dim gridTyp As String = gridRow.Item("CTRL_TYPE") + Dim idbTyp As String = String.Empty + If IDB_ACTIVE Then + idbTyp = gridRow.Item("IDB_TYP") + End If + Dim isReadOnly As Boolean = CBool(gridRow.Item("READ_ONLY")) + + Dim dtColumns As DataTable = Nothing + If DT_COLUMNS_GRID IsNot Nothing AndAlso DT_COLUMNS_GRID.Rows.Count > 0 Then + Dim rows = DT_COLUMNS_GRID.AsEnumerable(). + Where(Function(r) r.Field(Of Integer)("CONTROL_ID") = pMeta.Guid). + OrderBy(Function(r) r.Field(Of Integer)("SEQUENCE")) + If rows.Any() Then + dtColumns = rows.CopyToDataTable() + End If + End If + + If dtColumns Is Nothing Then + If DT_COLUMNS_GRID IsNot Nothing Then + dtColumns = DT_COLUMNS_GRID.Clone() + Else + dtColumns = New DataTable() + End If + End If + + FillGridControlFromSource(pGrid, dtColumns, sourceIndexName, gridTyp, idbTyp, False, isReadOnly, True, True) + MyValidationLogger.Debug($"[ReloadGridDataSourceFromSql] Grid neu geladen für [{pGrid.Name}]") + Return True + + Catch ex As Exception + MyValidationLogger.Warn($"⚠️ [ReloadGridDataSourceFromSql] Fehler: {ex.Message}") + Return False + End Try + End Function Private Sub LookupControl_DependingControls(LookupControl As LookupControl3, SelectedValues As List(Of String)) If SelectedValues Is Nothing OrElse SelectedValues.Count = 0 Then @@ -3337,9 +3891,9 @@ Public Class frmValidator End Sub Private Sub LookupControl_DependingColumn(LookupControl As LookupControl3, SelectedValues As List(Of String)) - Dim oSQLColumnDatatable As DataTable = DT_COLUMNS_GRID_WITH_SQL.Clone() + Dim oSQLColumnDatatable As DataTable = DT_GRID_COLUMNS_WITH_SQL.Clone() Dim oExpression = $"SQL_COMMAND like '%#CTRL#{LookupControl.Name}%'" - DT_COLUMNS_GRID_WITH_SQL.Select(oExpression).CopyToDataTable(oSQLColumnDatatable, LoadOption.PreserveChanges) + DT_GRID_COLUMNS_WITH_SQL.Select(oExpression).CopyToDataTable(oSQLColumnDatatable, LoadOption.PreserveChanges) If oSQLColumnDatatable.Rows.Count > 0 Then For Each oRow As DataRow In oSQLColumnDatatable.Rows Dim oDEPENDING_CONTROL_ID = oRow.Item("CONTROL_ID") @@ -3384,9 +3938,9 @@ Public Class frmValidator End If End Sub Private Sub CheckBox_DependingColumn(pCheckbox As CheckBox) - Dim oSQLColumnDatatable As DataTable = DT_COLUMNS_GRID_WITH_SQL.Clone() + Dim oSQLColumnDatatable As DataTable = DT_GRID_COLUMNS_WITH_SQL.Clone() Dim oExpression = $"SQL_COMMAND like '%#CTRL#{pCheckbox.Name}%'" - DT_COLUMNS_GRID_WITH_SQL.Select(oExpression).CopyToDataTable(oSQLColumnDatatable, LoadOption.PreserveChanges) + DT_GRID_COLUMNS_WITH_SQL.Select(oExpression).CopyToDataTable(oSQLColumnDatatable, LoadOption.PreserveChanges) If oSQLColumnDatatable.Rows.Count > 0 Then For Each oRow As DataRow In oSQLColumnDatatable.Rows Dim oDEPENDING_CONTROL_ID = oRow.Item("CONTROL_ID") @@ -3434,9 +3988,13 @@ Public Class frmValidator End Sub Public Sub OnCmbselectedIndex(sender As System.Object, e As System.EventArgs) + If _SetControlValue_In_Action Then + 'MyValidationLogger.Debug("OnCmbselectedIndex skipped (_SetControlValue_In_Action=True)") + Exit Sub + End If ' Prevent cascading events during validation If _isShowingErrorDialog Then - MyValidationLogger.Debug($"OnCmbselectedIndex: Currently showing error dialog, skipping event handling to prevent cascade.") + 'MyValidationLogger.Debug($"OnCmbselectedIndex: Currently showing error dialog, skipping event handling to prevent cascade.") Return End If @@ -3462,24 +4020,25 @@ Public Class frmValidator Dim _Step = 0 For Each ROW As DataRow In DT.Rows Try - Dim displayboxname = ROW.Item(0).ToString + Dim displayboxname As String = ROW.ItemEx("NAME", String.Empty).ToString() _Step = 1 - Dim oConnectionId = 1 + + Dim oConnectionId As Integer = 1 If Not IsDBNull(ROW.Item("CONNECTION_ID")) Then - oConnectionId = ROW.Item("CONNECTION_ID") + oConnectionId = CInt(ROW.Item("CONNECTION_ID")) Else MyValidationLogger.Warn($"⚠️ CONNECTION_ID is DBNULL for control [{displayboxname}] - using default connection ID 1") End If + If Not IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")) Then _Step = 2 - Dim sql_Statement = IIf(IsDBNull(ROW.Item("SQL_UEBERPRUEFUNG")), "", ROW.Item("SQL_UEBERPRUEFUNG")) - + Dim sql_Statement As String = ROW.ItemEx("SQL_UEBERPRUEFUNG", String.Empty).ToString() sql_Statement = clsPatterns.ReplaceAllValues(sql_Statement, PanelValidatorControl, True) _Step = 3 _DependingControl_In_Action = True _Step = 4 - Depending_Control_Set_Result(displayboxname, sql_Statement, ROW.Item(1)) + Depending_Control_Set_Result(displayboxname, sql_Statement, oConnectionId.ToString()) _Step = 5 _DependingControl_In_Action = False Else @@ -3487,7 +4046,7 @@ Public Class frmValidator End If Catch ex As Exception MyValidationLogger.Error(ex) - MyValidationLogger.Info("Unexpected Error in Display SQL result (Combobox) for control: (" & _Step.ToString & ")" & ROW.Item(0).ToString & " - ERROR: " & ex.Message) + MyValidationLogger.Info($"Unexpected Error in Display SQL result (Combobox) for control: ({_Step}) {ROW.ItemEx("NAME", String.Empty)} - ERROR: {ex.Message}") End Try Next End If @@ -3512,7 +4071,12 @@ Public Class frmValidator Exit Sub End If - ' ========== OPTIMIERUNG: Dictionary-Lookup ========== + If _DependingControl_In_Action Then + MyValidationLogger.Debug("[EXIT 1b] Controls2beEnabled: _DependingControl_In_Action aktiv") + Exit Sub + End If + + ' Cache für GUID -> Control If _CachedControlsByGuid Is Nothing Then _CachedControlsByGuid = New Dictionary(Of Integer, Control)() For Each ctrl As Control In PanelValidatorControl.Controls @@ -3540,72 +4104,111 @@ Public Class frmValidator MyValidationLogger.Debug($"Controls2beEnabled für [{pControlName}]: {enablingRows.Count} Controls zu prüfen") - ' ========== NEU: Fehlersammlung ========== + ' Grouping: gleiche SQL + gleiche Connection nur einmal ausführen + Dim groupedControlGuids As New Dictionary(Of String, List(Of Integer))(StringComparer.OrdinalIgnoreCase) + Dim groupedSqlMeta As New Dictionary(Of String, KeyValuePair(Of Integer, String))(StringComparer.OrdinalIgnoreCase) + Dim controlNamesByGuid As New Dictionary(Of Integer, String)() Dim failedControls As New List(Of String) For Each oRowEnablingControl As DataRow In enablingRows Try - ' ========== FIX: FormClosing-Guard ========== - If _FormClosing OrElse Me.IsDisposed Then - MyValidationLogger.Debug("[EXIT 3] Controls2beEnabled aborted (FormClosing)") - Exit For - End If - - ' ========== FIX: _DependingControl_In_Action mit Logging ========== - If _DependingControl_In_Action Then - MyValidationLogger.Debug($"[SKIP] Control übersprungen (_DependingControl_In_Action aktiv)") - Continue For - End If - - Dim oENABLE_GUID As Integer = CInt(oRowEnablingControl.Item("GUID")) - Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") + Dim oEnableGuid As Integer = CInt(oRowEnablingControl.Item("GUID")) + Dim oEnableCtrlName As String = oRowEnablingControl.ItemEx("NAME", $"GUID_{oEnableGuid}") Dim oConnectionId As Integer = oRowEnablingControl.ItemEx("CONNECTION_ID", 1) - Dim oSqlCommand As String = oRowEnablingControl.ItemEx("SQL_ENABLE", String.Empty) + If oConnectionId <= 0 Then + MyValidationLogger.Warn($"⚠️ Controls2beEnabled: CONNECTION_ID [{oConnectionId}] für [{oEnableCtrlName}] ungültig -> Default 1") + oConnectionId = 1 + End If - If String.IsNullOrEmpty(oSqlCommand) Then - MyValidationLogger.Debug($"[SKIP] Control [{oENABLE_CtrlName}]: Ungültiges SQL_ENABLE") + Dim oSqlCommand As String = oRowEnablingControl.ItemEx("SQL_ENABLE", String.Empty) + If String.IsNullOrWhiteSpace(oSqlCommand) Then Continue For End If oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - _DependingControl_In_Action = True + If String.IsNullOrWhiteSpace(oSqlCommand) Then + Continue For + End If - Try - ' ========== KRITISCH: SQL-Execution mit Start/End-Log ========== - MyValidationLogger.Debug($"[SQL START] Control [{oENABLE_CtrlName}]: Führe SQL_ENABLE aus...") - Dim oResult = GetCachedScalar(oSqlCommand, oConnectionId) - MyValidationLogger.Debug($"[SQL ENDE] Control [{oENABLE_CtrlName}]: Result = [{oResult}]") + Dim groupKey As String = $"{oConnectionId}|{oSqlCommand}" - Dim oENABLERESULT As Boolean = False - If oResult IsNot Nothing AndAlso Not IsDBNull(oResult) Then - oENABLERESULT = CBool(oResult) - End If + If Not groupedControlGuids.ContainsKey(groupKey) Then + groupedControlGuids(groupKey) = New List(Of Integer)() + groupedSqlMeta(groupKey) = New KeyValuePair(Of Integer, String)(oConnectionId, oSqlCommand) + End If - ' Dictionary-Lookup - Dim oControl As Control = Nothing - If _CachedControlsByGuid.TryGetValue(oENABLE_GUID, oControl) Then - oControl.Enabled = oENABLERESULT - MyValidationLogger.Debug($"Control [{oENABLE_CtrlName}] Enabled = [{oENABLERESULT}]") - Else - MyValidationLogger.Debug($"Control [{oENABLE_GUID}] nicht im Panel gefunden") - End If + If Not groupedControlGuids(groupKey).Contains(oEnableGuid) Then + groupedControlGuids(groupKey).Add(oEnableGuid) + End If - Catch sqlEx As Exception - failedControls.Add($"[{oENABLE_CtrlName}]: {sqlEx.Message}") - MyValidationLogger.Error($"[Controls2beEnabled] SQL-Fehler bei [{oENABLE_CtrlName}]: {sqlEx.Message}") - Finally - _DependingControl_In_Action = False - End Try + controlNamesByGuid(oEnableGuid) = oEnableCtrlName Catch rowEx As Exception Dim ctrlName = oRowEnablingControl.ItemEx("NAME", "") failedControls.Add($"[{ctrlName}]: {rowEx.Message}") - MyValidationLogger.Error($"[Controls2beEnabled] Loop-Fehler bei [{ctrlName}]: {rowEx.Message}") - Continue For + MyValidationLogger.Error($"[Controls2beEnabled] Build-Phase Fehler bei [{ctrlName}]: {rowEx.Message}") End Try Next - ' ========== NEU: Fehler-Report ========== + If groupedControlGuids.Count = 0 Then + MyValidationLogger.Debug("[EXIT 3] Controls2beEnabled: Keine ausführbaren SQL_ENABLE-Statements nach Replace") + Return + End If + + _DependingControl_In_Action = True + Try + For Each kvp In groupedControlGuids + Dim groupKey = kvp.Key + Dim controlGuids = kvp.Value + Dim meta = groupedSqlMeta(groupKey) + + Dim connId As Integer = meta.Key + Dim sql As String = meta.Value + + Try + MyValidationLogger.Debug($"[SQL START][GROUP] Controls={controlGuids.Count}, Conn={connId}") + Dim oResult = GetCachedScalar(sql, connId) + MyValidationLogger.Debug($"[SQL ENDE][GROUP] Result = [{oResult}]") + + Dim oEnableResult As Boolean = False + If oResult IsNot Nothing AndAlso Not IsDBNull(oResult) Then + oEnableResult = CBool(oResult) + End If + + For Each controlGuid In controlGuids + Dim oControl As Control = Nothing + If _CachedControlsByGuid.TryGetValue(controlGuid, oControl) Then + oControl.Enabled = oEnableResult + + Dim ctrlName As String = controlGuid.ToString() + Dim resolvedName As String = Nothing + If controlNamesByGuid.TryGetValue(controlGuid, resolvedName) Then + ctrlName = resolvedName + End If + + MyValidationLogger.Debug($"Control [{ctrlName}] Enabled = [{oEnableResult}]") + Else + MyValidationLogger.Debug($"Control [{controlGuid}] nicht im Panel gefunden") + End If + Next + + Catch sqlEx As Exception + For Each controlGuid In controlGuids + Dim ctrlName As String = controlGuid.ToString() + Dim resolvedName As String = Nothing + If controlNamesByGuid.TryGetValue(controlGuid, resolvedName) Then + ctrlName = resolvedName + End If + + failedControls.Add($"[{ctrlName}]: {sqlEx.Message}") + Next + MyValidationLogger.Error($"[Controls2beEnabled] SQL-Fehler in Gruppe [{groupKey}]: {sqlEx.Message}") + End Try + Next + Finally + _DependingControl_In_Action = False + End Try + If failedControls.Count > 0 Then MyValidationLogger.Warn($"⚠️ Controls2beEnabled: {failedControls.Count} Controls konnten nicht verarbeitet werden:") For Each errorMsg In failedControls @@ -3613,7 +4216,7 @@ Public Class frmValidator Next End If - MyValidationLogger.Debug($"[EXIT 4] Controls2beEnabled: Normale Beendigung") + MyValidationLogger.Debug("[EXIT 4] Controls2beEnabled: Normale Beendigung") Catch ex As Exception MyValidationLogger.Error(ex) @@ -3642,8 +4245,8 @@ Public Class frmValidator ToList() If enablingRows.Count = 0 Then - MyValidationLogger.Debug("No controls with SQL_ENABLE_ON_LOAD configured") - MyValidationLogger.Debug("[EXIT 1] Controls2B_EnDisabled_onLoad: Keine Controls konfiguriert") + 'MyValidationLogger.Debug("No controls with SQL_ENABLE_ON_LOAD configured") + ' MyValidationLogger.Debug("[EXIT 1] Controls2B_EnDisabled_onLoad: Keine Controls konfiguriert") Return End If @@ -3660,7 +4263,7 @@ Public Class frmValidator Dim oENABLE_GUID As Integer = CInt(oRowEnablingControl.Item("GUID")) Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") - MyValidationLogger.Debug($"Checking Control [{oENABLE_CtrlName}] (ID: {oENABLE_GUID}) for SQL_ENABLE_ON_LOAD...") + 'MyValidationLogger.Debug($"Checking Control [{oENABLE_CtrlName}] (ID: {oENABLE_GUID}) for SQL_ENABLE_ON_LOAD...") ' WICHTIG: Prüfe ob Control existiert If Not _CachedControlsByGuid.ContainsKey(oENABLE_GUID) Then MyValidationLogger.Warn($"Controls2B_EnDisabled_onLoad -> Control [{oENABLE_CtrlName}] (ID: {oENABLE_GUID}) not found in cache") @@ -3680,9 +4283,9 @@ Public Class frmValidator MyValidationLogger.Debug("Skipping: Invalid SQL_ENABLE_ON_LOAD") Continue For End If - MyValidationLogger.Debug($"[Controls2B_EnDisabled_onLoad] BEFORE ReplaceAllValues for Control [{oENABLE_CtrlName}]") - MyValidationLogger.Debug($" SQL Command: [{oSqlCommand}]") - MyValidationLogger.Debug($" Panel Controls Count: [{PanelValidatorControl?.Controls?.Count - 1}]") + 'MyValidationLogger.Debug($"[Controls2B_EnDisabled_onLoad] BEFORE ReplaceAllValues for Control [{oENABLE_CtrlName}]") + 'MyValidationLogger.Debug($" SQL Command: [{oSqlCommand}]") + 'MyValidationLogger.Debug($" Panel Controls Count: [{PanelValidatorControl?.Controls?.Count - 1}]") Try oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) MyValidationLogger.Debug($"[Controls2B_EnDisabled_onLoad] AFTER ReplaceAllValues: [{oSqlCommand}]") @@ -3705,12 +4308,12 @@ Public Class frmValidator Continue For End If - MyValidationLogger.Debug($"[SQL START] Control [{oENABLE_CtrlName}]: Führe SQL aus...") + 'MyValidationLogger.Debug($"[SQL START] Control [{oENABLE_CtrlName}]: Führe SQL aus...") Dim oResult = GetCachedScalar(oSqlCommand, oConnectionId) - MyValidationLogger.Debug($"[SQL ENDE] Control [{oENABLE_CtrlName}]: Result = [{oResult}]") + 'MyValidationLogger.Debug($"[SQL ENDE] Control [{oENABLE_CtrlName}]: Result = [{oResult}]") Try - MyValidationLogger.Debug($"Result of Enable SQL [{oResult}]...") + 'MyValidationLogger.Debug($"Result of Enable SQL [{oResult}]...") oControl.Enabled = CBool(oResult) Catch convEx As Exception failedControls.Add($"[{oENABLE_CtrlName}]: {convEx.Message}") @@ -3824,7 +4427,7 @@ Public Class frmValidator MyValidationLogger.Warn("⚠️ Result Table is nothing!") End If Catch ex As Exception - MyValidationLogger.Info("Unexpected Ersror in Depending_Control_Set_Result - ERROR: " & ex.Message) + MyValidationLogger.Warn($"Unexpected Error in Depending_Control_Set_Result [{displayboxname}] - ERROR: {ex.Message}") MsgBox("Unexpected error in Depending_Control_Set_Result: " & ex.Message, MsgBoxStyle.Critical) End Try End Sub @@ -4227,6 +4830,7 @@ Public Class frmValidator MyValidationLogger.Info($"LOG_HOTSPOTS - CURRENT_DOC_GUID: {CURRENT_DOC_GUID}") ' ========== ENDE DIAGNOSE ========== End If + RollbackIdbBatchIfOpen("Load_Next_Document") ' State-Variablen zurücksetzen beim Laden eines neuen Dokuments previousLUSelectedValues = Nothing hadPreviousLUSelection = False @@ -5156,25 +5760,27 @@ Public Class frmValidator ''' Ob das Grid ReadOnly ist (für Spaltenanzahl-Warnung) ''' True = Grid leeren wenn kein Wert → analog FillIndexValues(first=False) Private Sub FillGridControlFromSource( - oMyGridControl As GridControl, - oDTColumnsPerDevExGrid As DataTable, - oSourceIndexName As String, - oTyp As String, - oIDBTyp As String, - oIDBOverride As Boolean, - oIsReadOnly As Boolean, - clearOnNoValue As Boolean, - Optional showOverlay As Boolean = False ' ← NEU - ) - ' ========== NEU: Visuelles Feedback während Grid-Reload ========== + oMyGridControl As GridControl, + oDTColumnsPerDevExGrid As DataTable, + oSourceIndexName As String, + oTyp As String, + oIDBTyp As String, + oIDBOverride As Boolean, + oIsReadOnly As Boolean, + clearOnNoValue As Boolean, + Optional showOverlay As Boolean = False + ) Dim overlayHandle As Object = Nothing Try - overlayHandle = SplashScreenManager.ShowOverlayForm(oMyGridControl) - Catch ex As Exception - MyValidationLogger.Debug($"[FillGridControlFromSource] Overlay für Grid [{oMyGridControl.Name}] nicht verfügbar: {ex.Message}") - End Try - ' ========== ENDE NEU ========== - Try + If showOverlay Then + Try + overlayHandle = SplashScreenManager.ShowOverlayForm(oMyGridControl) + Catch ex As Exception + MyValidationLogger.Debug($"[FillGridControlFromSource] Overlay für Grid [{oMyGridControl.Name}] nicht verfügbar: {ex.Message}") + End Try + End If + ' ========== ENDE NEU ========== + Dim oValueFromSource = GetVariableValuefromSource(oSourceIndexName, oIDBTyp, oIDBOverride) If oValueFromSource IsNot Nothing Then @@ -5361,15 +5967,13 @@ Public Class frmValidator MyValidationLogger.Warn($"⚠️ [FillGridControlFromSource] Fehler beim Setzen der Spaltenbreiten für Grid [{oMyGridControl.Name}]: {ex.Message}") End Try Finally - ' ========== NEU: Overlay schließen ========== - If overlayHandle IsNot Nothing Then + If showOverlay AndAlso overlayHandle IsNot Nothing Then Try SplashScreenManager.CloseOverlayForm(overlayHandle) Catch ex As Exception MyValidationLogger.Debug($"[FillGridControlFromSource] Overlay-Close-Fehler: {ex.Message}") End Try End If - ' ========== ENDE NEU ========== End Try End Sub Sub FillIndexValues(first As Boolean, Optional SingleAttribute As String = "") @@ -5473,7 +6077,7 @@ Public Class frmValidator If oIndexName = "@@DISPLAY_ONLY" Then oLoadIndex = False End If - MyValidationLogger.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) + 'MyValidationLogger.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString) Select Case True Case oControl.GetType = GetType(DevExpress.XtraEditors.TextEdit) Or oControl.GetType = GetType(MemoEdit) @@ -5850,8 +6454,8 @@ Public Class frmValidator ' ========== BUGFIX END: Alte Werte werden NICHT mehr beibehalten ========== End If - ' ========== KRITISCH: DataSource-Backup erstellen BEVOR SelectedValues gelöscht wird ========== - Dim savedDataSource = oLookup.Properties.DataSource + ' ========== KRITISCH: DataSource-Backup erstellen BEVOR SelectedValues gelöscht wird ========== + Dim savedDataSource = oLookup.Properties.DataSource MyValidationLogger.Debug($"[FillIndexValues BUGFIX] Lookup [{oLookupMeta.Name}]: DataSource-Backup erstellt") ' ========== KRITISCH: DataSource ZUERST wiederherstellen, DANN SelectedValues leeren ========== @@ -5938,8 +6542,8 @@ Public Class frmValidator ' VORHER: Wurde potenziell mehrfach aufgerufen ' NACHHER: Nur einmal nach allen Control-Updates Try - Dim oDataTable As DataTable = DT_COLUMNS_GRID_WITH_SQL.Clone() - DT_COLUMNS_GRID_WITH_SQL.Select($"SQL_COMMAND not like '%#CTRL#%'").CopyToDataTable(oDataTable, LoadOption.PreserveChanges) + Dim oDataTable As DataTable = DT_GRID_COLUMNS_WITH_SQL.Clone() + DT_GRID_COLUMNS_WITH_SQL.Select($"SQL_COMMAND not like '%#CTRL#%'").CopyToDataTable(oDataTable, LoadOption.PreserveChanges) ' ========== OPTIMIERUNG 9: Control-Suche mit Dictionary ========== ' VORHER: Für jede Row wurde über alle Controls geloopt @@ -7012,8 +7616,9 @@ Public Class frmValidator Try Dim oMissing As Boolean = False ' ========== BATCH: Sammelmodus starten (nur IDB) ========== + Dim idbBatchStartedNow As Boolean = False If IDB_ACTIVE Then - IDBData.BeginBatch() + idbBatchStartedNow = EnsureIdbBatchForCurrentDocument() End If ' ========== ENDE BATCH START ========== ' ========== OPTIMIERUNG: Nur geänderte Controls durchlaufen ========== @@ -7057,9 +7662,16 @@ Public Class frmValidator ' ========== KERN-OPTIMIERUNG: Dirty-Check ========== ' Überspringe unveränderte, nicht-required Controls - If Not oMeta.IsDirty And Not oIsRequired Then - MyValidationLogger.Debug($"Skipping unchanged control [{oMeta.Name}]") - Continue For + If Not oMeta.IsDirty Then + If IDB_ACTIVE AndAlso _idbBatchOpen AndAlso Not idbBatchStartedNow AndAlso _idbBatchProcessedControlIds.Contains(oMeta.Guid) Then + MyValidationLogger.Debug($"Skipping already processed control in open batch [{oMeta.Name}]") + Continue For + End If + + If Not oIsRequired Then + MyValidationLogger.Debug($"Skipping unchanged control [{oMeta.Name}]") + Continue For + End If End If ' ========== ENDE OPTIMIERUNG ========== @@ -7132,7 +7744,7 @@ Public Class frmValidator Dim oMyDT = DT_FOR_ARRAY(myVektorArr) If IDBData.SetVariableValue(oIndexName, oMyDT, oOVERWRITE_DATA, oIDBTyp) = False Then oMissing = True - oErrMsgMissingInput = "Error while indexing IDB-Object LookupGrid" + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" MyValidationLogger.Warn($"⚠️ Error while indexing IDB-Object LookupGrid [{oIndexName}] ") frmError.ShowDialog() Exit For @@ -7262,6 +7874,8 @@ Public Class frmValidator End If Else If IDBData.SetVariableValue(oIndexName, oMyInput) = False Then + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" + oMissing = True Exit For End If End If @@ -7406,6 +8020,8 @@ Public Class frmValidator End If Else If IDBData.SetVariableValue(oIndexName, oMyInput) = False Then + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" + oMissing = True Exit For End If End If @@ -7540,9 +8156,10 @@ Public Class frmValidator End If Else If IDBData.SetVariableValue(oIndexName, oMyInput) = False Then + cmb.DroppedDown = True oMissing = True - oErrMsgMissingInput = "Error indexing combobox idb" + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" MyValidationLogger.Warn(oErrMsgMissingInput) If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") @@ -7645,7 +8262,7 @@ Public Class frmValidator Else If IDBData.SetVariableValue(oIndexName, oMyInput) = False Then oMissing = True - oErrMsgMissingInput = "Error indexing datepicker idb" + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" MyValidationLogger.Warn(oErrMsgMissingInput) If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") @@ -7768,12 +8385,13 @@ Public Class frmValidator Exit For End If Else - If IDBData.SetVariableValue(oIndexName, chk.Checked.ToString) Then - oErrMsgMissingInput = "error indexing checkbox idb" + If IDBData.SetVariableValue(oIndexName, chk.Checked.ToString) = False Then + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False End If + oMissing = True OpenfrmError(oErrMsgMissingInput) Exit For End If @@ -7862,7 +8480,7 @@ Public Class frmValidator If oDT.Rows.Count > 0 Then If IDBData.SetVariableValue(oIndexName, oDT, True) = False Then oMissing = True - oErrMsgMissingInput = "Error indexing Datagridview idb" + oErrMsgMissingInput = $"IDB-SetVariableValue fehlgeschlagen für [{oIndexName}]" MyValidationLogger.Warn(oErrMsgMissingInput) If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") @@ -7906,6 +8524,9 @@ Public Class frmValidator End Select ' ========== NEU: Dirty-Flag nach erfolgreicher Indexierung zurücksetzen ========== + If IDB_ACTIVE AndAlso _idbBatchOpen Then + _idbBatchProcessedControlIds.Add(oMeta.Guid) + End If oMeta.IsDirty = False Next ' End For Each oControl @@ -7972,12 +8593,12 @@ Public Class frmValidator ' ========== BATCH: Gesammelte Statements abfeuern ========== If IDB_ACTIVE Then If oMissing = False Then - If Not IDBData.CommitBatch() Then + If Not CommitIdbBatchIfOpen() Then MyValidationLogger.Warn("CommitBatch failed in Check_UpdateIndexe") oMissing = True End If Else - IDBData.RollbackBatch() + MyValidationLogger.Warn("[IDB-BATCH] Validierung fehlgeschlagen - Batch bleibt offen (kein Rollback, Korrekturschleife)") End If End If ' ========== ENDE BATCH ========== @@ -9179,4 +9800,58 @@ Public Class frmValidator End If End Sub + Private Function EnsureIdbBatchForCurrentDocument() As Boolean + If Not IDB_ACTIVE Then + Return False + End If + + If _idbBatchOpen Then + If _idbBatchDocId = CURRENT_DOC_ID Then + Return False ' bestehender Batch für aktuelles Dokument + End If + + RollbackIdbBatchIfOpen($"Doc-Wechsel von {_idbBatchDocId} auf {CURRENT_DOC_ID}") + End If + + IDBData.BeginBatch() + _idbBatchOpen = True + _idbBatchDocId = CURRENT_DOC_ID + _idbBatchProcessedControlIds.Clear() + + MyValidationLogger.Debug($"[IDB-BATCH] BeginBatch für DocID={CURRENT_DOC_ID}") + Return True + End Function + + Private Function CommitIdbBatchIfOpen() As Boolean + If Not IDB_ACTIVE OrElse Not _idbBatchOpen Then + Return True + End If + + Dim ok As Boolean = IDBData.CommitBatch() + If ok Then + MyValidationLogger.Debug($"[IDB-BATCH] CommitBatch erfolgreich für DocID={_idbBatchDocId}") + _idbBatchOpen = False + _idbBatchDocId = 0 + _idbBatchProcessedControlIds.Clear() + Else + MyValidationLogger.Warn($"[IDB-BATCH] CommitBatch fehlgeschlagen für DocID={_idbBatchDocId} (Batch bleibt offen)") + End If + + Return ok + End Function + + Private Sub RollbackIdbBatchIfOpen(reason As String) + If Not IDB_ACTIVE OrElse Not _idbBatchOpen Then + Return + End If + + Try + MyValidationLogger.Warn($"[IDB-BATCH] RollbackBatch für DocID={_idbBatchDocId}. Grund: {reason}") + IDBData.RollbackBatch() + Finally + _idbBatchOpen = False + _idbBatchDocId = 0 + _idbBatchProcessedControlIds.Clear() + End Try + End Sub End Class \ No newline at end of file diff --git a/app/TaskFlow/frmValidatorSearch.vb b/app/TaskFlow/frmValidatorSearch.vb index 5989148..0105539 100644 --- a/app/TaskFlow/frmValidatorSearch.vb +++ b/app/TaskFlow/frmValidatorSearch.vb @@ -328,7 +328,7 @@ Public Class frmValidatorSearch Try ' KRITISCH: Event unterdrücken während TabPreload läuft If _suppressTabEvents Then - LOGGER.Debug($"🚫 XtraTabControlSQL_SelectedPageChanged unterdrückt (SelectedTabPageIndex={XtraTabControlSQL.SelectedTabPageIndex})") + ' LOGGER.Debug($"🚫 XtraTabControlSQL_SelectedPageChanged unterdrückt (SelectedTabPageIndex={XtraTabControlSQL.SelectedTabPageIndex})") Exit Sub End If @@ -340,7 +340,7 @@ Public Class frmValidatorSearch End If If XtraTabControlSQL.SelectedTabPageIndex >= 0 AndAlso Not XtraTabControlSQL.TabPages(XtraTabControlSQL.SelectedTabPageIndex).PageVisible Then - LOGGER.Debug("SQL-Tab ist nicht sichtbar - Exit Sub") + 'LOGGER.Debug("SQL-Tab ist nicht sichtbar - Exit Sub") Exit Sub End If diff --git a/app/TaskFlow/taskFLOW.vbproj b/app/TaskFlow/taskFLOW.vbproj index 23f4bff..34b6f61 100644 --- a/app/TaskFlow/taskFLOW.vbproj +++ b/app/TaskFlow/taskFLOW.vbproj @@ -35,6 +35,10 @@ + + true + true + x86 true @@ -87,72 +91,60 @@ ..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll - + False - - - - - - - + + + False - - + False - - - - - - - - - - + + + False - - + False - + False - + False - + False - + False - - - - - - - + False - + False - - - - - + False - - - ..\..\..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll + + False + + + False + + + False + + + False + + + ..\..\..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewerDD.dll ..\..\..\..\2_DLL Projekte\DDMonorepo\Controls.LookupGrid\bin\Debug\DigitalData.Controls.LookupGrid.dll @@ -318,39 +310,39 @@ M:\Bibliotheken\3rdParty\Limilabs\Mail.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.13\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll - - ..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll + + ..\packages\Microsoft.Bcl.Cryptography.10.0.13\lib\net462\Microsoft.Bcl.Cryptography.dll ..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll - - ..\packages\Microsoft.Extensions.DependencyInjection.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll + + ..\packages\Microsoft.Extensions.DependencyInjection.10.0.13\lib\net462\Microsoft.Extensions.DependencyInjection.dll - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.13\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - ..\packages\Microsoft.Extensions.Logging.10.0.0\lib\net462\Microsoft.Extensions.Logging.dll + + ..\packages\Microsoft.Extensions.Logging.10.0.9\lib\net462\Microsoft.Extensions.Logging.dll - - ..\packages\Microsoft.Extensions.Logging.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Microsoft.Extensions.Logging.Abstractions.10.0.9\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll - - ..\packages\Microsoft.Extensions.Options.10.0.0\lib\net462\Microsoft.Extensions.Options.dll + + ..\packages\Microsoft.Extensions.Options.10.0.9\lib\net462\Microsoft.Extensions.Options.dll - - ..\packages\Microsoft.Extensions.Primitives.10.0.0\lib\net462\Microsoft.Extensions.Primitives.dll + + ..\packages\Microsoft.Extensions.Primitives.10.0.9\lib\net462\Microsoft.Extensions.Primitives.dll - - ..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll + + ..\packages\Microsoft.Identity.Client.4.91.1\lib\net462\Microsoft.Identity.Client.dll - - ..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll + + ..\packages\Microsoft.IdentityModel.Abstractions.8.14.0\lib\net462\Microsoft.IdentityModel.Abstractions.dll ..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Exceptions.dll @@ -370,12 +362,13 @@ ..\packages\NLog.5.0.5\lib\net46\NLog.dll - - ..\packages\OpenMcdf.3.1.4\lib\netstandard2.0\OpenMcdf.dll + + ..\packages\OpenMcdf.3.3.0\lib\netstandard2.0\OpenMcdf.dll ..\packages\Oracle.ManagedDataAccess.21.15.0\lib\net462\Oracle.ManagedDataAccess.dll + ..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll @@ -411,16 +404,16 @@ - - ..\packages\System.Formats.Asn1.10.0.5\lib\net462\System.Formats.Asn1.dll + + ..\packages\System.Formats.Asn1.10.0.13\lib\net462\System.Formats.Asn1.dll ..\packages\System.IO.Packaging.10.0.5\lib\net462\System.IO.Packaging.dll - - ..\packages\System.IO.Pipelines.10.0.5\lib\net462\System.IO.Pipelines.dll + + ..\packages\System.IO.Pipelines.10.0.12\lib\net462\System.IO.Pipelines.dll @@ -437,17 +430,23 @@ ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + + - - ..\packages\System.Security.Cryptography.Pkcs.10.0.5\lib\net462\System.Security.Cryptography.Pkcs.dll + + ..\packages\System.Security.Cryptography.Pkcs.10.0.13\lib\net462\System.Security.Cryptography.Pkcs.dll - - ..\packages\System.Text.Encodings.Web.10.0.5\lib\net462\System.Text.Encodings.Web.dll + + ..\packages\System.Text.Encodings.Web.10.0.12\lib\net462\System.Text.Encodings.Web.dll - - ..\packages\System.Text.Json.10.0.5\lib\net462\System.Text.Json.dll + + ..\packages\System.Text.Json.10.0.12\lib\net462\System.Text.Json.dll ..\packages\System.Threading.Channels.10.0.5\lib\net462\System.Threading.Channels.dll @@ -457,7 +456,7 @@ - ..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll + ..\packages\System.ValueTuple.4.6.2\lib\net462\System.ValueTuple.dll @@ -480,7 +479,6 @@ - @@ -784,6 +782,7 @@ + True @@ -1441,4 +1440,7 @@ --> + + + \ No newline at end of file