From c464f246814b7839a19745dc29492fd9f6490a92 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Fri, 20 Mar 2026 13:43:09 +0100 Subject: [PATCH] Vor SetControlValuesChange --- app/TaskFlow/ClassControlCreator.vb | 263 ++- app/TaskFlow/ControlCreator/GridControl.vb | 359 +++- app/TaskFlow/Log_Waehrung.txt | 1804 ++++++++++++++++++++ app/TaskFlow/My Project/AssemblyInfo.vb | 2 +- app/TaskFlow/TaskFlow.vbproj | 1 + app/TaskFlow/clsPatterns.vb | 125 +- app/TaskFlow/frmMain.resx | 18 +- app/TaskFlow/frmValidator.vb | 961 ++++++++--- app/TaskFlow/frmValidatorSearch.vb | 48 + 9 files changed, 3209 insertions(+), 372 deletions(-) create mode 100644 app/TaskFlow/Log_Waehrung.txt diff --git a/app/TaskFlow/ClassControlCreator.vb b/app/TaskFlow/ClassControlCreator.vb index 184d70f..67acb00 100644 --- a/app/TaskFlow/ClassControlCreator.vb +++ b/app/TaskFlow/ClassControlCreator.vb @@ -68,7 +68,17 @@ Public Class ClassControlCreator ''' Public Property GridTables As New Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)) Public Property GridColumns As New Dictionary(Of Integer, DataTable) + Private _globalLookupEventGuard As Boolean = False + Public Property GlobalLookupEventGuard As Boolean + Get + Return _globalLookupEventGuard + End Get + Set(value As Boolean) + _globalLookupEventGuard = value + Logger.Debug($"GlobalLookupEventGuard -> gesetzt auf [{value}]") + End Set + End Property ''' @@ -853,44 +863,239 @@ Public Class ClassControlCreator End Function Public Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable) - If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then - For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows - Try - Dim oSqlStatement = oRow.ItemEx("SQL_COMMAND", String.Empty) - Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", -1) - Dim oControlId = oRow.Item("CONTROL_ID") - Dim oColumnName = oRow.Item("SPALTENNAME") - Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP") - - If oSqlStatement <> String.Empty And oConnectionId > -1 Then - oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pControlPanel, True) + If pColumnsWithSqlAndControlPlaceholders Is Nothing OrElse pColumnsWithSqlAndControlPlaceholders.Rows.Count = 0 Then + Logger.Debug("No depending controls with SQL statements defined, skipping handling control value change.") + Return + End If - GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup) + ' ============================================================================ + ' Schritt 1 - Sichere ALLE Lookup-Werte VOR SQL-Reload + ' ============================================================================ + Dim lookupBackups As New Dictionary(Of String, Object) + For Each oControl As Control In pControlPanel.Controls + If TypeOf oControl Is LookupControl3 Then + Try + Dim lookup = DirectCast(oControl, LookupControl3) + ' Speichere den aktuellen EditValue (kann einzelner Wert oder Liste sein) + If lookup.EditValue IsNot Nothing Then + Dim controlName As String = lookup.Name + lookupBackups(controlName) = lookup.EditValue + Logger.Debug($"GridTables_HandleControlValueChange -> Backup für Lookup [{controlName}]: [{lookup.EditValue}]") + End If + Catch ex As Exception + Logger.Error($"GridTables_HandleControlValueChange -> Fehler beim Backup von Lookup: {ex.Message}") + End Try + End If + Next - ' === Block to force setting the editor for GridColumns - Logger.Debug("Force-setting Editor for all Gridcells..") - For Each oControl As Control In pControlPanel.Controls - Try - Dim oMeta = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) + ' ============================================================================ + ' Schritt 2 - Verarbeite Grid-Columns mit SQL-Abhängigkeiten + ' ============================================================================ + For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows + Try + Dim oSqlStatement = oRow.ItemEx("SQL_COMMAND", String.Empty) + Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", -1) + Dim oControlId = oRow.Item("CONTROL_ID") + Dim oColumnName = oRow.Item("SPALTENNAME") + Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP") + + If oSqlStatement <> String.Empty AndAlso oConnectionId > -1 Then + 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..") + For Each oControl As Control In pControlPanel.Controls + Try + If oControl.Tag IsNot Nothing AndAlso TypeOf oControl.Tag Is ControlMetadata Then + Dim oMeta = DirectCast(oControl.Tag, ControlMetadata) If oMeta.Guid = oControlId AndAlso TypeOf oControl Is GridControl Then Dim oGrid As GridControl = DirectCast(oControl, GridControl) - DirectCast(oGrid.FocusedView, GridView).FocusInvalidRow() - Logger.Debug("Force-setting Editor for Grid [{0}]", oGrid.Name) + 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}]") + End If Exit For End If - Catch ex As Exception - Logger.Error(ex) - End Try - Next - ' === End + End If + Catch ex As Exception + Logger.Error($"GridTables_HandleControlValueChange -> Fehler beim Force-setting Editor: {ex.Message}") + End Try + Next + End If + Catch ex As Exception + Logger.Error(ex) + Logger.Info($"Unexpected Error in Display SQL result for grid column: {oRow.Item("CONTROL_ID")} - ERROR: {ex.Message}") + End Try + Next - End If - Catch ex As Exception - Logger.Error(ex) - Logger.Info("Unexpected Error in Display SQL result for grid column: " & oRow.Item("CONTROL_ID") & " - ERROR: " & ex.Message) - End Try + ' ============================================================================ + ' 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...") + + For Each oControl As Control In pControlPanel.Controls + If TypeOf oControl Is LookupControl3 Then + Try + Dim lookup = DirectCast(oControl, LookupControl3) + Dim controlName As String = lookup.Name + + ' Wenn wir einen Backup für dieses Lookup haben + If lookupBackups.ContainsKey(controlName) Then + Dim oldValue = lookupBackups(controlName) + + ' Prüfe ob Lookup ein DataSource hat (könnte durch SQL neu geladen worden sein) + If lookup.Properties.DataSource IsNot Nothing AndAlso TypeOf lookup.Properties.DataSource Is DataTable Then + Dim currentDataSource = DirectCast(lookup.Properties.DataSource, DataTable) + + ' Wenn DataSource Rows hat, versuche Werte wiederherzustellen + If currentDataSource.Rows.Count > 0 Then + RestoreLookupValues(lookup, oldValue, currentDataSource, controlName) + End If + End If + End If + + Catch ex As Exception + Logger.Error($"GridTables_HandleControlValueChange -> Fehler beim Prüfen von Lookup: {ex.Message}") + Logger.Error(ex) + End Try + End If Next End If End Sub + + Private Sub RestoreLookupValues(lookup As LookupControl3, oldValue As Object, + newDataSource As DataTable, controlName As String) + If lookup Is Nothing OrElse oldValue Is Nothing OrElse newDataSource Is Nothing Then + Logger.Warn($"RestoreLookupValues -> [{controlName}] Ungültige Parameter") + Return + End If + + Try + ' Bestimme ValueColumn + Dim valueColumn As String = String.Empty + If String.IsNullOrEmpty(lookup.Properties.ValueMember) AndAlso newDataSource.Columns.Count > 0 Then + valueColumn = newDataSource.Columns(0).ColumnName + ElseIf Not String.IsNullOrEmpty(lookup.Properties.ValueMember) Then + valueColumn = lookup.Properties.ValueMember + Else + Logger.Warn($"RestoreLookupValues -> [{controlName}] Keine ValueColumn verfügbar") + Return + End If + + ' Build HashSet für effiziente Suche + Dim availableValues As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase) + For Each row As DataRow In newDataSource.Rows + If Not IsDBNull(row(valueColumn)) Then + availableValues.Add(row(valueColumn).ToString()) + End If + Next + + ' Prüfe ob der alte Wert noch in der neuen DataSource existiert + Dim validValue As Object = Nothing + + ' Behandle verschiedene Datentypen (String, List, Array, etc.) + If TypeOf oldValue Is String Then + Dim valueStr As String = oldValue.ToString() + If availableValues.Contains(valueStr) Then + validValue = oldValue + Logger.Debug($"RestoreLookupValues -> [{controlName}] Wert [{valueStr}] ✓ gefunden") + Else + Logger.Warn($"RestoreLookupValues -> [{controlName}] Wert [{valueStr}] ✗ nicht mehr vorhanden") + End If + ElseIf TypeOf oldValue Is IEnumerable Then + ' Behandle Listen/Arrays + Dim validValues As New List(Of Object) + For Each item As Object In DirectCast(oldValue, IEnumerable) + If item IsNot Nothing Then + Dim itemStr As String = item.ToString() + If availableValues.Contains(itemStr) Then + validValues.Add(item) + Logger.Debug($"RestoreLookupValues -> [{controlName}] Wert [{itemStr}] ✓ gefunden") + Else + Logger.Warn($"RestoreLookupValues -> [{controlName}] Wert [{itemStr}] ✗ nicht mehr vorhanden") + End If + End If + Next + + If validValues.Count > 0 Then + validValue = validValues + End If + Else + ' Fallback für andere Typen + Dim valueStr As String = oldValue.ToString() + If availableValues.Contains(valueStr) Then + validValue = oldValue + Logger.Debug($"RestoreLookupValues -> [{controlName}] Wert [{valueStr}] ✓ gefunden") + Else + Logger.Warn($"RestoreLookupValues -> [{controlName}] Wert [{valueStr}] ✗ nicht mehr vorhanden") + End If + End If + + ' Gültige Werte wiederherstellen + If validValue IsNot Nothing Then + ' Event-Guard temporär aktivieren um Endlosschleifen zu vermeiden + Dim oldGuard As Boolean = GlobalLookupEventGuard + GlobalLookupEventGuard = True + + Try + ' Prüfe ob bereits korrekt gesetzt + Dim currentValue = lookup.EditValue + If currentValue IsNot Nothing AndAlso currentValue.Equals(validValue) Then + Logger.Debug($"RestoreLookupValues -> [{controlName}] Wert bereits korrekt gesetzt") + Return + End If + + ' Setze den Wert neu + lookup.EditValue = Nothing + Application.DoEvents() + + lookup.EditValue = validValue + lookup.Refresh() + Application.DoEvents() + + ' Validierung + Dim newValue = lookup.EditValue + If newValue IsNot Nothing AndAlso newValue.Equals(validValue) Then + Logger.Debug($"RestoreLookupValues -> [{controlName}] ✓ erfolgreich wiederhergestellt: [{validValue}]") + Else + Logger.Error($"RestoreLookupValues -> [{controlName}] ✗ Fehler beim Wiederherstellen! Erwartet: [{validValue}], Ist: [{If(newValue, "NULL")}]") + + ' Retry mit BeginUpdate/EndUpdate + Logger.Debug($"RestoreLookupValues -> [{controlName}] Versuche alternative Methode mit BeginUpdate...") + lookup.Properties.BeginUpdate() + Try + lookup.EditValue = Nothing + Application.DoEvents() + lookup.EditValue = validValue + Finally + lookup.Properties.EndUpdate() + End Try + + lookup.Refresh() + Application.DoEvents() + + Dim retryValue = lookup.EditValue + If retryValue IsNot Nothing AndAlso retryValue.Equals(validValue) Then + Logger.Debug($"RestoreLookupValues -> [{controlName}] ✓ Alternative Methode erfolgreich") + Else + Logger.Error($"RestoreLookupValues -> [{controlName}] ✗ Auch alternative Methode fehlgeschlagen!") + End If + End If + + Finally + ' Event-Guard wiederherstellen + GlobalLookupEventGuard = oldGuard + End Try + Else + Logger.Info($"RestoreLookupValues -> [{controlName}] Keine gültigen Werte zum Wiederherstellen") + End If + + Catch ex As Exception + Logger.Error($"RestoreLookupValues -> Fehler bei [{controlName}]: {ex.Message}") + Logger.Error(ex) + End Try + End Sub End Class diff --git a/app/TaskFlow/ControlCreator/GridControl.vb b/app/TaskFlow/ControlCreator/GridControl.vb index b2a6eca..c7b8b14 100644 --- a/app/TaskFlow/ControlCreator/GridControl.vb +++ b/app/TaskFlow/ControlCreator/GridControl.vb @@ -28,13 +28,31 @@ Namespace ControlCreator Private _FormulaColumnNames As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase) Private _isRefreshingFormula As Boolean = False ' *** NEU: Flag für Formel-Refresh *** Private _currencySymbol As String = "€" + ''' + ''' SHARED Dictionary: Speichert das aktuelle Währungssymbol PRO GridView (via Name). + ''' Dies ist notwendig, weil UpdateCurrencyFormat auf einer NEUEN GridControl-Instanz + ''' aufgerufen wird, der CustomColumnDisplayText-Handler aber auf der URSPRÜNGLICHEN + ''' Instanz registriert wurde. Durch das Shared Dictionary können alle Instanzen + ''' auf das aktuelle Symbol zugreifen. + ''' + Private Shared _CurrencySymbolByGridName As New Dictionary(Of String, String)(StringComparer.OrdinalIgnoreCase) Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)), pCurrencySymbol As String) _LogConfig = pLogConfig _Logger = pLogConfig.GetLogger() _GridTables = pGridTables _currencySymbol = pCurrencySymbol End Sub - + ''' + ''' Setzt den Shared Currency-Cache zurück. Muss beim Laden eines neuen Dokuments + ''' aufgerufen werden, bevor UpdateCurrencyFormat die neuen Werte schreibt. + ''' Verhindert, dass ein veraltetes Währungssymbol aus einem vorherigen Dokument + ''' durch den CustomColumnDisplayText-Handler verwendet wird. + ''' + Public Shared Sub ResetCurrencySymbolCache() + SyncLock _CurrencySymbolByGridName + _CurrencySymbolByGridName.Clear() + End SyncLock + End Sub Public Function CreateGridColumns(pColumnTable As DataTable) As DataTable Dim oDataTable As New DataTable Dim columnsWithExpressions As New List(Of Tuple(Of DataColumn, String)) @@ -202,15 +220,129 @@ Namespace ControlCreator Return oEditor End If End Function + ''' + ''' Setzt das Währungssymbol für ein bestimmtes Grid im Shared Cache. + ''' Muss bei JEDEM Dokumentwechsel aufgerufen werden (auch bei EUR), + ''' damit der CustomColumnDisplayText-Handler sofort den korrekten Wert hat. + ''' + Public Shared Sub SetCurrencySymbolForGrid(gridName As String, currencySymbol As String) + SyncLock _CurrencySymbolByGridName + _CurrencySymbolByGridName(gridName) = currencySymbol + End SyncLock + End Sub ' Hilfsroutine: passt NUR das Summary-Item an (ohne FormatInfo) Private Sub ApplyCurrencySummaryFormat(oCol As GridColumn) oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - ' Variante A: Standard-Währungsformat aus aktueller Kultur - ' oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}" + _Logger.Debug("Applying currency summary format for column [{0}] with symbol [{1}]", oCol.FieldName, _currencySymbol) ' Variante B: Kulturunabhängig, Symbol explizit anhängen - oCol.SummaryItem.DisplayFormat = $"SUM: {{0:N2}} {_currencySymbol}" + oCol.SummaryItem.DisplayFormat = $"{{0:N2}} {_currencySymbol}" End Sub + ''' + ''' Aktualisiert die Währungsformatierung für alle CURRENCY-Spalten mit neuem Währungssymbol. + ''' Betrifft DisplayFormat, ColumnEdit (für editierbare Spalten) und Summary-Footer. + ''' + ''' + ''' + Public Sub UpdateCurrencyFormat(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl, pNewCurrencySymbol As String) + Try + _Logger.Info("[UpdateCurrencyFormat] *** START *** [{0}] → [{1}] für [{2}]", _currencySymbol, pNewCurrencySymbol, pGrid.Name) + + ' *** KERN-FIX: Speichere Symbol im SHARED Dictionary *** + Dim gridName As String = pGrid.Name + SyncLock _CurrencySymbolByGridName + If _CurrencySymbolByGridName.ContainsKey(gridName) Then + _CurrencySymbolByGridName(gridName) = pNewCurrencySymbol + Else + _CurrencySymbolByGridName.Add(gridName, pNewCurrencySymbol) + End If + End SyncLock + _Logger.Debug("[UpdateCurrencyFormat] Shared Dictionary updated: [{0}] = [{1}]", gridName, pNewCurrencySymbol) + + _currencySymbol = pNewCurrencySymbol + + Dim oCultureInfo As CultureInfo = New CultureInfo("de-DE") + oCultureInfo.NumberFormat.CurrencySymbol = _currencySymbol + + Dim riTextEdit As New RepositoryItemTextEdit() + riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)( + Sub(settings) + settings.MaskExpression = "c" + settings.Culture = oCultureInfo + End Sub) + riTextEdit.UseMaskAsDisplayFormat = False + riTextEdit.DisplayFormat.FormatType = FormatType.Custom + riTextEdit.DisplayFormat.FormatString = $"#,##0.00 {_currencySymbol}" + _Logger.Debug("[UpdateCurrencyFormat] riTextEdit: DisplayFormat=[{0}]", + riTextEdit.DisplayFormat.FormatString) + + pGridView.BeginUpdate() + Try + ' Schritt 1: Altes RepositoryItem entfernen (ohne vorher ColumnEdit=Nothing) + ' ColumnEdit NICHT auf Nothing setzen – das würde einen Zwischenrender auslösen + Dim oldItems = pGrid.RepositoryItems.OfType(Of RepositoryItemTextEdit)(). + Where(Function(item) item.MaskSettings.MaskExpression = "c").ToList() + For Each oldItem In oldItems + _Logger.Debug("[UpdateCurrencyFormat] Removing old riTextEdit: DisplayFormat=[{0}]", + oldItem.DisplayFormat.FormatString) + pGrid.RepositoryItems.Remove(oldItem) + Next + + ' Schritt 2: CURRENCY-Spalten konfigurieren + For Each oCol As GridColumn In pGridView.Columns + Dim oColumnData As DataRow = pColumnTable. + Select($"SPALTENNAME = '{oCol.FieldName}'"). + FirstOrDefault() + If oColumnData Is Nothing Then Continue For + + If ObjectEx.NotNull(oColumnData.Item("TYPE_COLUMN"), String.Empty).ToString() <> "CURRENCY" Then Continue For + + Dim oIsFormula As Boolean = + ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty) <> String.Empty + + ' DisplayFormat immer aktualisieren + oCol.DisplayFormat.FormatType = FormatType.Custom + oCol.DisplayFormat.FormatString = $"#,##0.00 {_currencySymbol}" + + If Not oIsFormula AndAlso oCol.OptionsColumn.AllowEdit Then + ' Direkt neues RepositoryItem setzen – kein Umweg über RepositoryItems-Collection + oCol.ColumnEdit = riTextEdit + _Logger.Debug("[UpdateCurrencyFormat] ColumnEdit=[{0}] für [{1}]", + DirectCast(oCol.ColumnEdit, RepositoryItemTextEdit).DisplayFormat.FormatString, + oCol.FieldName) + End If + + If ObjectEx.NotNull(oColumnData.Item("SUMMARY_FUNCTION"), String.Empty) = + Constants.AGGREGATE_TOTAL_CURRENCY Then + oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum + oCol.SummaryItem.DisplayFormat = $"{{0:N2}} {_currencySymbol}" + End If + Next + Finally + pGridView.EndUpdate() + End Try + + ' *** KEIN DataSource-Rebind *** + ' DataSource-Rebind (pGrid.DataSource = Nothing / = oCurrentDataSource) wirft + ' den gecachten Display-Text weg und erzwingt einen Neu-Render durch DevExpress. + ' Dabei greift DevExpress auf die Mask-Formatierung des RepositoryItems zurück + ' (z.B. "c" mit EUR-Culture) statt auf DisplayFormat → EUR bleibt sichtbar. + ' Stattdessen: LayoutChanged + alle Zeilen invalidieren → DevExpress rendert + ' die Zellen neu mit dem aktualisierten DisplayFormat und ColumnEdit. + pGridView.LayoutChanged() + For i As Integer = 0 To pGridView.DataRowCount - 1 + pGridView.InvalidateRow(i) + Next + pGridView.UpdateTotalSummary() + + _Logger.Info("[UpdateCurrencyFormat] *** END *** _currencySymbol=[{0}]", _currencySymbol) + + Catch ex As Exception + _Logger.Error("[UpdateCurrencyFormat] Fehler: {0}", ex.Message) + _Logger.Error(ex) + End Try + End Sub + Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl) Dim oShouldDisplayFooter As Boolean = False For Each oCol As GridColumn In pGridView.Columns @@ -256,8 +388,13 @@ Namespace ControlCreator oCol.DisplayFormat.FormatString = "N2" Case "CURRENCY" - oCol.DisplayFormat.FormatType = FormatType.Custom - oCol.DisplayFormat.FormatString = $"N2 {_currencySymbol}" + ' *** DisplayFormat wird NICHT hier gesetzt *** + ' ConfigureViewColumnsCurrency übernimmt die CURRENCY-Formatierung + ' mit dem korrekten _currencySymbol. Dieses Standardformat würde + ' später von UpdateCurrencyFormat überschrieben werden müssen – + ' für Formel-Spalten (kein ColumnEdit) greift aber nur DisplayFormat, + ' weshalb ein falscher Initialwert hier persistent bleibt. + _Logger.Debug("CURRENCY column [{0}]: DisplayFormat wird von ConfigureViewColumnsCurrency gesetzt", oCol.FieldName) End Select @@ -266,15 +403,16 @@ Namespace ControlCreator Select Case oSummaryFunction Case Constants.AGGREGATE_TOTAL_INTEGER oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - oCol.SummaryItem.DisplayFormat = "SUM: {0:N0}" + oCol.SummaryItem.DisplayFormat = "{0:N0}" oShouldDisplayFooter = True Case Constants.AGGREGATE_TOTAL_FLOAT oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum - oCol.SummaryItem.DisplayFormat = "SUM: {0:N2}" + oCol.SummaryItem.DisplayFormat = "{0:N2}" oShouldDisplayFooter = True Case Constants.AGGREGATE_TOTAL_CURRENCY + _Logger.Debug(Of String)("Applying currency summary format for column [{0}]", oCol.FieldName) ApplyCurrencySummaryFormat(oCol) oShouldDisplayFooter = True @@ -311,49 +449,140 @@ Namespace ControlCreator End If End Sub Public Sub ConfigureViewColumnsCurrency(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl) - Dim oCultureInfo As CultureInfo = New CultureInfo("de-DE") oCultureInfo.NumberFormat.CurrencySymbol = _currencySymbol + Dim riTextEdit As RepositoryItemTextEdit = New RepositoryItemTextEdit() - riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)(Sub(settings) - settings.MaskExpression = "c" - settings.Culture = oCultureInfo - End Sub) - riTextEdit.UseMaskAsDisplayFormat = True - pGrid.RepositoryItems.Add(riTextEdit) + riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)( + Sub(settings) + settings.MaskExpression = "c" + settings.Culture = oCultureInfo + End Sub) + riTextEdit.UseMaskAsDisplayFormat = False + riTextEdit.DisplayFormat.FormatType = FormatType.Custom + riTextEdit.DisplayFormat.FormatString = $"#,##0.00 {_currencySymbol}" + + ' *** DIAGNOSE 1: Zustand der RepositoryItems VOR der Zuweisung *** + _Logger.Debug("[ConfigureViewColumnsCurrency] riTextEdit erstellt: DisplayFormat=[{0}], HashCode=[{1}]", + riTextEdit.DisplayFormat.FormatString, riTextEdit.GetHashCode()) + _Logger.Debug("[ConfigureViewColumnsCurrency] pGrid.RepositoryItems.Count VOR Schleife=[{0}]", + pGrid.RepositoryItems.Count) For Each oCol As GridColumn In pGridView.Columns Dim oColumnData As DataRow = pColumnTable. Select($"SPALTENNAME = '{oCol.FieldName}'"). FirstOrDefault() + If oColumnData Is Nothing Then Continue For - If oColumnData Is Nothing Then - Continue For - End If + Dim oColumnType As String = ObjectEx.NotNull(oColumnData.Item("TYPE_COLUMN"), String.Empty).ToString() + If oColumnType <> "CURRENCY" Then Continue For - ' *** NEU: Prüfe ob Spalte editierbar ist *** - If Not oCol.OptionsColumn.AllowEdit Then - _Logger.Debug("Skipping ColumnEdit for read-only column [{0}]", oCol.FieldName) - Continue For + Dim oFormulaExpression = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty) + Dim oIsFormula As Boolean = oFormulaExpression <> String.Empty + + If oIsFormula Then + oCol.DisplayFormat.FormatType = FormatType.Custom + oCol.DisplayFormat.FormatString = $"#,##0.00 {_currencySymbol}" + _Logger.Debug("[ConfigureViewColumnsCurrency] Formel-Spalte [{0}]: DisplayFormat=[{1}], RepositoryItems.Count=[{2}]", + oCol.FieldName, oCol.DisplayFormat.FormatString, pGrid.RepositoryItems.Count) + + ElseIf oCol.OptionsColumn.AllowEdit Then + ' *** DIAGNOSE 2: RepositoryItems-Count VOR und NACH ColumnEdit-Zuweisung *** + _Logger.Debug("[ConfigureViewColumnsCurrency] [{0}] VOR ColumnEdit: RepositoryItems.Count=[{1}]", + oCol.FieldName, pGrid.RepositoryItems.Count) + + oCol.ColumnEdit = riTextEdit + + ' *** DIAGNOSE 3: Prüfen ob DevExpress das Item intern zu RepositoryItems hinzugefügt hat *** + _Logger.Debug("[ConfigureViewColumnsCurrency] [{0}] NACH ColumnEdit: RepositoryItems.Count=[{1}]", + oCol.FieldName, pGrid.RepositoryItems.Count) + + Dim assignedEdit = TryCast(oCol.ColumnEdit, RepositoryItemTextEdit) + _Logger.Debug("[ConfigureViewColumnsCurrency] [{0}]: IsSameObject=[{1}], ColumnEdit.DisplayFormat=[{2}], ColumnEdit.HashCode=[{3}]", + oCol.FieldName, + Object.ReferenceEquals(assignedEdit, riTextEdit), + If(assignedEdit IsNot Nothing, assignedEdit.DisplayFormat.FormatString, "N/A"), + If(assignedEdit IsNot Nothing, assignedEdit.GetHashCode(), -1)) + + ' *** DIAGNOSE 4: Alle Items in RepositoryItems ausgeben *** + For i As Integer = 0 To pGrid.RepositoryItems.Count - 1 + _Logger.Debug("[ConfigureViewColumnsCurrency] RepositoryItems[{0}]: Type=[{1}], HashCode=[{2}]", + i, pGrid.RepositoryItems(i).GetType().Name, pGrid.RepositoryItems(i).GetHashCode()) + Next End If + Next - ' Formel-Spalten dürfen kein ColumnEdit bekommen, da der RepositoryItem-Cache - ' den berechneten Wert nach RefreshRowCell überschreibt. - Dim oFormulaExpression = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty) - If oFormulaExpression <> String.Empty Then - _Logger.Debug("Skipping ColumnEdit assignment for formula column [{0}] – using DisplayFormat only.", oCol.FieldName) - Continue For + ' *** DIAGNOSE 5: CustomColumnDisplayText – feuert es überhaupt? *** + ' Temporär direkt hier einen einmaligen Test-Handler registrieren + Dim oTestFired As Boolean = False + AddHandler pGridView.CustomColumnDisplayText, + Sub(sender As Object, e As CustomColumnDisplayTextEventArgs) + If e.Column Is Nothing OrElse e.Value Is Nothing OrElse IsDBNull(e.Value) Then + Return End If - Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN") + ' Prüfe ob Spalte vom Typ CURRENCY ist + Dim oColumnData As DataRow = pColumnTable. + Select($"SPALTENNAME = '{e.Column.FieldName}'"). + FirstOrDefault() - Select Case oColumnType - Case "CURRENCY" - ' *** WICHTIG: NUR ColumnEdit setzen, KEIN DisplayFormat mehr! *** - oCol.ColumnEdit = riTextEdit - End Select - Next + If oColumnData IsNot Nothing AndAlso + oColumnData.Item("TYPE_COLUMN").ToString() = "CURRENCY" Then + + Try + ' *** KERN-FIX: Hole Symbol aus SHARED Dictionary statt Instanz-Feld *** + Dim currentSymbol As String = _currencySymbol ' Fallback + Dim gridName As String = pGrid.Name ' <-- FIX: pGrid statt pControl + SyncLock _CurrencySymbolByGridName + If _CurrencySymbolByGridName.ContainsKey(gridName) Then + currentSymbol = _CurrencySymbolByGridName(gridName) + End If + End SyncLock + + Dim oValue As Double + ' *** KRITISCH: Robustes Parsing unabhängig vom Dezimaltrenner *** + If TypeOf e.Value Is Double OrElse TypeOf e.Value Is Decimal Then + oValue = Convert.ToDouble(e.Value) + ElseIf TypeOf e.Value Is String Then + Dim oStringValue As String = e.Value.ToString().Trim() + + ' Versuche zuerst deutsches Format (1.234,56) + Dim oDeCulture As CultureInfo = New CultureInfo("de-DE") + If Double.TryParse(oStringValue, NumberStyles.Currency Or NumberStyles.Number, oDeCulture, oValue) Then + ' Erfolgreich mit deutschem Format geparst + ElseIf Double.TryParse(oStringValue, NumberStyles.Currency Or NumberStyles.Number, CultureInfo.InvariantCulture, oValue) Then + ' Erfolgreich mit invariantem Format (Punkt als Dezimaltrenner) + Else + ' Fallback: Systemkultur + oValue = Convert.ToDouble(oStringValue, CultureInfo.CurrentCulture) + End If + Else + oValue = Convert.ToDouble(e.Value) + End If + + ' Formatierung IMMER mit deutscher Kultur (Komma als Dezimaltrenner) + 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) + + Catch ex As Exception + _Logger.Warn("⚠️ Could not format currency value [{0}] for column [{1}]: {2}", + e.Value, e.Column.FieldName, ex.Message) + ' Fallback: Original-Wert + Symbol + Dim fallbackSymbol As String = _currencySymbol + SyncLock _CurrencySymbolByGridName + If _CurrencySymbolByGridName.ContainsKey(pGrid.Name) Then ' <-- FIX: pGrid statt pControl + fallbackSymbol = _CurrencySymbolByGridName(pGrid.Name) + End If + End SyncLock + e.DisplayText = e.Value.ToString() & " " & fallbackSymbol + End Try + End If + End Sub End Sub + Public Sub ConfigureViewEvents(pColumnTable As DataTable, pGridView As GridView, pControl As Windows.Forms.Control, pControlId As Integer) ' Formel-Spalten-Namen einmalig cachen für View_ShowingEditor _FormulaColumnNames.Clear() @@ -405,6 +634,15 @@ Namespace ControlCreator oColumnData.Item("TYPE_COLUMN").ToString() = "CURRENCY" Then Try + ' *** KERN-FIX: Hole Symbol aus SHARED Dictionary statt Instanz-Feld *** + Dim currentSymbol As String = _currencySymbol ' Fallback + Dim gridName As String = pControl.Name + SyncLock _CurrencySymbolByGridName + If _CurrencySymbolByGridName.ContainsKey(gridName) Then + currentSymbol = _CurrencySymbolByGridName(gridName) + End If + End SyncLock + Dim oValue As Double ' *** KRITISCH: Robustes Parsing unabhängig vom Dezimaltrenner *** If TypeOf e.Value Is Double OrElse TypeOf e.Value Is Decimal Then @@ -428,13 +666,22 @@ Namespace ControlCreator ' Formatierung IMMER mit deutscher Kultur (Komma als Dezimaltrenner) Dim oDeCultureInfo As CultureInfo = New CultureInfo("de-DE") - e.DisplayText = oValue.ToString("N2", oDeCultureInfo) & " " & _currencySymbol + 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) Catch ex As Exception _Logger.Warn("⚠️ Could not format currency value [{0}] for column [{1}]: {2}", e.Value, e.Column.FieldName, ex.Message) ' Fallback: Original-Wert + Symbol - e.DisplayText = e.Value.ToString() & " " & _currencySymbol + Dim fallbackSymbol As String = _currencySymbol + SyncLock _CurrencySymbolByGridName + If _CurrencySymbolByGridName.ContainsKey(pControl.Name) Then + fallbackSymbol = _CurrencySymbolByGridName(pControl.Name) + End If + End SyncLock + e.DisplayText = e.Value.ToString() & " " & fallbackSymbol End Try End If End Sub @@ -442,19 +689,47 @@ Namespace ControlCreator AddHandler pGridView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs) Try For Each oRow As DataRow In pColumnTable.Rows - Dim oColumnName = oRow.Item("SPALTENNAME") + Dim oColumnName As String = oRow.Item("SPALTENNAME").ToString() + If oColumnName <> e.Column.FieldName Then Continue For + Dim oEditorExists = GridTables_TestEditorExistsByControlAndColumn(pControlId, oColumnName) - If oColumnName <> e.Column.FieldName Then - Continue For - End If If oEditorExists Then + ' Combobox/Lookup-Editor aus GridTables: immer zuweisen Dim oEditor = _GridTables.Item(pControlId).Item(oColumnName) _Logger.Debug("Assigning Editor to Column [{0}]", oColumnName) e.RepositoryItem = oEditor Else - _Logger.Debug("Editor for Column [{0}] does not exist", oColumnName) + Dim oColumnType As String = ObjectEx.NotNull(oRow.Item("TYPE_COLUMN"), String.Empty).ToString() + If oColumnType = "CURRENCY" Then + ' *** KERN-FIX *** + ' Für CURRENCY-Spalten wird e.RepositoryItem NIEMALS gesetzt. + ' + ' Grund: Sobald e.RepositoryItem gesetzt ist, übernimmt das + ' RepositoryItem die komplette Zelldarstellung – DevExpress + ' übergeht CustomColumnDisplayText vollständig. Das RepositoryItem + ' verwendet intern die Mask-Culture ("c" = EUR) zur Anzeige, + ' unabhängig von DisplayFormat oder _currencySymbol. + ' + ' Korrekte Architektur: + ' - Anzeige (nicht editiert): CustomColumnDisplayText + ' → formatiert mit _currencySymbol (CHF) + ' - Bearbeitung (editiert): ColumnEdit an der GridColumn + ' → wird von DevExpress beim Öffnen + ' des Editors automatisch verwendet + ' + ' CustomRowCellEdit muss NICHT eingreifen – GridColumn.ColumnEdit + ' ist bereits gesetzt und wird für den Editiermodus korrekt genutzt. + 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) + End If End If + Exit For Next Catch ex As Exception _Logger.Warn("⚠️ Error in CustomRowCellEdit for [{0}]", e.CellValue) diff --git a/app/TaskFlow/Log_Waehrung.txt b/app/TaskFlow/Log_Waehrung.txt new file mode 100644 index 0000000..d5e05ca --- /dev/null +++ b/app/TaskFlow/Log_Waehrung.txt @@ -0,0 +1,1804 @@ +13:32:00.6979|frmValidator|DEBUG >> LookupListChanged -> LookupControl [Kostenstelle] marked as dirty +13:32:00.6979|frmValidator|DEBUG >> LookupListChanged -> LookupListChanged suppressed (global guard active) +13:32:00.6979|frmValidator|DEBUG >> onLookUpselectedValue -> onLookUpselectedValue +13:32:00.6979|frmValidator|DEBUG >> onLookUpselectedValue -> onLookUpselectedValue suppressed (global guard active) +13:32:00.6979|frmValidator|DEBUG >> onLookUpselectedValue_Control2Set -> onLookUpselectedValue_Control2Set +13:32:00.6979|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.6979|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [Kostenstelle] with value type [List`1] +13:32:00.6979|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.6979|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.6979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.6979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.6979|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.6979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.6979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.6979|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.6979|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.6979|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.6979|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.6979|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.6979|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.6979|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.6979|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.6979|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.6979|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.6979|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.7169|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.7169|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.7169|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.7169|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7169|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.7169|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.7169|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.7169|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.7169|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.7169|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.7169|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.7169|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.7169|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.7169|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7169|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.7169|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.7169|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7169|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.7169|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.7169|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.7419|frmValidator|DEBUG >> OnTextBoxLostFocus -> Control [BelegNr] marked as dirty +13:32:00.7419|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BelegNr] with value type [String] +13:32:00.7419|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.7419|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BelegNr] +13:32:00.7419|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.7419|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7419|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.7419|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.7439|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.7439|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.7439|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.7439|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.7439|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.7439|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.7439|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7439|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.7439|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.7439|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7439|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.7439|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.7439|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.7439|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.7439|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.7439|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.7439|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.7439|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.7439|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.7439|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.7439|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.7439|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.7439|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7439|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.7599|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.7599|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7599|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.7599|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.7599|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.7599|frmValidator|DEBUG >> onLookUpselectedValue -> onLookUpselectedValue +13:32:00.7599|frmValidator|DEBUG >> LookupControl_DependingControls -> oLOOKUPValue Is [3323382010]! +13:32:00.7599|frmValidator|DEBUG >> LookupControl_DependingControls -> We got 2 depending controls!! +13:32:00.7599|frmValidator|DEBUG >> LookupControl_DependingControls -> Control Verantwortliche is depending on lookUp Kostenstelle.. +13:32:00.7599|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '{#CTRL#Kostenstelle}' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'VA' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ +] +13:32:00.7599|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: --Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '{#CTRL#Kostenstelle}' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'VA' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ + +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [Kostenstelle]. +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [Kostenstelle] mit genau einem Value +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.7599|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [Kostenstelle], oReplaceValue Type: [String], Value: [3323382010], IsSQL: [True] +13:32:00.7599|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323382010] +13:32:00.7599|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323382010] +13:32:00.7599|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '3323382010' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'VA' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ +] +13:32:00.7599|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.7599|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.7599|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.7599|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7599|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '3323382010' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'VA' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ +] and Parameters [] +13:32:00.7979|frmValidator|DEBUG >> LookupControl_DependingControls -> Got the depending control ID:3438..Setting the values.. +13:32:00.7979|taskFLOW|DEBUG >> LookupControl_DependingControls -> [LookupControl_DependingControls] _suppressLookupEvents zurückgesetzt auf [True] +13:32:00.7979|frmValidator|DEBUG >> LookupControl_DependingControls -> Control FreigeberFinal is depending on lookUp Kostenstelle.. +13:32:00.7979|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '{#CTRL#Kostenstelle}' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'FF' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ + +] +13:32:00.7979|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: --Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '{#CTRL#Kostenstelle}' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'FF' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ + + +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [Kostenstelle]. +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [Kostenstelle] mit genau einem Value +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.7979|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [Kostenstelle], oReplaceValue Type: [String], Value: [3323382010], IsSQL: [True] +13:32:00.7979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323382010] +13:32:00.7979|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323382010] +13:32:00.7979|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '3323382010' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'FF' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ + +] +13:32:00.7979|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.7979|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.7979|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.7979|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.7979|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [--Changed 15.07.2025 MS Vorschlag integriert +DECLARE @KST NVARCHAR(100) = '3323382010' +DECLARE @TB TABLE (EMAIL NVARCHAR(250),Freigaben INT,SEQ INT IDENTITY(1,1) NOT NULL ) +INSERT INTO @TB (EMAIL,Freigaben) +SELECT Mail ,Freigaben FROM DD_ECM_REF.[dbo].[TBCUST_KST_FREIGABEN] WHERE KST = @KST AND VA_FF = 'FF' ORDER BY Freigaben DESC; +INSERT INTO @TB (EMAIL,Freigaben) +SELECT EMAIL,0 FROM VWCUST_USER_Ferdinand WHERE EMAIL NOT IN (SELECT EMAIL FROM @TB) +order by Email + +SELECT EMAIL,Freigaben FROM @TB ORDER BY SEQ + +] and Parameters [] +13:32:00.8319|frmValidator|DEBUG >> LookupControl_DependingControls -> Got the depending control ID:3440..Setting the values.. +13:32:00.8319|taskFLOW|DEBUG >> LookupControl_DependingControls -> [LookupControl_DependingControls] _suppressLookupEvents zurückgesetzt auf [True] +13:32:00.8319|frmValidator|DEBUG >> LookupControl_EnablingControls -> LookupControl_EnablingControls [Kostenstelle] - oLOOKUPValue is [3323382010]! +13:32:00.8319|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [Kostenstelle] +13:32:00.8319|frmValidator|DEBUG >> onLookUpselectedValue_Control2Set -> onLookUpselectedValue_Control2Set +13:32:00.8319|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] START für Control: [Kostenstelle], GUID: [3491] +13:32:00.8319|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Working on SetControlValue for Kostenstelle ... +13:32:00.8319|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Original SQL: [--MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = '{#INT#USERNAME}' +SET @pKST = '{#CTRL#Kostenstelle}' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '{#CTRL#BuchungskreisNr}'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor ] +13:32:00.8319|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [--MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = '{#INT#USERNAME}' +SET @pKST = '{#CTRL#Kostenstelle}' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '{#CTRL#BuchungskreisNr}'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor ] +13:32:00.8319|taskFLOW|DEBUG >> ReplaceIDBAttributes -> IS_SQL = True - oReplaceValue = [{#IDBA#ObjectID}] +13:32:00.8319|taskFLOW|DEBUG >> ReplaceIDBAttributes -> oIDBValue = 5659655 +13:32:00.8319|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: --MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = 'marschreiber' +SET @pKST = '{#CTRL#Kostenstelle}' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '{#CTRL#BuchungskreisNr}'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA {#IDBA#ObjectID}, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [Kostenstelle]. +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [Kostenstelle] mit genau einem Value +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323382010 +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [Kostenstelle], oReplaceValue Type: [String], Value: [3323382010], IsSQL: [True] +13:32:00.8319|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323382010] +13:32:00.8319|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323382010] +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8319|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.8319|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.8319|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.8319|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [--MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = 'marschreiber' +SET @pKST = '3323382010' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '3323'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor ] +13:32:00.8319|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Nach ReplaceAllValues: [--MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = 'marschreiber' +SET @pKST = '3323382010' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '3323'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor ] +13:32:00.8319|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.8319|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.8319|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.8319|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8319|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [--MS 14.01.2026 +DECLARE @KSTVA VARCHAR(100),@pKST VARCHAR(10), +@WHO NVARCHAR(200) = 'marschreiber' +SET @pKST = '3323382010' +SET @KSTVA = '' +SELECT @KSTVA = COALESCE(kontaktMail,'') FROM DD_ECM.dbo.TBCUST_SYNC_API_AUFTRAEGE +WHERE +AUFTRAGSNR = @pKST AND MDNR = '3323'; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'FreigeberFinal',@WHO; +EXEC IDB.dbo.PRIDB_DELETE_ATTRIBUTE_DATA 5659655, 'Verantwortliche',@WHO; + +SELECT '3474' as Control2Set, @KSTVA Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3438' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor UNION +SELECT '3440' as Control2Set, '' Caption, 'Yellow' as BackgroundColor, '' as FontColor ] and Parameters [] +13:32:00.8459|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] SQL returned 3 rows +13:32:00.8459|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Row: Control2Set=[3438], Caption=[], TextOption=[Replace] +13:32:00.8459|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Got the Control2Set: Verantwortliche (Type: LookupControl3)..Setting the values.. +13:32:00.8459|frmValidator|DEBUG >> LookupListChanged -> LookupControl [Verantwortliche] marked as dirty +13:32:00.8459|frmValidator|DEBUG >> LookupListChanged -> LookupListChanged suppressed (global guard active) +13:32:00.8459|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [Verantwortliche] with value type [List`1] +13:32:00.8459|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.8459|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.8459|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.8459|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.8459|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.8459|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.8459|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.8459|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.8459|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.8459|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.8459|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.8459|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.8459|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.8459|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8459|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.8459|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.8459|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8459|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.8609|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.8609|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.8609|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.8609|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8609|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.8609|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.8609|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.8609|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.8609|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.8609|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.8609|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.8609|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.8609|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.8609|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8609|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.8609|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.8609|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8609|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.8709|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.8709|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.8709|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BelegNr] with value type [String] +13:32:00.8709|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.8709|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BelegNr] +13:32:00.8709|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.8709|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.8709|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.8709|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.8709|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.8709|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.8709|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.8709|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.8709|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.8709|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.8709|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.8709|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.8709|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.8709|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8709|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.8709|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.8709|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8709|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.8899|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.8899|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.8899|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.8899|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.8899|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.8899|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.8899|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.8899|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.8899|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.8899|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.8899|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.8899|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.8899|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.8899|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8899|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.8899|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.8899|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.8899|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.9039|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9039|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9039|frmValidator|DEBUG >> OnTextBoxLostFocus -> Control [KstVerantwortliche] marked as dirty +13:32:00.9039|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [KstVerantwortliche] with value type [String] +13:32:00.9039|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> Controls2beEnabled für [KstVerantwortliche]: 2 Controls zu prüfen +13:32:00.9039|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9039|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:00.9039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:00.9039|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:00.9039|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2VA1]: Führe SQL_ENABLE aus... +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2VA1]: Result = [False] +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2VA1] Enabled = [False] +13:32:00.9039|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9039|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:00.9039|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:00.9039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:00.9039|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:00.9039|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2FF1]: Führe SQL_ENABLE aus... +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2FF1]: Result = [False] +13:32:00.9039|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2FF1] Enabled = [False] +13:32:00.9159|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 4] Controls2beEnabled: Normale Beendigung +13:32:00.9159|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.9159|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9159|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9159|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9159|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.9159|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.9159|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.9159|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.9159|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9159|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9159|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9159|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9159|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9159|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9159|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9159|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9159|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9159|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.9399|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9399|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9399|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9399|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9399|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9399|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9399|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9399|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9399|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9399|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9399|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9399|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9399|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9399|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9399|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9399|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9399|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9399|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.9499|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9499|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9499|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Lookup [Verantwortliche]: '' → '' (Mode: Replace) +13:32:00.9499|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Force-Reindex vorgemerkt für: [Verantwortliche] +13:32:00.9499|frmValidator|DEBUG >> LookupListChanged -> LookupControl [Verantwortliche] marked as dirty +13:32:00.9499|frmValidator|DEBUG >> LookupListChanged -> LookupListChanged suppressed (global guard active) +13:32:00.9499|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [Verantwortliche] with value type [List`1] +13:32:00.9499|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.9499|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9499|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9499|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9499|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.9499|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.9499|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.9499|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.9499|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9499|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9499|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9499|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9499|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9499|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9499|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9499|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9499|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9499|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.9629|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9629|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9629|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9629|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9629|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9629|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9629|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9629|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9629|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9629|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9629|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9629|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9629|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9629|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.9629|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9629|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9629|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [KstVerantwortliche] with value type [String] +13:32:00.9629|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.9629|frmValidator|DEBUG >> Controls2beEnabled -> Controls2beEnabled für [KstVerantwortliche]: 2 Controls zu prüfen +13:32:00.9629|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:00.9629|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:00.9629|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:00.9629|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9629|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2VA1]: Führe SQL_ENABLE aus... +13:32:00.9629|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2VA1]: Result = [False] +13:32:00.9629|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2VA1] Enabled = [False] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9629|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:00.9629|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:00.9629|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:00.9629|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:00.9789|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9789|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2FF1]: Führe SQL_ENABLE aus... +13:32:00.9789|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2FF1]: Result = [False] +13:32:00.9789|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2FF1] Enabled = [False] +13:32:00.9789|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 4] Controls2beEnabled: Normale Beendigung +13:32:00.9789|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:00.9789|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9789|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9789|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9789|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9789|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9789|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9789|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9789|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9789|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9789|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:00.9789|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9789|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:00.9789|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:00.9789|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:00.9789|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:00.9939|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:00.9939|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:00.9939|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:00.9939|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:00.9939|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:00.9939|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9939|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:00.9939|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:00.9939|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:00.9939|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:00.9939|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:00.9939|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:00.9939|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [KstVerantwortliche] with value type [String] +13:32:00.9939|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:00.9939|frmValidator|DEBUG >> Controls2beEnabled -> Controls2beEnabled für [KstVerantwortliche]: 2 Controls zu prüfen +13:32:00.9939|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:00.9939|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:00.9939|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:01.0099|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:01.0099|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2VA1]: Führe SQL_ENABLE aus... +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2VA1]: Result = [False] +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2VA1] Enabled = [False] +13:32:01.0099|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0099|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:01.0099|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:01.0099|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2FF1]: Führe SQL_ENABLE aus... +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2FF1]: Result = [False] +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2FF1] Enabled = [False] +13:32:01.0099|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 4] Controls2beEnabled: Normale Beendigung +13:32:01.0099|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.0099|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0099|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.0099|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.0099|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.0099|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0099|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0099|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0099|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0099|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0099|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0099|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0099|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0099|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0099|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.0269|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0269|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0269|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0269|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0269|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0269|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0269|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0269|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0269|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.0269|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0269|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0269|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [Verantwortliche] with value type [List`1] +13:32:01.0269|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Row: Control2Set=[3440], Caption=[], TextOption=[Replace] +13:32:01.0269|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Got the Control2Set: FreigeberFinal (Type: LookupControl3)..Setting the values.. +13:32:01.0269|frmValidator|DEBUG >> LookupListChanged -> LookupControl [FreigeberFinal] marked as dirty +13:32:01.0269|frmValidator|DEBUG >> LookupListChanged -> LookupListChanged suppressed (global guard active) +13:32:01.0269|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [FreigeberFinal] with value type [List`1] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0269|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.0269|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.0269|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0269|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0269|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0269|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0269|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0269|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0269|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0409|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0409|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.0409|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0409|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0409|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0409|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0409|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0409|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0409|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0409|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0409|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0409|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0409|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0409|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0409|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0409|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0409|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0409|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0409|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.0409|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0409|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0409|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [KstVerantwortliche] with value type [String] +13:32:01.0409|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:01.0409|frmValidator|DEBUG >> Controls2beEnabled -> Controls2beEnabled für [KstVerantwortliche]: 2 Controls zu prüfen +13:32:01.0409|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0409|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:01.0409|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:01.0409|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:01.0409|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:01.0569|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2VA1]: Führe SQL_ENABLE aus... +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2VA1]: Result = [False] +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2VA1] Enabled = [False] +13:32:01.0569|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0569|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: DECLARE @LEN INT +SET @LEN = LEN('{#CTRL#KstVerantwortliche}') +IF @LEN > 0 AND '{#CTRL#KstVerantwortliche}' <> '0' + SELECT 'True' +ELSE + SELECT 'False' + +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [KstVerantwortliche]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DevExpress.XtraEditors.TextEdit]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> TextEdit- oReplaceValue will be []. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [KstVerantwortliche], oReplaceValue Type: [String], Value: [], IsSQL: [True] +13:32:01.0569|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [] +13:32:01.0569|taskFLOW|WARN >> SafeSqlEscape -> [SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE +13:32:01.0569|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [DECLARE @LEN INT +SET @LEN = LEN('0') +IF @LEN > 0 AND '0' <> '0' + SELECT 'True' +ELSE + SELECT 'False' +] +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> [SQL START] Control [BTN_Kst2FF1]: Führe SQL_ENABLE aus... +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> [SQL ENDE] Control [BTN_Kst2FF1]: Result = [False] +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> Control [BTN_Kst2FF1] Enabled = [False] +13:32:01.0569|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 4] Controls2beEnabled: Normale Beendigung +13:32:01.0569|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.0569|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0569|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0569|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0569|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.0569|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.0569|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.0569|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.0569|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0569|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0569|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0569|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0569|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0569|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0569|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0569|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0569|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0569|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.0759|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0759|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0759|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0759|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0759|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0759|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0759|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0759|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0759|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0759|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0759|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0759|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0759|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0759|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0759|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0759|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0759|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0759|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.0759|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0759|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0889|frmValidator|DEBUG >> OnTextBoxLostFocus -> Control [BestelltWer] marked as dirty +13:32:01.0889|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BestelltWer] with value type [String] +13:32:01.0889|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:01.0889|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BestelltWer] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0889|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0889|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0889|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0889|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.0889|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.0889|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.0889|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.0889|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.0889|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.0889|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.0889|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.0889|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.0889|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.0889|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.0889|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.0889|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1039|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1039|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1039|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1039|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.1039|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1039|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1039|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Lookup [FreigeberFinal]: '' → '' (Mode: Replace) +13:32:01.1039|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Force-Reindex vorgemerkt für: [FreigeberFinal] +13:32:01.1039|frmValidator|DEBUG >> LookupListChanged -> LookupControl [FreigeberFinal] marked as dirty +13:32:01.1039|frmValidator|DEBUG >> LookupListChanged -> LookupListChanged suppressed (global guard active) +13:32:01.1039|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [FreigeberFinal] with value type [List`1] +13:32:01.1039|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.1039|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1039|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.1039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.1039|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.1039|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.1039|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1039|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1039|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1039|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1039|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1039|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1039|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1039|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1039|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1039|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.1199|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1199|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1199|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1199|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1199|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1199|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1199|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1199|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1199|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1199|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1199|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1199|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1199|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1199|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1199|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1199|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1199|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.1199|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1199|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1199|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BestelltWer] with value type [String] +13:32:01.1199|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:01.1199|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BestelltWer] +13:32:01.1199|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.1199|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1199|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.1349|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1349|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1349|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1349|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1349|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1349|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1349|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1349|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.1349|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1349|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1349|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1349|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1349|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1349|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1349|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1349|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1349|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1349|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1349|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1349|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1349|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1349|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1349|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.1539|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1539|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1539|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BestelltWer] with value type [String] +13:32:01.1539|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft) +13:32:01.1539|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BestelltWer] +13:32:01.1539|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:01.1539|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1539|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1539|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:01.1539|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:01.1539|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:01.1539|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:01.1539|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:01.1539|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1539|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1539|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1539|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1539|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1539|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1539|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1539|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1539|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1539|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:01.1679|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1679|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1679|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1679|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:01.1679|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:01.1679|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:01.1679|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:01.1679|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:01.1679|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:01.1679|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:01.1679|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:01.1679|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:01.1679|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:01.1679|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1679|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:01.1679|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:01.1679|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:01.1679|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:01.1679|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:01.1679|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:01.1679|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [FreigeberFinal] with value type [List`1] +13:32:01.1679|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Row: Control2Set=[3474], Caption=[Guido.Thieke@wisag.de], TextOption=[Replace] +13:32:01.1679|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Got the Control2Set: KstVerantwortliche (Type: TextEdit)..Setting the values.. +13:32:01.1679|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] TextEdit [KstVerantwortliche]: '' → 'Guido.Thieke@wisag.de' +13:32:01.1679|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] Force-Reindex vorgemerkt für: [KstVerantwortliche] +13:32:01.1679|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [KstVerantwortliche] with value type [String] +13:32:01.1679|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] END für Control: [Kostenstelle], ButtonFinishSet=False +13:32:03.3960|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[1.957,82 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.3960|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[1.957,82 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4110|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[1.957,82 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4110|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[1.957,82 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[120,00 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[120,00 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[120,00 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[120,00 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[67,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4160|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[67,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4420|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[67,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4420|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[67,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4420|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[76,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4420|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[76,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.4670|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[76,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.4670|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [column2]: DisplayText=[76,50 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.5290|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Basisbetrag]: DisplayText=[3.225,45 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.5290|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Basisbetrag]: DisplayText=[3.225,45 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.5290|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Steuerbetrag]: DisplayText=[612,84 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.5290|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Steuerbetrag]: DisplayText=[612,84 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.5460|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Basisbetrag]: DisplayText=[3.225,45 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.5460|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Basisbetrag]: DisplayText=[3.225,45 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:03.5460|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Steuerbetrag]: DisplayText=[612,84 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewColumnsCurrency) +13:32:03.5460|GridControl|DEBUG >> _Lambda$__1 -> [CustomColumnDisplayText] CURRENCY [TB_Steuerbeträge_COL_Steuerbetrag]: DisplayText=[612,84 EUR], Symbol=[EUR] (from Shared Dict in ConfigureViewEvents) +13:32:04.2430|taskFLOW|DEBUG >> UpdateControlInCache -> Cache updated for control [BestelltWer] with value type [String] +13:32:04.2440|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] START für Control: [BestelltWer], GUID: [3476] +13:32:04.2440|frmValidator|DEBUG >> SetControlValues_FromControl -> [SetControlValues_FromControl] SET_CONTROL_DATA is empty for control [BestelltWer]. Exiting. +13:32:04.2440|frmValidator|DEBUG >> Controls2beEnabled -> [EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [BestelltWer] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('{#CTRL#BuchungskreisNr}','{#CTRL#LieferantNr}') ORDER BY SELECTED DESC +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [LieferantNr]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [LieferantNr] mit genau einem Value +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 7010912 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [LieferantNr], oReplaceValue Type: [String], Value: [7010912], IsSQL: [True] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [7010912] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [7010912] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:04.2440|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:04.2440|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:04.2440|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:04.2440|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:04.2440|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:04.2440|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:04.2440|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT SANO,SATITLE,SELECTED AS Häufigkeit FROM dbo.FNCUST_GET_SACHKONTEN ('3323','7010912') ORDER BY SELECTED DESC] and Parameters [] +13:32:04.2440|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:04.2440|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceAllValues -> input BEFORE replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceIDBAttributes -> sql after ReplaceIDBAttributes: -- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('{#CTRL#BuchungskreisNr}') +ORDER BY SEQU + +-- Test mit: +-- 0151 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> Found placeholder for control [BuchungskreisNr]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oControl.GetType [DigitalData.Controls.LookupGrid.LookupControl3]. +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> LookupControl3 [BuchungskreisNr] mit genau einem Value +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> oReplaceValue nach Durchlaufen selectedValues: 3323 +13:32:04.2440|taskFLOW|DEBUG >> ReplaceControlValues -> [SQL-ESCAPE CHECK] Control: [BuchungskreisNr], oReplaceValue Type: [String], Value: [3323], IsSQL: [True] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Input Type: [String], Value: [3323] +13:32:04.2440|taskFLOW|DEBUG >> SafeSqlEscape -> [SafeSqlEscape] Output: [3323] +13:32:04.2440|taskFLOW|DEBUG >> ReplaceAllValues -> input AFTER replacing: [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatable -> ForceFallback is True, falling back to direct database access. +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Fetching data from database [ECM] with Connection Id [ECM] +13:32:04.2440|DatabaseWithFallback|DEBUG >> GetDatatableFromDatabase -> Retrieving Connection String from Connection Id [1] +13:32:04.2440|MSSQLServer|DEBUG >> Get_ConnectionStringforID(MSSQLServer.vb:172) -> Getting ConnectionString for ConnectionId [1] +13:32:04.2440|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Server=W2K19SRV398;Database=DD_ECM;User Id=EDMAdmin;Password=XXXXX;Application Name=DD_EDMIAppService;Workstation ID=W2K19SRV391; +13:32:04.2440|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:04.2440|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [SELECT * FROM TBDD_CONNECTION WHERE GUID = 1] and Parameters [] +13:32:04.2600|MSSQLServer|DEBUG >> GetConnection(MSSQLServer.vb:275) -> The Following Connection is open: Data Source=w2k19srv398;Initial Catalog=DD_ECM;User ID=EDMAdmin;Password=XXXXX +13:32:04.2600|MSSQLServer|DEBUG >> MaybeGetTransaction(MSSQLServer.vb:117) -> Transaction Mode: [WithTransaction] +13:32:04.2600|MSSQLServer|DEBUG >> GetDatatableWithConnectionObject(MSSQLServer.vb:390) -> GetDatatableWithConnectionObject: Running Query [-- MK // 05.08.2025 + +SELECT KST + ' - ' + TITLE as 'Kostenstelle' +FROM [dbo].[FNCUST_GET_KST] ('3323') +ORDER BY SEQU + +-- Test mit: +-- 0151] and Parameters [] +13:32:04.2600|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for all Gridcells.. +13:32:04.2600|ClassControlCreator|DEBUG >> GridTables_HandleControlValueChange -> Force-setting Editor for Grid [Kontierung] diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 791a22a..8d046a5 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/TaskFlow.vbproj b/app/TaskFlow/TaskFlow.vbproj index b686d29..57d97d0 100644 --- a/app/TaskFlow/TaskFlow.vbproj +++ b/app/TaskFlow/TaskFlow.vbproj @@ -1284,6 +1284,7 @@ + PreserveNewest diff --git a/app/TaskFlow/clsPatterns.vb b/app/TaskFlow/clsPatterns.vb index 186869b..e5ba877 100644 --- a/app/TaskFlow/clsPatterns.vb +++ b/app/TaskFlow/clsPatterns.vb @@ -1,10 +1,11 @@ Imports System.Text.RegularExpressions -Imports WINDREAMLib -Imports DigitalData.Controls.LookupGrid +Imports DevExpress.Xpo.Helpers.AssociatedCollectionCriteriaHelper +Imports DevExpress.XtraEditors Imports DevExpress.XtraGrid -Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Columns -Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid.Views.Grid +Imports DigitalData.Controls.LookupGrid +Imports WINDREAMLib ''' ''' Defines common Functions for Checking for and replacing placeholders. ''' This Class also includes a child class `Pattern` for passing around Patterns. @@ -150,34 +151,39 @@ Public Class clsPatterns End Function Public Shared Function ReplaceAllValues(input As String, panel As DevExpress.XtraEditors.XtraScrollableControl, is_SQL As Boolean) As String + Dim oResult = input Try - Dim result = input - If Not HasAnyPatterns(result) Then - Return result + If Not HasAnyPatterns(oResult) Then + Return oResult End If - LOGGER.Debug($"input BEFORE replacing: [{result}]") - result = ReplaceInternalValues(result) + LOGGER.Debug($"input BEFORE replacing: [{oResult}]") + oResult = ReplaceInternalValues(oResult) If Not IsNothing(CURRENT_WMFILE) Then - result = ReplaceWindreamIndicies(result, CURRENT_WMFILE, is_SQL) + oResult = ReplaceWindreamIndicies(oResult, CURRENT_WMFILE, is_SQL) End If If IDB_ACTIVE = True Then - result = ReplaceIDBAttributes(result, is_SQL) + oResult = ReplaceIDBAttributes(oResult, is_SQL) End If 'vorher hinter result = ReplaceInternalValues(result) - result = ReplaceControlValues(result, panel, is_SQL) + oResult = ReplaceControlValues(oResult, panel, is_SQL) - If Not IsNothing(result) Then - result = ReplaceUserValues(result) - LOGGER.Debug($"input AFTER replacing: [{result}]") + If Not IsNothing(oResult) Then + oResult = ReplaceUserValues(oResult) + LOGGER.Debug($"input AFTER replacing: [{oResult}]") End If - Return result + Return oResult Catch ex As Exception LOGGER.Error(ex) - LOGGER.Info("Error in ReplaceAllValues:" & ex.Message) + LOGGER.Error($"❌ CRITICAL ERROR in ReplaceAllValues!") + LOGGER.Error($" Input: [{input}]") + LOGGER.Error($" Last successful result: [{oResult}]") + LOGGER.Error($" Exception Type: [{ex.GetType().Name}]") + LOGGER.Error($" Message: [{ex.Message}]") + LOGGER.Error($" StackTrace: [{ex.StackTrace}]") Return input End Try End Function @@ -354,12 +360,28 @@ Public Class clsPatterns Case GetType(LookupControl3) Dim oLookupControl3 As LookupControl3 = oControl - If oLookupControl3.Properties.SelectedValues.Count > 1 Then - LOGGER.Debug($"LookupControl3 mit mehr als 1 Value") + + ' ========== FIX START: NULL-Check ========== + Dim selectedValues As List(Of String) = Nothing + Try + selectedValues = oLookupControl3.Properties.SelectedValues + Catch ex As Exception + LOGGER.Warn($"⚠️ LookupControl [{oControlName}] SelectedValues not accessible: {ex.Message}") + selectedValues = Nothing + End Try + + If selectedValues Is Nothing Then + LOGGER.Warn($"⚠️ LookupControl [{oControlName}] SelectedValues is Nothing! Using ERROR_REPLACE_VALUE") + oReplaceValue = ERROR_REPLACE_VALUE + ElseIf selectedValues.Count = 0 Then + LOGGER.Warn($"⚠️ LookupControl [{oControlName}] SelectedValues is empty! Using ERROR_REPLACE_VALUE") + oReplaceValue = ERROR_REPLACE_VALUE + ' ========== FIX END ========== + ElseIf selectedValues.Count > 1 Then + LOGGER.Debug($"LookupControl3 [{oControlName}] mit mehr als 1 Value") Dim oIndex As Integer = 0 - For Each oString As String In oLookupControl3.Properties.SelectedValues + For Each oString As String In selectedValues If oIndex = 0 Then - oReplaceValue = oString Else oReplaceValue += "', '" + oString @@ -367,13 +389,12 @@ Public Class clsPatterns oIndex += 1 Next oIsSQL = False - ElseIf oLookupControl3.Properties.SelectedValues.Count = 1 Then - LOGGER.Debug($"LookupControl3 mit genau einem Value") - oReplaceValue = oLookupControl3.Properties.SelectedValues(0) - Else - ' LOGGER.Warn($"SelectedValues of LookUpControl scheint empty oder leer zu sein! Ersetzen mit ErrorReplaceValue!") - oReplaceValue = ERROR_REPLACE_VALUE + Else ' Count = 1 + 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}") Case GetType(Windows.Forms.ComboBox) @@ -381,7 +402,7 @@ Public Class clsPatterns Case GetType(CheckBox) Dim oCheckBox As CheckBox = oControl - oReplaceValue = oCheckBox.Checked + oReplaceValue = If(oCheckBox.Checked, "1", "0") ' Explizite String-Konvertierung Case GetType(GridControl) Dim oGrid As GridControl = oControl @@ -406,10 +427,18 @@ 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}]") + If oReplaceValue Is Nothing Then + LOGGER.Warn($"⚠️ oReplaceValue is Nothing for control [{oControlName}]! Setting to ERROR_REPLACE_VALUE") + oReplaceValue = ERROR_REPLACE_VALUE + End If + + If Not TypeOf oReplaceValue Is String Then + LOGGER.Warn($"⚠️ oReplaceValue is not a String for control [{oControlName}]! Type: [{oReplaceValue.GetType().Name}]. Converting to String.") + oReplaceValue = oReplaceValue.ToString() + End If If oIsSQL = True Then - 'LOGGER.Debug($"IS_SQL = True - oReplaceValue = {oReplaceValue}") - 'LOGGER.Debug($"oReplaceValue = {oReplaceValue}") - oReplaceValue = oReplaceValue.Replace("'", "''") + oReplaceValue = SafeSqlEscape(oReplaceValue) End If oResult = ReplacePattern(oResult, PATTERN_CTRL, oReplaceValue) Else @@ -425,16 +454,46 @@ Public Class clsPatterns Return oResult 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 + End If + + Dim strValue As String + Try + strValue = value.ToString() + Catch ex As Exception + LOGGER.Error(ex) + LOGGER.Warn($"[SafeSqlEscape] ToString() failed: {ex.Message} → returning ERROR_REPLACE_VALUE") + Return ERROR_REPLACE_VALUE + End Try + + If String.IsNullOrEmpty(strValue) Then + LOGGER.Warn("[SafeSqlEscape] String is empty → returning ERROR_REPLACE_VALUE") + Return ERROR_REPLACE_VALUE + 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 Try Dim oResult = pInput Dim oTryCounter As Integer = 0 While ContainsPattern(oResult, PATTERN_WMI) - + Dim oWMValue As String Dim oIndexName As String = GetNextPattern(oResult, PATTERN_WMI).Value - Dim oWMValue As String = pDocument.GetVariableValue(oIndexName) + If oIndexName = "@@DISPLAY_ONLY" Then + oWMValue = String.Empty + Else + oWMValue = pDocument.GetVariableValue(oIndexName) + End If + If IsNothing(oWMValue) And oTryCounter = MAX_TRY_COUNT Then Throw New Exception("Max tries in ReplaceWindreamIndicies exceeded.") diff --git a/app/TaskFlow/frmMain.resx b/app/TaskFlow/frmMain.resx index 89056e1..efbcd4d 100644 --- a/app/TaskFlow/frmMain.resx +++ b/app/TaskFlow/frmMain.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw - CAAAAk1TRnQBSQFMAgEBAgEAAfABCwHwAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAgEAAfgBCwH4AQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -1506,13 +1506,13 @@ Aktionen - 1178, 158 + 1178, 126 - 0, 666 + 0, 670 - 1178, 22 + 1178, 18 RibbonStatusBar1 @@ -1539,7 +1539,7 @@ 4 - 945, 484 + 945, 549 10 @@ -1782,7 +1782,7 @@ 233 - 233, 508 + 233, 573 5 @@ -1809,10 +1809,10 @@ Tahoma, 9pt - 0, 158 + 0, 101 - 1178, 508 + 1178, 573 4 @@ -2111,7 +2111,7 @@ 9, 19 - 1178, 688 + 1473, 860 Tahoma, 12pt diff --git a/app/TaskFlow/frmValidator.vb b/app/TaskFlow/frmValidator.vb index 16062a7..2886905 100644 --- a/app/TaskFlow/frmValidator.vb +++ b/app/TaskFlow/frmValidator.vb @@ -36,6 +36,7 @@ Imports DigitalData.Modules.ZooFlow.Constants 'Imports System.Windows.Forms.VisualStyles.VisualStyleElement 'Imports System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox Imports WINDREAMLib +Imports System.Linq Public Class frmValidator Public Event CustomColumnDisplayText As CustomColumnDisplayTextEventHandler @@ -248,14 +249,49 @@ Public Class frmValidator Return oOperationMode End Function - Private Function IsPositionVisible(position As Point) As Boolean - For Each scr As Screen In Screen.AllScreens - If scr.WorkingArea.Contains(position) Then - Return True ' Punkt ist sichtbar + Private Sub EnsureFormIsVisible() + Try + ' Aktuellen Bildschirm basierend auf der Formularposition ermitteln + Dim currentScreen As Screen = Screen.FromPoint(Me.Location) + Dim workingArea As Rectangle = currentScreen.WorkingArea + + ' Prüfen ob das Formular vollständig außerhalb des sichtbaren Bereichs liegt + Dim formBounds As New Rectangle(Me.Location, Me.Size) + + ' Wenn das Formular nicht mit dem Arbeitsbereich überschneidet + If Not workingArea.IntersectsWith(formBounds) Then + CenterFormOnScreen() + Exit Sub End If - Next - Return False ' Punkt ist außerhalb aller sichtbaren Bereiche - End Function + + ' Optional: Prüfen ob das Formular zu weit außerhalb liegt (z.B. nur 20% sichtbar) + Dim visibleArea As Rectangle = Rectangle.Intersect(workingArea, formBounds) + Dim visiblePercentage As Double = (visibleArea.Width * visibleArea.Height) / (formBounds.Width * formBounds.Height) + + If visiblePercentage < 0.2 Then ' Weniger als 20% sichtbar + CenterFormOnScreen() + End If + + Catch ex As Exception + LOGGER.Error(ex) + ' Bei Fehler sicherheitshalber zentrieren + CenterFormOnScreen() + End Try + End Sub + + Private Sub CenterFormOnScreen() + Try + ' Formular auf dem primären Bildschirm zentrieren + Dim currentScreen As Screen = Screen.PrimaryScreen + Dim x As Integer = currentScreen.WorkingArea.Left + (currentScreen.WorkingArea.Width - Me.Width) \ 2 + Dim y As Integer = currentScreen.WorkingArea.Top + (currentScreen.WorkingArea.Height - Me.Height) \ 2 + Me.Location = New Point(x, y) + + MyValidationLogger.Info("Formular wurde zentriert, da es außerhalb des sichtbaren Bereichs lag") + Catch ex As Exception + MyValidationLogger.Error(ex) + End Try + End Sub Private Sub frmValidation_Load(sender As Object, e As System.EventArgs) Handles Me.Load ' === MESSPUNKT 1: Start === Dim perfStart As DateTime = If(LOG_HOTSPOTS, DateTime.Now, Nothing) @@ -300,21 +336,11 @@ Public Class frmValidator Try ' === MESSPUNKT 3: Form-Position wiederherstellen === If My.Settings.frmValidatorPosition.IsEmpty = False Then - If IsPositionVisible(My.Settings.frmValidatorPosition) Then - Try - ScreenEx.RestoreFormPosition(Me, My.Settings.frmValidatorPosition) - Catch ex As Exception - Me.StartPosition = FormStartPosition.CenterScreen - End Try + If My.Settings.frmValidatorPosition.X > 0 And My.Settings.frmValidatorPosition.Y > 0 Then + Me.Location = My.Settings.frmValidatorPosition - If My.Settings.frmValidatorPosition.X > 0 And My.Settings.frmValidatorPosition.Y > 0 Then - Location = My.Settings.frmValidatorPosition - Else - Try - MyValidationLogger.Debug($"!! Invalid PositionData X({My.Settings.frmValidatorPosition.X}), Y({My.Settings.frmValidatorPosition.Y})") - Catch ex As Exception - End Try - End If + ' Prüfen und ggf. zentrieren + EnsureFormIsVisible() Else Me.StartPosition = FormStartPosition.CenterScreen End If @@ -378,7 +404,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error LOADING profile-data(" & _step.ToString & "):" & vbNewLine & 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 @@ -514,7 +540,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error loading final profile text:" & vbNewLine & 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 @@ -649,7 +675,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error LOADING Profile-Data1:" & vbNewLine & 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 @@ -793,7 +819,7 @@ Public Class frmValidator DatabaseFallback.ExecuteNonQueryECM(oSQL) Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Error in delete jumped files:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("Error in delete jumped files:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) End Try ' ========== ENDE FIX 8 ========== @@ -1755,8 +1781,8 @@ Public Class frmValidator Dim oButton As Windows.Forms.Button = sender Dim oControlID = DirectCast(oButton.Tag, ClassControlCreator.ControlMetadata).Guid Dim oSQL = ControlCreator.GET_CONTROL_PROPERTY(DT_CONTROLS, oControlID, "SQL_UEBERPRUEFUNG") - If IsNothing(oSQL) Then - MyValidationLogger.Warn("⚠️ onCustomButtonClick - SQL_UEBERPRUEFUNG IS NOTHING") + If IsNothing(oSQL) OrElse String.IsNullOrWhiteSpace(oSQL.ToString()) Then + MyValidationLogger.Warn(String.Format("⚠️ onCustomButtonClick - SQL_UEBERPRUEFUNG for ControlID {0} is empty!", oControlID)) Exit Sub End If @@ -1769,6 +1795,10 @@ Public Class frmValidator Override_SQLCommand = "" End If oSQL = clsPatterns.ReplaceAllValues(oSQL, PanelValidatorControl, True) + If IsNothing(oSQL) OrElse String.IsNullOrWhiteSpace(oSQL.ToString()) Then + MyValidationLogger.Warn(String.Format("⚠️ onCustomButtonClick - SQL_UEBERPRUEFUNG for ControlID {0} is empty!", oControlID)) + Exit Sub + End If Override_SQLCommand = clsPatterns.ReplaceAllValues(Override_SQLCommand, PanelValidatorControl, True) Dim oDT_ACTIONS As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "onCustomButtonClick") If IsNothing(oDT_ACTIONS) Then @@ -1960,6 +1990,28 @@ Public Class frmValidator ' *** GLOBALER GUARD: Bei Refresh KOMPLETT blockieren *** If _FormLoaded = False Or _suppressLookupEvents Then 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. + If _FormLoaded Then + Dim oRepositoryItemTracking As RepositoryItemLookupControl3 = TryCast(sender, RepositoryItemLookupControl3) + If oRepositoryItemTracking IsNot Nothing Then + Dim oLookupTracking As LookupControl3 = Nothing + If _CachedLookupControlsByRepository IsNot Nothing Then + _CachedLookupControlsByRepository.TryGetValue(oRepositoryItemTracking, oLookupTracking) + End If + If oLookupTracking Is Nothing Then + oLookupTracking = TryCast(oRepositoryItemTracking.OwnerEdit, LookupControl3) + End If + If oLookupTracking IsNot Nothing Then + If Not listChangedLookup.Contains(oLookupTracking.Name) Then + listChangedLookup.Add(oLookupTracking.Name) + MyValidationLogger.Debug($"onLookUpselectedValue suppressed BUT tracked for Check_UpdateIndexe: [{oLookupTracking.Name}]") + End If + End If + End If + End If + Exit Sub End If @@ -2002,6 +2054,7 @@ Public Class frmValidator End Try End Sub + Private _lookupUpdateDepth As Integer = 0 Private Const MAX_LOOKUP_DEPTH As Integer = 5 @@ -2291,15 +2344,15 @@ Public Class frmValidator SetControlValues_FromControl(oLookup) End Sub + Private _listForceReindex As New List(Of String) + Private Sub SetControlValues_FromControl(pControl As Control) - ' *** KRITISCH: Während FillIndexValues BLOCKIEREN! *** If _suppressLookupEvents Then - MyValidationLogger.Debug("SetControlValues_FromControl -> BLOCKED by _suppressLookupEvents (FillIndexValues läuft)") + MyValidationLogger.Debug("[SetControlValues_FromControl] BLOCKED by _suppressLookupEvents (FillIndexValues läuft)") Exit Sub End If - ' Prevent re-entry If _SetControlValue_In_Action Then - MyValidationLogger.Debug("SetControlValues_FromControl -> SetControlValue in action. Exiting.") + MyValidationLogger.Debug("[SetControlValues_FromControl] SetControlValue in action. Exiting.") Exit Sub End If @@ -2307,38 +2360,43 @@ Public Class frmValidator Dim oControlMeta = DirectCast(pControl.Tag, ClassControlCreator.ControlMetadata) Dim oControlID = oControlMeta.Guid + MyValidationLogger.Debug($"[SetControlValues_FromControl] START für Control: [{oControlName}], GUID: [{oControlID}]") + If _SetControlValue_In_Action Then - MyValidationLogger.Debug("SetControlValue in action. Exiting.") + MyValidationLogger.Debug("[SetControlValues_FromControl] SetControlValue in action. Exiting.") Exit Sub End If - ' ========== OPTIMIERUNG: Dictionary-Lookup statt Select() ========== Dim oRow As DataRow = Nothing If _CachedControlsBySetControlData Is Nothing OrElse Not _CachedControlsBySetControlData.TryGetValue(oControlID, oRow) Then - MyValidationLogger.Debug("SET_CONTROL_DATA is empty for control [{0}]. Exiting.", oControlName) + MyValidationLogger.Debug($"[SetControlValues_FromControl] SET_CONTROL_DATA is empty for control [{oControlName}]. Exiting.") Exit Sub End If - ' ========== ENDE OPTIMIERUNG ========== Dim oControlname2Set = oRow.Item("NAME") - MyValidationLogger.Debug($"Working on SetControlValue for {oControlname2Set} ...") + MyValidationLogger.Debug($"[SetControlValues_FromControl] Working on SetControlValue for {oControlname2Set} ...") Dim oConnectionId = oRow.ItemEx("CONNECTION_ID", 0) Dim oControlDataSql = oRow.ItemEx("SET_CONTROL_DATA", String.Empty) If oConnectionId = -1 Or oControlDataSql = String.Empty Then - MyValidationLogger.Debug("Error: Check CONN ID and SQL on NULL VALUES!") + MyValidationLogger.Debug("[SetControlValues_FromControl] Error: Check CONN ID and SQL on NULL VALUES!") Exit Sub End If + MyValidationLogger.Debug($"[SetControlValues_FromControl] Original SQL: [{oControlDataSql}]") oControlDataSql = clsPatterns.ReplaceAllValues(oControlDataSql, PanelValidatorControl, True) + MyValidationLogger.Debug($"[SetControlValues_FromControl] Nach ReplaceAllValues: [{oControlDataSql}]") 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 oButtonFinishSet As Boolean = False For Each oResultRow As DataRow In oControlDataResult.Rows @@ -2351,7 +2409,10 @@ Public Class frmValidator Dim oControlFontColor = Color.FromName(oResultRow.ItemEx("FontColor", "Black")) Dim oControlTextOption = oResultRow.ItemEx("TextOption", "Replace") + MyValidationLogger.Debug($"[SetControlValues_FromControl] Row: Control2Set=[{oControl2Set}], Caption=[{oControlCaption}], TextOption=[{oControlTextOption}]") + If oControl2Set.ToString.ToUpper = "BTN_FINISH".ToUpper Then + MyValidationLogger.Debug($"[SetControlValues_FromControl] Setting BTN_FINISH: [{oControlCaption}]") btnSave.Text = oControlCaption & " (F2)" btnSave.Appearance.BackColor = oControlBackColor btnSave.Appearance.ForeColor = oControlFontColor @@ -2360,7 +2421,6 @@ Public Class frmValidator Continue For End If - ' ========== OPTIMIERUNG: FirstOrDefault statt Loop ========== Dim oControlObject2Set = PanelValidatorControl.Controls.Cast(Of Control). Where(Function(c) Dim meta = DirectCast(c.Tag, ClassControlCreator.ControlMetadata) @@ -2368,37 +2428,45 @@ Public Class frmValidator End Function).FirstOrDefault() If oControlObject2Set Is Nothing Then - MyValidationLogger.Debug($"Could not find the Control2Set with ID {oControl2Set} on panel!!!") + MyValidationLogger.Debug($"[SetControlValues_FromControl] Could not find the Control2Set with ID {oControl2Set} on panel!!!") Continue For End If - ' ========== ENDE OPTIMIERUNG ========== Dim oControl As Control = oControlObject2Set - ' *** WICHTIG: Verwende LOKALE Variable statt erneuter Deklaration *** Dim oMeta As ClassControlCreator.ControlMetadata = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata) - MyValidationLogger.Debug(String.Format("Got the Control2Set: {0}..Setting the values..", {oControl.Name})) + MyValidationLogger.Debug($"[SetControlValues_FromControl] Got the Control2Set: {oControl.Name} (Type: {oControl.GetType().Name})..Setting the values..") Select Case True Case oControl.GetType() = GetType(DevExpress.XtraEditors.TextEdit) Or oControl.GetType() = GetType(MemoEdit) Try + Dim oldValue = oControl.Text If oControlTextOption = "Replace" Then oControl.Text = oControlCaption Else oControl.Text &= oControlCaption End If - + MyValidationLogger.Debug($"[SetControlValues_FromControl] TextEdit [{oControl.Name}]: '{oldValue}' → '{oControl.Text}'") oControl.BackColor = oControlBackColor oControl.ForeColor = oControlFontColor 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, DirectCast(oControl, BaseEdit).EditValue) Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error while Control2Set (TextEdit): {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error while Control2Set (TextEdit): {ex.Message}") End Try Case oControl.GetType() = GetType(LookupControl3) Try Dim oDependingLookup As LookupControl3 = oControl + Dim oldValues = If(oDependingLookup.Properties.SelectedValues IsNot Nothing, + String.Join(",", oDependingLookup.Properties.SelectedValues), + "") + If oDependingLookup.Properties.SelectedValues Is Nothing Then oDependingLookup.Properties.SelectedValues = New List(Of String)() End If @@ -2412,20 +2480,34 @@ Public Class frmValidator Else oDependingLookup.Properties.SelectedValues = New List(Of String) From {oControlCaption} 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) Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error while Control2Set (LookupControl3): {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error while Control2Set (LookupControl3): {ex.Message}") End Try Case oControl.GetType() = GetType(Windows.Forms.ComboBox) Try Dim oDependingCombobox As Windows.Forms.ComboBox = oControl Dim oIndex As Integer = oDependingCombobox.FindStringExact(oControlCaption) + Dim oldValue = oDependingCombobox.Text If oIndex <> -1 Then If oDependingCombobox.SelectedIndex <> oIndex Then oDependingCombobox.SelectedIndex = oIndex + MyValidationLogger.Debug($"[SetControlValues_FromControl] Combobox [{oControl.Name}]: '{oldValue}' → '{oControlCaption}' (Index: {oIndex})") + Else + MyValidationLogger.Debug($"[SetControlValues_FromControl] Combobox [{oControl.Name}]: Wert bereits gesetzt ('{oControlCaption}')") End If Try oDependingCombobox.BackColor = oControlBackColor @@ -2435,33 +2517,51 @@ Public Class frmValidator oDependingCombobox.ForeColor = oControlFontColor Catch ex As Exception End Try - 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, oDependingCombobox.Text) + Else + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Combobox [{oControl.Name}]: Wert '{oControlCaption}' nicht in Liste gefunden!") End If Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error while Control2Set (Combobox): {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error while Control2Set (Combobox): {ex.Message}") End Try Case oControl.GetType() = GetType(DevExpress.XtraEditors.DateEdit) Try Dim oDateEdit As DevExpress.XtraEditors.DateEdit = DirectCast(oControl, DevExpress.XtraEditors.DateEdit) Dim parsed As DateTime + Dim oldValue = oDateEdit.EditValue + If String.IsNullOrWhiteSpace(oControlCaption) Then oDateEdit.EditValue = Nothing + MyValidationLogger.Debug($"[SetControlValues_FromControl] DateEdit [{oControl.Name}]: '{oldValue}' → ") ElseIf DateTime.TryParse(oControlCaption, parsed) Then oDateEdit.EditValue = parsed + MyValidationLogger.Debug($"[SetControlValues_FromControl] DateEdit [{oControl.Name}]: '{oldValue}' → '{parsed:dd.MM.yyyy}'") ElseIf DateTime.TryParse(oControlCaption, CultureInfo.CurrentCulture, DateTimeStyles.None, parsed) Then oDateEdit.EditValue = parsed + MyValidationLogger.Debug($"[SetControlValues_FromControl] DateEdit [{oControl.Name}]: '{oldValue}' → '{parsed:dd.MM.yyyy}' (CurrentCulture)") ElseIf DateTime.TryParse(oControlCaption, CultureInfo.InvariantCulture, DateTimeStyles.None, parsed) Then oDateEdit.EditValue = parsed + MyValidationLogger.Debug($"[SetControlValues_FromControl] DateEdit [{oControl.Name}]: '{oldValue}' → '{parsed:dd.MM.yyyy}' (InvariantCulture)") Else oDateEdit.EditValue = Nothing + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] DateEdit [{oControl.Name}]: Konnte '{oControlCaption}' nicht als Datum parsen → ") End If 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, oDateEdit.EditValue) Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error While Control2Set (DateEdit): {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error While Control2Set (DateEdit): {ex.Message}") End Try Case oControl.GetType() = GetType(System.Windows.Forms.DateTimePicker) @@ -2469,25 +2569,36 @@ Public Class frmValidator Dim dtp As System.Windows.Forms.DateTimePicker = DirectCast(oControl, System.Windows.Forms.DateTimePicker) Dim parsed As DateTime Dim hasValue = Not String.IsNullOrWhiteSpace(oControlCaption) + Dim oldValue = dtp.Value If hasValue AndAlso (DateTime.TryParse(oControlCaption, parsed) _ - OrElse DateTime.TryParse(oControlCaption, CultureInfo.CurrentCulture, DateTimeStyles.None, parsed) _ - OrElse DateTime.TryParse(oControlCaption, CultureInfo.InvariantCulture, DateTimeStyles.None, parsed)) Then + OrElse DateTime.TryParse(oControlCaption, CultureInfo.CurrentCulture, DateTimeStyles.None, parsed) _ + OrElse DateTime.TryParse(oControlCaption, CultureInfo.InvariantCulture, DateTimeStyles.None, parsed)) Then dtp.Value = parsed + MyValidationLogger.Debug($"[SetControlValues_FromControl] DateTimePicker [{oControl.Name}]: '{oldValue:dd.MM.yyyy}' → '{parsed:dd.MM.yyyy}'") 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, dtp.Value) Else dtp.Value = DateTimePicker.MinimumDateTime + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] DateTimePicker [{oControl.Name}]: Konnte '{oControlCaption}' nicht parsen → MinimumDateTime") End If Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error While Control2Set (DateTimePicker): {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error While Control2Set (DateTimePicker): {ex.Message}") End Try Case oControl.GetType() = GetType(Windows.Forms.CheckBox) Try Dim oBitValue As Boolean = CBool(oControlCaption) Dim oDependingCheckbox As Windows.Forms.CheckBox = oControl + Dim oldValue = oDependingCheckbox.Checked + oDependingCheckbox.Checked = oBitValue + MyValidationLogger.Debug($"[SetControlValues_FromControl] CheckBox [{oControl.Name}]: '{oldValue}' → '{oBitValue}'") Try oDependingCheckbox.BackColor = oControlBackColor Catch ex As Exception @@ -2497,26 +2608,33 @@ Public Class frmValidator Catch ex As Exception End Try 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, oDependingCheckbox.Checked) Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error while Control2Set (Checkbox) {ex.Message}") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error while Control2Set (Checkbox) {ex.Message}") End Try Case Else - MyValidationLogger.Warn("⚠️ SetControlData used on unsupported control") + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] SetControlData used on unsupported control type: {oControl.GetType().Name}") End Select Catch ex As Exception MyValidationLogger.Error(ex) - MyValidationLogger.Warn($"⚠️ SetControlValues_FromControl - Error in SetControlValues_FromControl for control [{pControl?.Name}]: {ex.Message}") - ' WICHTIG: Overlay schließen bei Fehler + MyValidationLogger.Warn($"⚠️ [SetControlValues_FromControl] Error in SetControlValues_FromControl for control [{pControl?.Name}]: {ex.Message}") CloseOverlaySafe() - Finally _SetControlValue_In_Action = False End Try Next + + MyValidationLogger.Debug($"[SetControlValues_FromControl] END für Control: [{oControlName}], ButtonFinishSet={oButtonFinishSet}") End Sub + + Private Sub LookupControl_DependingControls(LookupControl As LookupControl3, SelectedValues As List(Of String)) If SelectedValues Is Nothing OrElse SelectedValues.Count = 0 Then MyValidationLogger.Debug("LookupControl_DependingControls: No values selected") @@ -2661,6 +2779,7 @@ Public Class frmValidator Finally _suppressLookupEvents = wasSuppressed _DependingControl_In_Action = False + LOGGER.Debug($"[LookupControl_DependingControls] _suppressLookupEvents zurückgesetzt auf [{wasSuppressed}]") End Try Next End Sub @@ -2944,28 +3063,11 @@ Public Class frmValidator Private Sub Controls2beEnabled(pControlName As String) Try If _FormLoaded = False Then + MyValidationLogger.Debug("[EXIT 1] Controls2beEnabled: Form noch nicht geladen") Exit Sub End If - ' Controls mit SQL_ENABLE-Definition ermitteln: - ' 1. Controls, deren SQL_ENABLE den auslösenden Control-Namen referenziert (#CTRL#Name) - ' 2. Controls, deren SQL_ENABLE keinen #CTRL#-Platzhalter hat (statische SQL, z.B. für Buttons) - Dim enablingRows = DT_CONTROLS.AsEnumerable(). - Where(Function(r) - Dim sql = r.ItemEx("SQL_ENABLE", String.Empty).ToString() - If String.IsNullOrEmpty(sql) Then Return False - Return sql.Contains($"#CTRL#{pControlName}") OrElse Not sql.Contains("#CTRL#") - End Function). - ToList() - - If enablingRows.Count = 0 Then - MyValidationLogger.Debug($"Sorry NO controls with enabling definition!!") - Return - End If - - MyValidationLogger.Debug($"We got {enablingRows.Count} controls which got enable definitions!!") - - ' ========== OPTIMIERUNG: Dictionary-Lookup statt Panel-Loop ========== + ' ========== OPTIMIERUNG: Dictionary-Lookup ========== If _CachedControlsByGuid Is Nothing Then _CachedControlsByGuid = New Dictionary(Of Integer, Control)() For Each ctrl As Control In PanelValidatorControl.Controls @@ -2977,96 +3079,236 @@ Public Class frmValidator End Try Next End If - ' ========== ENDE OPTIMIERUNG ========== - - For Each oRowEnablingControl As DataRow In enablingRows - - If _DependingControl_In_Action Then - MyValidationLogger.Debug($"_dependingControl_in_action = True ==> Skip row!") - Continue For ' NEU: Continue statt Exit Sub – restliche Rows weiterverarbeiten - End If - Dim oENABLE_GUID As Integer = CInt(oRowEnablingControl.Item("GUID")) - Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") - MyValidationLogger.Debug($"Control {oENABLE_CtrlName} is depending on Control: {pControlName}..") + Dim enablingRows = DT_CONTROLS.AsEnumerable(). + Where(Function(r) + Dim sql = r.ItemEx("SQL_ENABLE", String.Empty).ToString() + If String.IsNullOrEmpty(sql) Then Return False + Return sql.Contains($"#CTRL#{pControlName}") OrElse Not sql.Contains("#CTRL#") + End Function). + ToList() - Dim oConnectionId As Integer = oRowEnablingControl.ItemEx("CONNECTION_ID", 0) - Dim oSqlCommand As String = oRowEnablingControl.ItemEx("SQL_ENABLE", String.Empty) + If enablingRows.Count = 0 Then + MyValidationLogger.Debug($"[EXIT 2] Controls2beEnabled: Keine Controls mit SQL_ENABLE für [{pControlName}]") + Return + End If - If oConnectionId = 0 OrElse String.IsNullOrEmpty(oSqlCommand) Then - MyValidationLogger.Debug($"Error: Check CoNN ID and SQL on NULL VALUES!") - Continue For - End If + MyValidationLogger.Debug($"Controls2beEnabled für [{pControlName}]: {enablingRows.Count} Controls zu prüfen") - oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) - MyValidationLogger.Debug($"_DependingControl_In_Action: oENABLE_CtrlName {oENABLE_CtrlName} ...") - _DependingControl_In_Action = True + ' ========== NEU: Fehlersammlung ========== + Dim failedControls As New List(Of String) + For Each oRowEnablingControl As DataRow In enablingRows Try - Dim oENABLERESULT As Boolean = False - Dim oResult = GetCachedScalar(oSqlCommand, oConnectionId) - If oResult IsNot Nothing AndAlso Not IsDBNull(oResult) Then - oENABLERESULT = CBool(oResult) + ' ========== FIX: FormClosing-Guard ========== + If _FormClosing OrElse Me.IsDisposed Then + MyValidationLogger.Debug("[EXIT 3] Controls2beEnabled aborted (FormClosing)") + Exit For End If - ' ========== OPTIMIERUNG: Dictionary-Lookup statt Panel-Loop ========== - Dim oControl As Control = Nothing - If _CachedControlsByGuid.TryGetValue(oENABLE_GUID, oControl) Then - MyValidationLogger.Debug($"Got the depending control ID:{oENABLE_GUID}..Setting enabled/Disabled...") - oControl.Enabled = oENABLERESULT - Else - MyValidationLogger.Debug($"Could not find the enabling Control with ID {oENABLE_GUID} on panel!!!") + ' ========== FIX: _DependingControl_In_Action mit Logging ========== + If _DependingControl_In_Action Then + MyValidationLogger.Debug($"[SKIP] Control übersprungen (_DependingControl_In_Action aktiv)") + Continue For End If - ' ========== ENDE OPTIMIERUNG ========== - Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Error while setting enabling control-value for [{oENABLE_CtrlName}]: " & ex.Message) - Finally - _DependingControl_In_Action = False + Dim oENABLE_GUID As Integer = CInt(oRowEnablingControl.Item("GUID")) + Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") + Dim oConnectionId As Integer = oRowEnablingControl.ItemEx("CONNECTION_ID", 0) + Dim oSqlCommand As String = oRowEnablingControl.ItemEx("SQL_ENABLE", String.Empty) + + If String.IsNullOrEmpty(oSqlCommand) Then + MyValidationLogger.Debug($"[SKIP] Control [{oENABLE_CtrlName}]: Ungültige CONNECTION_ID oder SQL_ENABLE") + Continue For + End If + + oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) + _DependingControl_In_Action = True + + 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 oENABLERESULT As Boolean = False + If oResult IsNot Nothing AndAlso Not IsDBNull(oResult) Then + oENABLERESULT = CBool(oResult) + 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 + + 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 + + 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 End Try Next + ' ========== NEU: Fehler-Report ========== + If failedControls.Count > 0 Then + MyValidationLogger.Warn($"⚠️ Controls2beEnabled: {failedControls.Count} Controls konnten nicht verarbeitet werden:") + For Each errorMsg In failedControls + MyValidationLogger.Warn($" - {errorMsg}") + Next + End If + + MyValidationLogger.Debug($"[EXIT 4] Controls2beEnabled: Normale Beendigung") + Catch ex As Exception MyValidationLogger.Error(ex) + MyValidationLogger.Error($"[EXCEPTION EXIT] Controls2beEnabled: {ex.Message}") + MyValidationLogger.Error($"[EXCEPTION STACK] {ex.StackTrace}") End Try End Sub - Private Sub Controls2B_EnDisabled() + Private Sub Controls2B_EnDisabled_onLoad() If LOG_PERF Then PerformanceLogger.Info("Controls2B_EnDisabled") Try - Dim oFilteredDatatable As DataTable = DT_CONTROLS.Clone() - Dim oExpression = $"LEN(SQL_ENABLE_ON_LOAD) > 0" - DT_CONTROLS.Select(oExpression).CopyToDataTable(oFilteredDatatable, LoadOption.PreserveChanges) - If oFilteredDatatable.Rows.Count > 0 Then - MyValidationLogger.Debug($"We got {oFilteredDatatable.Rows.Count} controls which need to be checked dis/enable on load!") - End If - For Each oRowEnablingControl As DataRow In oFilteredDatatable.Rows - Dim oENABLE_GUID = oRowEnablingControl.Item("GUID") - Dim oENABLE_CtrlName = oRowEnablingControl.Item("NAME") - For Each oControl As Control In PanelValidatorControl.Controls - If oENABLE_GUID = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid Then - MyValidationLogger.Debug($"Found the Control on panel which needs to be checked [{oENABLE_GUID}]...") - - Dim oConnectionId As Integer = oRowEnablingControl.ItemEx("CONNECTION_ID", 0) - Dim oSqlCommand = oRowEnablingControl.ItemEx("SQL_ENABLE_ON_LOAD", String.Empty) - oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) + If _CachedControlsByGuid Is Nothing Then + _CachedControlsByGuid = New Dictionary(Of Integer, Control)() + For Each ctrl As Control In PanelValidatorControl.Controls + Try + Dim meta = DirectCast(ctrl.Tag, ClassControlCreator.ControlMetadata) + _CachedControlsByGuid(meta.Guid) = ctrl + Catch + Continue For + End Try + Next + End If - Dim oResult = GetCachedScalar(oSqlCommand, oConnectionId) + Dim enablingRows = DT_CONTROLS.AsEnumerable(). + Where(Function(r) Not String.IsNullOrWhiteSpace(r.ItemEx("SQL_ENABLE_ON_LOAD", String.Empty))). + ToList() - Try - MyValidationLogger.Debug($"Result of Enable SQL [{oResult}]...") + 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") + Return + End If - oControl.Enabled = CBool(oResult) - Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Could not convert value [oResult] to Boolean!") - MyValidationLogger.Warn($"⚠️ Error en/disabling control onLoad: [{ex.Message}]") - End Try + MyValidationLogger.Debug($"We got {enablingRows.Count} controls which need to be checked dis/enable on load!") + + Dim failedControls As New List(Of String) + + For Each oRowEnablingControl As DataRow In enablingRows + Try + If _FormClosing OrElse Me.IsDisposed Then + MyValidationLogger.Debug("[EXIT 2] Controls2B_EnDisabled aborted (FormClosing)") + Exit For + End If + 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...") + ' 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") + Continue For End If - Next + Dim oControl As Control = Nothing + If Not _CachedControlsByGuid.TryGetValue(oENABLE_GUID, oControl) Then + MyValidationLogger.Debug($"Control [{oENABLE_CtrlName}] (ID: {oENABLE_GUID}) not found in panel") + Continue For + End If + + MyValidationLogger.Debug($"Found Control [{oENABLE_CtrlName}] (ID: {oENABLE_GUID}) on panel which needs to be checked") + Dim oConnectionId As Integer = oRowEnablingControl.ItemEx("CONNECTION_ID", 0) + Dim oSqlCommand = oRowEnablingControl.ItemEx("SQL_ENABLE_ON_LOAD", String.Empty) + + If String.IsNullOrWhiteSpace(oSqlCommand) Then + MyValidationLogger.Debug("Skipping: Invalid SQL_ENABLE_ON_LOAD") + Continue For + End If + LOGGER.Debug($"[Controls2B_EnDisabled_onLoad] BEFORE ReplaceAllValues for Control [{oENABLE_CtrlName}]") + LOGGER.Debug($" SQL Command: [{oSqlCommand}]") + LOGGER.Debug($" Panel Controls Count: [{PanelValidatorControl?.Controls?.Count - 1}]") + Try + oSqlCommand = clsPatterns.ReplaceAllValues(oSqlCommand, PanelValidatorControl, True) + LOGGER.Debug($"[Controls2B_EnDisabled_onLoad] AFTER ReplaceAllValues: [{oSqlCommand}]") + Catch replaceEx As Exception + LOGGER.Error(replaceEx) + MyValidationLogger.Error($"❌ [Controls2B_EnDisabled_onLoad] ReplaceAllValues CRASH für [{oENABLE_CtrlName}]: {replaceEx.Message}") + LOGGER.Error($" Original SQL: [{oSqlCommand}]") + Continue For ' ← Überspringe dieses Control und mache weiter + End Try + + ' ========== KRITISCH: Hier könnte es hängen bleiben ========== + 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}]") + ' ========== ENDE KRITISCH ========== + + Try + MyValidationLogger.Debug($"Result of Enable SQL [{oResult}]...") + oControl.Enabled = CBool(oResult) + Catch convEx As Exception + failedControls.Add($"[{oENABLE_CtrlName}]: {convEx.Message}") + MyValidationLogger.Warn($"⚠️ Could not convert value [{oResult}] to Boolean for control [{oENABLE_CtrlName}]") + MyValidationLogger.Warn($"⚠️ Error: {convEx.Message}") + oControl.Enabled = True + End Try + + Catch rowEx As Exception + Dim ctrlName = oRowEnablingControl.Item("NAME") + MyValidationLogger.Error($"[Controls2B_EnDisabled] Fehler bei Control [{ctrlName}]: {rowEx.Message}") + failedControls.Add($"[{ctrlName}]: {rowEx.Message}") + + Continue For + End Try Next + + If failedControls.Count > 0 Then + MyValidationLogger.Warn($"⚠️ Controls2B_EnDisabled: {failedControls.Count} Controls konnten nicht verarbeitet werden:") + For Each errorMsg In failedControls + MyValidationLogger.Warn($" - {errorMsg}") + Next + + MyValidationLogger.Warn($"⚠️ Controls2B_EnDisabled: {failedControls.Count} Controls konnten nicht verarbeitet werden:") + For Each errorMsg In failedControls + MyValidationLogger.Warn($" - {errorMsg}") + Next + + ' ========== NEU: Sprachabhängige Meldung ========== + Dim oTitle As String + Dim oMessage As String + + Select Case USER_LANGUAGE + Case "de-DE" + oTitle = "Warnung" + oMessage = $"Einige Controls konnten nicht aktiviert/deaktiviert werden.{vbCrLf}Details im Log." + Case "fr-FR" + oTitle = "Avertissement" + oMessage = $"Certains contrôles n'ont pas pu être activés/désactivés.{vbCrLf}Détails dans le journal." + Case Else ' en-US, en-GB, etc. + oTitle = "Warning" + oMessage = $"Some controls could not be enabled/disabled.{vbCrLf}Details in the log." + End Select + + MsgBox(oMessage, MsgBoxStyle.Exclamation, oTitle) + End If + + MyValidationLogger.Debug("[EXIT 3] Controls2B_EnDisabled_onLoad: Normale Beendigung") + Catch ex As Exception MyValidationLogger.Error(ex) + MyValidationLogger.Error($"[EXCEPTION EXIT] Controls2B_EnDisabled_onLoad: {ex.Message}") + MyValidationLogger.Error($"[EXCEPTION STACK] {ex.StackTrace}") End Try End Sub Private Sub Depending_Control_Set_Result(displayboxname As String, sqlCommand As String, sqlConnection As String) @@ -3283,6 +3525,7 @@ Public Class frmValidator If oDT.Rows.Count > 0 Then Try oNewGUID = oDT.Rows(0).Item(0) + MyValidationLogger.Info($"Get_Next_GUID: oNewGUID [{oNewGUID}]...") Catch ex As Exception MyValidationLogger.Warn($"⚠️ >> Attention: in GetNextGUID - Could not get the next GUID - SQL [{oSQL}]") MyValidationLogger.Warn($"⚠️ ERRORMESSAGE [{ex.Message}]") @@ -3290,7 +3533,7 @@ Public Class frmValidator Try CURRENT_DOC_ID = oDT.Rows(0).Item(1) - MyValidationLogger.Debug($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...") + MyValidationLogger.Info($"Get_Next_GUID: CURRENT_DOC_ID [{CURRENT_DOC_ID}]...") Catch ex As Exception MyValidationLogger.Warn($"⚠️ >> Attention: in GetNextGUID - Could not get the next DocID - SQL [{oSQL}]") MyValidationLogger.Warn($"⚠️ ERRORMESSAGE [{ex.Message}]") @@ -3308,8 +3551,8 @@ Public Class frmValidator If User.IsAdmin And LOGCONFIG.Debug = True Then My.Computer.Clipboard.SetText(oSQL) MsgBox($">> Attention: in GetNextGUID - Could not get a GUID(1)" & vbCrLf & - $"SQL kopiert: {oSQL.Substring(0, Math.Min(100, oSQL.Length))}...", - MsgBoxStyle.Exclamation) + $"SQL kopiert: {oSQL.Substring(0, Math.Min(100, oSQL.Length))}...", + MsgBoxStyle.Exclamation) End If oNewGUID = 0 Return oNewGUID @@ -3542,6 +3785,7 @@ Public Class frmValidator End If Else Load_IDB_DOC_DATA() + If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF LND] Nach Load_IDB_DOC_DATA: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") perfLastCheck = DateTime.Now @@ -3594,25 +3838,7 @@ Public Class frmValidator perfLastCheck = DateTime.Now End If - Dim oCurrency As String - If PROFIL_CURRENCY_ATTRIBUTE <> "" Then - oCurrency = GetVariableValuefromSource(PROFIL_CURRENCY_ATTRIBUTE, 1, False) - Else - oCurrency = "EUR" - End If - If Not IsNothing(oCurrency) Then - DocCurrency = oCurrency - If IsDBNull(DocCurrency) Then - DocCurrency = "EUR" - Else - Try - DocCurrency = DocCurrency.ToString - Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Unexpected error in Converting oCurreny to string: " & ex.Message) - DocCurrency = "EUR" - End Try - End If - End If + If oErrMsgMissingInput = "" Then If WMDocPathWindows <> String.Empty Or OPERATION_MODE_FS = ClassConstants.OpModeFS_ZF Then @@ -3632,7 +3858,43 @@ Public Class frmValidator perfLastCheck = DateTime.Now End If - FillIndexValues(first) + If String.IsNullOrWhiteSpace(DocCurrency) OrElse DocCurrency = "EUR" Then + Try + Dim oCurrency As String = "EUR" ' Default + + If Not String.IsNullOrWhiteSpace(PROFIL_CURRENCY_ATTRIBUTE) Then + Dim rawValue = GetVariableValuefromSource(PROFIL_CURRENCY_ATTRIBUTE, 1, False) + + If rawValue IsNot Nothing AndAlso Not IsDBNull(rawValue) Then + Dim currencyCandidate = rawValue.ToString().Trim().ToUpper() + + ' Validierung: ISO 4217 (3 Zeichen) + If currencyCandidate.Length = 3 AndAlso Not currencyCandidate.Contains(" ") Then + oCurrency = currencyCandidate + MyValidationLogger.Debug($"✓ Währung aus Attribut [{PROFIL_CURRENCY_ATTRIBUTE}]: {oCurrency}") + Else + MyValidationLogger.Warn($"⚠️ Ungültige Währung [{currencyCandidate}] (Länge: {currencyCandidate.Length}) → Fallback EUR") + End If + Else + MyValidationLogger.Warn($"⚠️ Währungsattribut [{PROFIL_CURRENCY_ATTRIBUTE}] ist Nothing/DBNull → EUR") + End If + Else + MyValidationLogger.Debug("Kein PROFIL_CURRENCY_ATTRIBUTE konfiguriert → EUR") + End If + + DocCurrency = oCurrency + MyValidationLogger.Info($"[FINAL] DocCurrency = [{DocCurrency}]") + + Catch ex As Exception + MyValidationLogger.Error($"Währungsladung fehlgeschlagen: {ex.Message}") + DocCurrency = "EUR" + End Try + End If + + FillIndexValues(first, "") + + + UpdateGridCurrencyFormats() If LOG_HOTSPOTS Then oMilliseconts = (DateTime.Now - perfLastCheck).TotalMilliseconds @@ -3766,13 +4028,18 @@ Public Class frmValidator perfLastCheck = DateTime.Now End If - Controls2B_EnDisabled() + _FormLoaded = True + MyValidationLogger.Debug($"[DIAGNOSE] VOR Controls2B_EnDisabled_onLoad:") + MyValidationLogger.Debug($" _FormLoaded = [{_FormLoaded}]") + MyValidationLogger.Debug($" _FormClosing = [{_FormClosing}]") + MyValidationLogger.Debug($" IsDisposed = [{Me.IsDisposed}]") + + Controls2B_EnDisabled_onLoad() If LOG_HOTSPOTS Then MyValidationLogger.Info($"[PERF LND] Nach Controls2B_EnDisabled: {(DateTime.Now - perfLastCheck).TotalMilliseconds}ms") perfLastCheck = DateTime.Now End If - MyValidationLogger.Debug("frmValidator: LoadNextDocument finished!") Catch ex As Exception @@ -3798,6 +4065,154 @@ Public Class frmValidator End If End Try End Sub + ''' + ''' Aktualisiert die Währungsformatierung aller GridControls basierend auf DocCurrency. + ''' Wird nach FillIndexValues aufgerufen, wenn DocCurrency ≠ "EUR". + ''' + Private Sub UpdateGridCurrencyFormats() + Try + Dim currencySymbol As String = GetCurrencySymbol(DocCurrency) + + ' *** FIX: Währungssymbol IMMER für alle Grids im Shared Cache setzen, + ' auch bei EUR. Sonst bleibt ein veraltetes Symbol (z.B. CHF) vom + ' vorherigen Dokument im Cache stehen, weil der Early-Return den + ' Cache-Reset überspringt. *** + For Each oControl As Control In PanelValidatorControl.Controls + If TypeOf oControl Is GridControl Then + taskFLOW.ControlCreator.GridControl.SetCurrencySymbolForGrid(oControl.Name, currencySymbol) + End If + Next + + ' Nur die aufwändige Format-Aktualisierung (ColumnEdit, DisplayFormat etc.) + ' ist bei EUR nicht nötig, da EUR der Default beim Erstellen der Controls ist. + If String.IsNullOrEmpty(DocCurrency) OrElse DocCurrency = "EUR" Then + MyValidationLogger.Debug("[UpdateGridCurrencyFormats] DocCurrency is EUR or empty, cache updated but skipping format rebuild.") + Return + End If + + MyValidationLogger.Info("[UpdateGridCurrencyFormats] Updating all GridControls to currency [{0}]", DocCurrency) + + ' Alle Controls auf dem Panel durchlaufen + For Each oControl As Control In PanelValidatorControl.Controls + Try + ' Prüfe ob es ein GridControl ist + If TypeOf oControl Is GridControl Then + Dim oGrid As GridControl = DirectCast(oControl, GridControl) + Dim oView As GridView = TryCast(oGrid.MainView, GridView) + + If oView Is Nothing Then + Continue For + End If + + ' Control-Metadaten abrufen + Dim oMeta As ClassControlCreator.ControlMetadata = TryCast(oGrid.Tag, ClassControlCreator.ControlMetadata) + If oMeta Is Nothing Then + MyValidationLogger.Warn("[UpdateGridCurrencyFormats] No metadata found for GridControl [{0}]", oGrid.Name) + Continue For + End If + + Dim oControlId As Integer = oMeta.Guid + + ' Spalten-Definition für dieses GridControl abrufen + Dim oColumnTable As DataTable = Nothing + If Not ControlCreator.GridColumns.ContainsKey(oControlId) Then + MyValidationLogger.Warn("[UpdateGridCurrencyFormats] No column definition found for GridControl [{0}] (ID: {1})", oGrid.Name, oControlId) + Continue For + End If + + oColumnTable = ControlCreator.GridColumns(oControlId) + + ' Prüfe ob überhaupt CURRENCY-Spalten vorhanden sind + Dim hasCurrencyColumns As Boolean = False + For Each row As DataRow In oColumnTable.Rows + If row.Item("TYPE_COLUMN").ToString() = "CURRENCY" Then + hasCurrencyColumns = True + Exit For + End If + Next + + If Not hasCurrencyColumns Then + MyValidationLogger.Debug("[UpdateGridCurrencyFormats] GridControl [{0}] has no CURRENCY columns, skipping.", oGrid.Name) + Continue For + End If + + ' GridControl-Helper erstellen und Währungsformat aktualisieren + Dim oGridControlHelper As New ControlCreator.GridControl(LOGCONFIG, ControlCreator.GridTables, currencySymbol) + oGridControlHelper.UpdateCurrencyFormat(oColumnTable, oView, oGrid, currencySymbol) + + MyValidationLogger.Info("[UpdateGridCurrencyFormats] ✓ Updated GridControl [{0}] to currency [{1}]", oGrid.Name, DocCurrency) + End If + + Catch ex As Exception + MyValidationLogger.Error("[UpdateGridCurrencyFormats] Error updating GridControl [{0}]: {1}", oControl.Name, ex.Message) + MyValidationLogger.Error(ex) + End Try + Next + + MyValidationLogger.Info("[UpdateGridCurrencyFormats] ✓ Currency format update completed for all GridControls") + + Catch ex As Exception + MyValidationLogger.Error("[UpdateGridCurrencyFormats] Fatal error: {0}", ex.Message) + MyValidationLogger.Error(ex) + End Try + End Sub + + ''' + ''' Ermittelt das Währungssymbol basierend auf dem Währungscode (ISO 4217). + ''' + Private Function GetCurrencySymbol(currencyCode As String) As String + If String.IsNullOrEmpty(currencyCode) Then + Return "EUR" + End If + + ' Währungscode normalisieren (Großbuchstaben, trimmen) + currencyCode = currencyCode.Trim().ToUpper() + + Try + ' Versuche CultureInfo zu finden, die diese Währung verwendet + Dim cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures) + + For Each culture As CultureInfo In cultures + Try + Dim region As New RegionInfo(culture.Name) + If region.ISOCurrencySymbol.Equals(currencyCode, StringComparison.OrdinalIgnoreCase) Then + Return region.ISOCurrencySymbol + End If + Catch + ' Culture unterstützt keine RegionInfo, weitermachen + End Try + Next + + Catch ex As Exception + MyValidationLogger.Warn("[GetCurrencySymbol] Could not determine symbol for currency [{0}]: {1}", currencyCode, ex.Message) + End Try + + ' Fallback: Manuelle Zuordnung für häufige Währungen + Select Case currencyCode + Case "EUR" + Return "EUR" + Case "USD" + Return "USD" + Case "GBP" + Return "GBP" + Case "CHF" + Return "CHF" + Case "JPY" + Return "JPY" + Case "CNY" + Return "CNY" + Case "PLN" + Return "PLN" + Case "CZK" + Return "CZK" + Case "HUF" + Return "HUF" + Case Else + ' Fallback: Währungscode selbst verwenden + MyValidationLogger.Info("[GetCurrencySymbol] Using currency code [{0}] as symbol (no symbol found)", currencyCode) + Return currencyCode + End Select + End Function Sub Show_WF_Messages(pShow As Boolean) Try If Not Application.OpenForms().OfType(Of frmValidator_Messages).Any Then @@ -4175,7 +4590,7 @@ Public Class frmValidator Return value Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("error in ReturnVektor_IndexValue: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("error in ReturnVektor_IndexValue: " & vbCrLf & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) MyValidationLogger.Info("error in ReturnVektor_IndexValue: " & ex.Message) Return "" End Try @@ -4188,7 +4603,13 @@ Public Class frmValidator Try Dim oValuefromSource If IDB_ACTIVE = False Then - oValuefromSource = CURRENT_WMFILE.GetVariableValue(oSourceIndexName) + If oSourceIndexName = "@@DISPLAY_ONLY" Then + MyValidationLogger.Debug($"GetVariableValuefromSource - @@DISPLAY_ONLY - Returning Empty") + Return String.Empty + Else + oValuefromSource = CURRENT_WMFILE.GetVariableValue(oSourceIndexName) + End If + Else MyValidationLogger.Debug($"GetVariableValuefromSource - IDBCase...") oValuefromSource = IDBData.GetVariableValue(oSourceIndexName, oIDBTyp, FromIDB) @@ -4310,7 +4731,7 @@ Public Class frmValidator Dim oMeta As ClassControlCreator.ControlMetadata = oTextBox.Tag If oSourceIndexName = "" Then - MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + MsgBox("Attention wrong configuration:" & vbCrLf & "for control " & oControl.Name & " no INDEX configured!" & vbCrLf & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For End If If oSourceIndexName Is Nothing = False Then @@ -4396,7 +4817,7 @@ Public Class frmValidator End If Catch ex As Exception MyValidationLogger.Error(ex) - errormessage = $"Unvorhergesehener Fehler bei FillIndexValues TextBox [{oControl.Name}]:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + errormessage = $"Unvorhergesehener Fehler bei FillIndexValues TextBox [{oControl.Name}]:" & vbCrLf & ex.Message & vbCrLf & "Check Logfile" My.Settings.Save() frmError.ShowDialog() MyValidationLogger.Info("Unexpected error in FillIndexValuesTextBox: " & ex.Message, True) @@ -4412,7 +4833,7 @@ Public Class frmValidator Dim oMyCombobox As Windows.Forms.ComboBox = oControl Try If oSourceIndexName = "" Then - MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) + MsgBox("Attention wrong configuration:" & vbCrLf & "for control " & oControl.Name & " no INDEX configured!" & vbCrLf & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) Exit For End If If oSourceIndexName Is Nothing = False Then @@ -4477,7 +4898,7 @@ Public Class frmValidator MyValidationLogger.Info(">> Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & ex.Message, True) MyValidationLogger.Info(">> Controltype: " & oControlType) MyValidationLogger.Info(">> Indexname windream: " & oIndexName) - errormessage = "Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + errormessage = "Unexpected error in FillIndexValues(Combobox: " & oMyCombobox.Name & "): " & vbCrLf & ex.Message & vbCrLf & "Check Logfile" My.Settings.Save() frmError.ShowDialog() End Try @@ -4502,7 +4923,7 @@ Public Class frmValidator Try If oSourceIndexName = "" Then - MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("Attention wrong configuration:" & vbCrLf & "for control " & oControl.Name & " no INDEX configured!" & vbCrLf & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) Exit For End If If oSourceIndexName Is Nothing = False Then @@ -4773,7 +5194,7 @@ Public Class frmValidator MyValidationLogger.Info(">> Unexpected Error In FillIndexValues(GridControl " & oMyGridControl.Name & ") " & ex.Message, True) MyValidationLogger.Info(">> Controltype " & oControlType) MyValidationLogger.Info(">> Attributname " & oIndexName) - errormessage = "Unexpected Error In FillIndexValues(Combobox " & oMyGridControl.Name & ") " & vbNewLine & ex.Message & vbNewLine & "Check Logfile" + errormessage = "Unexpected Error In FillIndexValues(Combobox " & oMyGridControl.Name & ") " & vbCrLf & ex.Message & vbCrLf & "Check Logfile" My.Settings.Save() frmError.ShowDialog() End Try @@ -4782,7 +5203,7 @@ Public Class frmValidator MyValidationLogger.Debug("Loading checkbox...") oControlType = "CheckBox" If oSourceIndexName = "" Then - MsgBox("Attention wrong configuration" & vbNewLine & "For control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("Attention wrong configuration" & vbCrLf & "For control " & oControl.Name & " no INDEX configured!" & vbCrLf & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) Exit For End If If oSourceIndexName Is Nothing = False Then @@ -4864,7 +5285,7 @@ Public Class frmValidator End Select Catch ex As Exception MyValidationLogger.Error(ex) - MyValidationLogger.Info("Unexpected error in CBool(wertWD) - CheckBox: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString, True) + MyValidationLogger.Info("Unexpected error in CBool(wertWD) - CheckBox: " & ex.Message & vbCrLf & "Wert WD: " & oValueFromSource.ToString, True) myCheckBox.Checked = False myCheckBox.CheckState = CheckState.Unchecked End Try @@ -4961,7 +5382,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MyValidationLogger.Info(" - Unvorhergesehener Unexpected error in FillIndexValues LookupControl3 - Indexname: " & oIndexName & " - Fehler: " & vbNewLine & ex.Message) + MyValidationLogger.Info(" - Unvorhergesehener Unexpected error in FillIndexValues LookupControl3 - Indexname: " & oIndexName & " - Fehler: " & vbCrLf & ex.Message) MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl3:") End Try @@ -4969,7 +5390,7 @@ Public Class frmValidator oControlType = "DateTimePicker" Dim DTP As DateTimePicker = oControl If oSourceIndexName = "" Then - MsgBox("Attention wrong configuration:" & vbNewLine & "for control " & oControl.Name & " no INDEX configured!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("Attention wrong configuration:" & vbCrLf & "for control " & oControl.Name & " no INDEX configured!" & vbCrLf & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) Exit For End If If oSourceIndexName Is Nothing = False Then @@ -4999,8 +5420,8 @@ Public Class frmValidator End If Catch ex As Exception MyValidationLogger.Error(ex) - errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message - MyValidationLogger.Info("Unexpected error in FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & oValueFromSource.ToString & vbNewLine & "Indexname: " & oSourceIndexName, True) + errormessage = "Unvorhergesehener Fehler bei DTP: " & vbCrLf & ex.Message + MyValidationLogger.Info("Unexpected error in FillIndex DTP: " & ex.Message & vbCrLf & "Wert WD: " & oValueFromSource.ToString & vbCrLf & "Indexname: " & oSourceIndexName, True) frmError.ShowDialog() MyValidationLogger.Info("Unexpected error in FillIndex DTP: " & ex.Message, True) End Try @@ -5155,13 +5576,13 @@ Public Class frmValidator End If Else - MsgBox("No Form-Mask defined for this profile!" & vbNewLine & "Please inform Your admin!" & vbNewLine & "The validator will be closed!", MsgBoxStyle.Exclamation, "Attention:") + MsgBox("No Form-Mask defined for this profile!" & vbCrLf & "Please inform Your admin!" & vbCrLf & "The validator will be closed!", MsgBoxStyle.Exclamation, "Attention:") Me.Close() End If Catch ex As Exception MyValidationLogger.Warn($"⚠️ Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}") - errormessage = $"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}" & vbNewLine & "Check Logfile" + errormessage = $"Unexpected error in FillIndexValues: [{oControName} -TYPE: {oControlType}-INDEXNAME: {oIndexName}] ERROR: {ex.Message}" & vbCrLf & "Check Logfile" My.Settings.Save() frmError.ShowDialog() Finally @@ -5238,9 +5659,6 @@ Public Class frmValidator _DependingControl_In_Action = False _DependingColumn_In_Action = False - ' 18.10.2021: Brauchen Sie das Überhaupt?? - 'Controls2beDisabled() - BringToFront() If bbtniRefreshSearches.Visibility = BarItemVisibility.Always Then _frmValidatorSearch?.BringToFront() @@ -5363,6 +5781,7 @@ Public Class frmValidator End If btnSave.Enabled = False Try + MyValidationLogger.Info("btnSave_Click...") If ForceGridValidation() = True Then ShowOverlaySafe() Try @@ -5370,6 +5789,8 @@ Public Class frmValidator Finally CloseOverlaySafe() End Try + Else + MyValidationLogger.Warn("btnSave_Click: ForceGridValidation failed, not calling Finish_WFStep") End If Finally If Not _FormClosing AndAlso Not Me.IsDisposed Then @@ -5517,7 +5938,7 @@ Public Class frmValidator End Select Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("An unhandled exeception occured in btnFinish Procedure! Please inform Your WorkflowTeam and Check Your log!" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("An unhandled exeception occured in btnFinish Procedure! Please inform Your WorkflowTeam and Check Your log!" & vbCrLf & ex.Message, MsgBoxStyle.Critical) Return False End Try End Function @@ -5531,7 +5952,7 @@ Public Class frmValidator MyValidationLogger.Info("[PERF] Finish_WFStep START") End If btnSave.Enabled = False - MyValidationLogger.Debug("Abschluss für DocID " & CURRENT_DOC_ID & " wird gestartet ...") + MyValidationLogger.Info("Abschluss für DocID " & CURRENT_DOC_ID & " wird gestartet ...") Dim oErrorOcurred As Boolean = False If OverrideAll = False Then @@ -5651,7 +6072,7 @@ Public Class frmValidator If WMIndexVectofield(oResult, oFinalIndexRow.Item("INDEXNAME"), oFinalIndexRow.Item("PREVENT_DUPLICATES"), oFinalIndexRow.Item("ALLOW_NEW_VALUES")) = False Then MyValidationLogger.Debug("Final Vektorindex '" & oFinalIndexRow.Item("INDEXNAME").ToString & "' has beens et suxxessfully!") Else - errormessage = "Error in final indexing:" & vbNewLine & idxerr_message + errormessage = "Error in final indexing:" & vbcrlf & idxerr_message My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True @@ -5680,7 +6101,7 @@ Public Class frmValidator End If End If If oFIResult = False Then - errormessage = "Error in final indexing:" & vbNewLine & idxerr_message + errormessage = "Error in final indexing:" & vbcrlf & idxerr_message My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True @@ -5834,7 +6255,7 @@ Public Class frmValidator If DT_ENTRIES.Rows.Count > 0 Then Dim AnnotationString As String = "" For Each rw As DataRow In DT_ENTRIES.Rows - AnnotationString = AnnotationString & rw.Item("WORKED_WHEN") & " " & rw.Item("WORKED_BY") & ": " & rw.Item("STATUS_COMMENT") & vbNewLine + AnnotationString = AnnotationString & rw.Item("WORKED_WHEN") & " " & rw.Item("WORKED_BY") & ": " & rw.Item("STATUS_COMMENT") & vbcrlf Next ClassAnnotation.Annotate_PDF("Workflow History:", AnnotationString, 0, False, 10, 40) End If @@ -5852,7 +6273,7 @@ Public Class frmValidator If Move2Folder <> "" And (OPERATION_MODE_FS = ClassConstants.OpModeFS_PWM Or OPERATION_MODE_FS = ClassConstants.OpModeFS_IDBWM) Then idxerr_message = allgFunk.Move2Folder(WMDocPathWindows, Move2Folder, CURRENT_ProfilGUID, WINDREAM_ALLG) If idxerr_message <> "" Then - errormessage = "Fehler bei Move2Folder:" & vbNewLine & idxerr_message + errormessage = "Fehler bei Move2Folder:" & vbcrlf & idxerr_message My.Settings.Save() frmError.ShowDialog() oErrorOcurred = True @@ -6155,7 +6576,7 @@ Public Class frmValidator Continue For End If - ' ========== SELECT CASE: Control-Type-Handling (wie bisher) ========== + ' ========== SELECT CASE: Control-Type-Handling ========== Select Case True Case oControl.GetType = GetType(LookupControl3) Try @@ -6267,18 +6688,28 @@ Public Class frmValidator End If End If - Dim oValueSourceIsDifferent As Boolean = False - If oValueIsIndifferent = False Then - MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]") - Try - If oValueFromObject <> oMyInput Then + ' ========== FIX: Force-Reindex für Lookup ========== + Dim bForceReindexLookup As Boolean = _listForceReindex.Contains(oControl.Name) + If bForceReindexLookup Then + MyValidationLogger.Debug($"[CHECK_UPDATE] Force-Reindex aktiv für Lookup [{oControl.Name}] → Wertvergleich übersprungen") + _listForceReindex.Remove(oControl.Name) + End If + ' ========== ENDE FIX ========== + + Dim oValueSourceIsDifferent As Boolean = bForceReindexLookup + If Not bForceReindexLookup Then + If oValueIsIndifferent = False Then + MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: oValueFromObject is [{oValueFromObject}]") + Try + If oValueFromObject <> oMyInput Then + oValueSourceIsDifferent = True + MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: There is a difference between oValueFromObject and [{oValueFromObject}]") + End If + Catch ex As Exception oValueSourceIsDifferent = True - MyValidationLogger.Debug($"CheckUpdateIndex.LookUpGrid: There is a difference between oValueFromObject and [{oValueFromObject}]") - End If - Catch ex As Exception - oValueSourceIsDifferent = True - MyValidationLogger.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object") - End Try + MyValidationLogger.Debug($"oValueFromObject <> oMyInput not possible as one object might be a multiple row object") + End Try + End If End If If (oValueIsIndifferent = True Or oValueSourceIsDifferent = True) Then @@ -6337,7 +6768,6 @@ Public Class frmValidator oErrMsgMissingInput &= ":" & vbCrLf & oRegexMessage End If oControl.BackColor = Color.Red - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6398,6 +6828,18 @@ Public Class frmValidator End Try End If + ' ========== FIX: Force-Reindex für TextEdit/MemoEdit ========== + If Not oSetValue Then + If _listForceReindex.Contains(oControl.Name) Then + MyValidationLogger.Debug($"[CHECK_UPDATE] Force-Reindex aktiv für TextEdit [{oControl.Name}] → Wertvergleich übersprungen") + _listForceReindex.Remove(oControl.Name) + oSetValue = True + End If + Else + _listForceReindex.Remove(oControl.Name) + End If + ' ========== ENDE FIX ========== + MyValidationLogger.Debug("Preparing Indexing for Textbox") If oSetValue = True Then @@ -6407,7 +6849,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} as VEKTOR - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6425,7 +6866,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = $"Error while indexing Textbox {oControl} - Attribute {oIndexName} - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6453,20 +6893,16 @@ Public Class frmValidator Dim st As New StackTrace(True) st = New StackTrace(ex, True) MyValidationLogger.Warn("⚠️ Unexpected error in Check_UpdateIndexe TextBox :" & ex.Message, True) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False End If OpenfrmError(oErrMsgMissingInput) - - ' Nach Fehler: Dirty-Flag zurücksetzen oMeta.IsDirty = False Return False End Try Case oControl.GetType = GetType(System.Windows.Forms.ComboBox) - ' ... (Dein bestehender ComboBox-Code bleibt gleich) ... Try MyValidationLogger.Debug($"Working on Combobox...") Dim cmb As Windows.Forms.ComboBox = oControl @@ -6474,7 +6910,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Please Choose an entry out of ComboBox '" & cmb.Name & "'" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6522,6 +6957,19 @@ Public Class frmValidator MyValidationLogger.Error(ex.Message) oitsadifference = True End Try + + ' ========== FIX: Force-Reindex für ComboBox ========== + If Not oitsadifference Then + If _listForceReindex.Contains(oControl.Name) Then + MyValidationLogger.Debug($"[CHECK_UPDATE] Force-Reindex aktiv für ComboBox [{oControl.Name}] → Wertvergleich übersprungen") + _listForceReindex.Remove(oControl.Name) + oitsadifference = True + End If + Else + _listForceReindex.Remove(oControl.Name) + End If + ' ========== ENDE FIX ========== + If oitsadifference = True Then MyValidationLogger.Debug($"Index with ID{oControlId} will now be indexed...") If oIndexName.StartsWith("[%VKT") Then @@ -6530,7 +6978,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing Combobox as VEKTOR - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6548,7 +6995,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing Combobox - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6562,7 +7008,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error indexing combobox idb" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6587,21 +7032,19 @@ Public Class frmValidator MyValidationLogger.Error(ex) Dim st As New StackTrace(True) st = New StackTrace(ex, True) - MsgBox($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId} " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Error:") + MsgBox($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId} " & vbCrLf & ex.Message, MsgBoxStyle.Critical, "Error:") MyValidationLogger.Info($"Unexpected error in Check_UpdateIndexe Combobox : ID{oControlId}" & ex.Message) oMeta.IsDirty = False Return False End Try Case oControl.GetType = GetType(DateTimePicker) - ' ... (Dein bestehender DateTimePicker-Code) ... Try Dim dtp As DateTimePicker = oControl If oIsRequired = True And dtp.Value.ToString = String.Empty Then oMissing = True oErrMsgMissingInput = "Please Choose DateValue for field'" & dtp.Name & "'" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6619,14 +7062,22 @@ Public Class frmValidator If IsNothing(oObjectValue) Or IsDBNull(oObjectValue) Then oObjectValue = CDate("01.01.1900") End If - If oObjectValue <> oMyInput Then + + ' ========== FIX: Force-Reindex für DateTimePicker ========== + Dim bForceDTP As Boolean = _listForceReindex.Contains(oControl.Name) + If bForceDTP Then + MyValidationLogger.Debug($"[CHECK_UPDATE] Force-Reindex aktiv für DateTimePicker [{oControl.Name}] → Wertvergleich übersprungen") + _listForceReindex.Remove(oControl.Name) + End If + ' ========== ENDE FIX ========== + + If bForceDTP OrElse oObjectValue <> oMyInput Then If oIndexName.StartsWith("[%VKT") Then oMyInput = Return_PM_VEKTOR(oMyInput, oIndexName) If WMIndexVectofield(oMyInput, PROFIL_VEKTORINDEX) = True Then oMissing = True oErrMsgMissingInput = "Error while indexing DatePicker as VEKTOR - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6643,7 +7094,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing DatePicker- ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6656,12 +7106,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error indexing datepicker idb" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen - If _FormClosing Then - MyValidationLogger.Warn("Form closing - skip error dialog") - Return False - End If - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6689,7 +7133,6 @@ Public Class frmValidator End Try Case oControl.GetType = GetType(CheckBox) - ' ... (Dein bestehender CheckBox-Code) ... Try Dim chk As CheckBox = oControl oMyInput = chk.Checked.ToString @@ -6698,7 +7141,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Please set Checkbox value for field '" & chk.Name & "'" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6736,7 +7178,15 @@ Public Class frmValidator End If End If - If oBoolValue <> chk.Checked Then + ' ========== FIX: Force-Reindex für CheckBox ========== + Dim bForceChk As Boolean = _listForceReindex.Contains(oControl.Name) + If bForceChk Then + MyValidationLogger.Debug($"[CHECK_UPDATE] Force-Reindex aktiv für CheckBox [{oControl.Name}] → Wertvergleich übersprungen") + _listForceReindex.Remove(oControl.Name) + End If + ' ========== ENDE FIX ========== + + If bForceChk OrElse oBoolValue <> chk.Checked Then Dim result() As String ReDim Preserve result(0) If chk.Checked Then @@ -6751,7 +7201,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing Checkbox as VEKTOR - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6765,7 +7214,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing Checkbox - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6776,7 +7224,6 @@ Public Class frmValidator Else If IDBData.SetVariableValue(oIndexName, chk.Checked.ToString) Then oErrMsgMissingInput = "error indexing checkbox idb" - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6799,7 +7246,6 @@ Public Class frmValidator End Try Case oControl.GetType = GetType(DataGridView) - ' ... (Dein bestehender DataGridView-Code) ... Try Dim dgv As DataGridView = oControl Dim Zeilen As Integer = 0 @@ -6813,7 +7259,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Fehlende Eingabe in Vektorfeld '" & dgv.Name & "'" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6854,7 +7299,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error while indexing Vektorfeld - ERROR: " & idxerr_message MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6869,7 +7313,6 @@ Public Class frmValidator oMissing = True oErrMsgMissingInput = "Error indexing Datagridview idb" MyValidationLogger.Warn(oErrMsgMissingInput) - ' Vor ShowDialog prüfen If _FormClosing Then MyValidationLogger.Warn("Form closing - skip error dialog") Return False @@ -6886,19 +7329,19 @@ Public Class frmValidator End Try Case oControl.GetType = GetType(GridControl) + ' GridControl: kein Force-Reindex nötig – wird immer vollständig indexiert Dim oGrid As GridControl = oControl MyValidationLogger.Debug($"[4] GridControl-Case erreicht: [{oGrid.Name}]") - ' ========== NEU: Cleanup VOR Validierung ========== CleanupDeletedRows(oGrid) - ' ========== ENDE NEU ========== + Dim oSettings = New ControlSettings() With { - .IndexName = oIndexName, - .ControlType = GetType(GridControl).ToString, - .Name = oControlName, - .IsRequired = oIsRequired, - .IDBAttributeType = oIDBTyp - } + .IndexName = oIndexName, + .ControlType = GetType(GridControl).ToString, + .Name = oControlName, + .IsRequired = oIsRequired, + .IDBAttributeType = oIDBTyp + } Dim oGridColumnDefinition As DataTable = DT_COLUMNS_GRID.Clone() Dim oExpression = $"CONTROL_ID = {oControlRow.Item("GUID")}" DT_COLUMNS_GRID.Select(oExpression, "SEQUENCE").CopyToDataTable(oGridColumnDefinition, LoadOption.PreserveChanges) @@ -6906,8 +7349,9 @@ Public Class frmValidator Dim oResult = ValidateGridControl(oGrid, oSettings, oGridColumnDefinition, oMissing, oErrMsgMissingInput) If oResult = False Then MyValidationLogger.Warn($"⚠️ Validierung fehlgeschlagen für Grid [{oGrid.Name}] → Exit For") - Exit For ' ← SOFORT stoppen, keinen zweiten Dialog! + Exit For End If + End Select ' ========== NEU: Dirty-Flag nach erfolgreicher Indexierung zurücksetzen ========== @@ -6923,7 +7367,6 @@ Public Class frmValidator oMissing = True End If Else - ' Validierungsfehler → Batch verwerfen IDBData.RollbackBatch() End If End If @@ -6941,12 +7384,13 @@ Public Class frmValidator MyValidationLogger.Warn($"⚠️ Unexpected error in Check_UpdateIndexe - ControlID: {oControlId},{oControlName}") MyValidationLogger.Error(ex) Dim st As New StackTrace(ex, True) - MsgBox($"Unexpected error in Check_UpdateIndexe ControlID,Name: {oControlId},{oControlName}" & vbNewLine & ex.Message & vbNewLine & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") + MsgBox($"Unexpected error in Check_UpdateIndexe ControlID,Name: {oControlId},{oControlName}" & vbCrLf & ex.Message & vbCrLf & "Line: " & st.GetFrame(0).GetFileLineNumber().ToString, MsgBoxStyle.Critical, "Error:") MyValidationLogger.Info("Unexpected error in Check_UpdateIndexe:" & ex.Message & " - Line: " & st.GetFrame(0).GetFileLineNumber().ToString, True) Return False End Try End Function + Sub OpenfrmError(pErrormessage As String) ' ========== FIX: Verhindere mehrfache Dialoge ========== If _isShowingErrorDialog Then @@ -7281,7 +7725,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Fehler bei Überspringen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("Fehler bei Überspringen:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) Finally If LOG_HOTSPOTS Then @@ -7308,7 +7752,7 @@ Public Class frmValidator Private Sub delete_active_File() Try Dim result As MsgBoxResult - result = MessageBox.Show("Sind Sie sicher dass Sie dieses Dokument unwiderruflich löschen wollen?" & vbNewLine & "Danach wird die nächste Datei angezeigt!", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) + result = MessageBox.Show("Sind Sie sicher dass Sie dieses Dokument unwiderruflich löschen wollen?" & vbcrlf & "Danach wird die nächste Datei angezeigt!", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If result = MsgBoxResult.Yes Then Try If Not IsNothing(DocumentViewer1) Then @@ -7337,7 +7781,7 @@ Public Class frmValidator End If Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Fehler bei Löschen windream-Datei:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("Fehler bei Löschen windream-Datei:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) End Try End Sub @@ -7357,7 +7801,7 @@ Public Class frmValidator MyValidationLogger.Info("Manual deleting of file [" & CURRENT_WMFILE.aName & "] successfull!") Return True Catch ex As Exception - MyValidationLogger.Warn($"⚠️ Could not delete via windream-function - ERROR: [{ex.Message}] {vbNewLine} Trying system.io...") + MyValidationLogger.Warn($"⚠️ Could not delete via windream-function - ERROR: [{ex.Message}] {vbcrlf} Trying system.io...") Try Try CURRENT_WMFILE.unlock() @@ -7371,14 +7815,14 @@ Public Class frmValidator MyValidationLogger.Info("Deleting of file via system.io [" & WMDocPathWindows & "] successfull!") Return True Catch ex1 As Exception - MyValidationLogger.Warn($"⚠️ Could not delete via System.IO - ERROR: [{ex1.Message}] {vbNewLine} Trying system.io...") + MyValidationLogger.Warn($"⚠️ Could not delete via System.IO - ERROR: [{ex1.Message}] {vbcrlf} Trying system.io...") Return False End Try End Try Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Das windream-Objekt konnte nicht gelöscht werden!" & vbNewLine & vbNewLine & "Fehlermeldung:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("Das windream-Objekt konnte nicht gelöscht werden!" & vbcrlf & vbcrlf & "Fehlermeldung:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) MyValidationLogger.Info(" windream-Objekt konnte nicht gelöscht werden - Fehlermeldung: " & ex.Message, True) Return False End Try @@ -7497,7 +7941,7 @@ Public Class frmValidator oShellExecuteInfo.fMask = SEE_MASK_INVOKEIDLIST If Not ShellExecuteEx(oShellExecuteInfo) Then Dim ex As New System.ComponentModel.Win32Exception(System.Runtime.InteropServices.Marshal.GetLastWin32Error()) - MsgBox("error in Datei-Eigenschaften öffnen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical) + MsgBox("error in Datei-Eigenschaften öffnen:" & vbcrlf & ex.Message, MsgBoxStyle.Critical) End If Catch ex As Exception End Try @@ -7531,6 +7975,7 @@ Public Class frmValidator Catch ex As Exception End Try listChangedLookup.Clear() + _listForceReindex.Clear() SetStatusLabel("All Data refreshed", "Yellow") Finally _suppressLookupEvents = False ' @@ -7718,8 +8163,8 @@ Public Class frmValidator oFilenameOnly = Path.GetFileName(WMDocPathWindows) oExtension = Path.GetExtension(WMDocPathWindows) - oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbNewLine & - $"EXEC dbo.PRPM_GETFILENAME_EXPORT {CURRENT_DOC_ID}, 1, @Outputfilename = @Filename OUTPUT;" & vbNewLine & + oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbcrlf & + $"EXEC dbo.PRPM_GETFILENAME_EXPORT {CURRENT_DOC_ID}, 1, @Outputfilename = @Filename OUTPUT;" & vbcrlf & "SELECT @Filename" Dim oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename) @@ -7761,7 +8206,7 @@ Public Class frmValidator MyValidationLogger.Info($"File {WMDocPathWindows} exported successfully!") oCount += 1 Else - MsgBox("Error encountered while extracting Export-Filename!" & vbNewLine & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("Error encountered while extracting Export-Filename!" & vbcrlf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) End If End If @@ -7773,8 +8218,8 @@ Public Class frmValidator Dim oDocID = oFileRecord.Item("DocID") If File.Exists(oFromFilename) Then oFileCount += 1 - oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbNewLine & - $"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbNewLine & + oSQLGetFilename = $"DECLARE @Filename Varchar(512) " & vbcrlf & + $"EXEC dbo.PRPM_GETFILENAME_EXPORT {oDocID}, {oFileCount}, @Outputfilename = @Filename OUTPUT;" & vbcrlf & "SELECT @Filename" oExportFilename = DatabaseFallback.GetScalarValueECM(oSQLGetFilename) oExtension = Path.GetExtension(oFromFilename) @@ -7790,7 +8235,7 @@ Public Class frmValidator Else Dim omsg = $"Error encountered while extracting ATTACHMENT-Export-Filename DocID [{oDocID}]!" MyValidationLogger.Info($"#### ATTENTION: {omsg} SQL: {oSQLGetFilename}") - MsgBox(omsg & vbNewLine & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox(omsg & vbcrlf & "Please inform Admin-Team!", MsgBoxStyle.Critical, ADDITIONAL_TITLE) End If End If 'oFilenameOnly = Path.GetFileName(oFromFilename) @@ -7805,7 +8250,7 @@ Public Class frmValidator Catch ex As Exception MyValidationLogger.Error(ex) - MsgBox("Could not move file to target: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) + MsgBox("Could not move file to target: " & vbcrlf & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) End Try End Sub @@ -7844,7 +8289,7 @@ Public Class frmValidator Finish_WFStep(True) End If Else - MsgBox("We are sorry, but an enexpected error in rejection-process occured!" & vbNewLine & "Inform Your admin-team and check Your log. Thank You.", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) + MsgBox("We are sorry, but an enexpected error in rejection-process occured!" & vbcrlf & "Inform Your admin-team and check Your log. Thank You.", MsgBoxStyle.Exclamation, ADDITIONAL_TITLE) End If End If diff --git a/app/TaskFlow/frmValidatorSearch.vb b/app/TaskFlow/frmValidatorSearch.vb index e76a649..04ca221 100644 --- a/app/TaskFlow/frmValidatorSearch.vb +++ b/app/TaskFlow/frmValidatorSearch.vb @@ -468,7 +468,55 @@ Public Class frmValidatorSearch ToolStripDropDownButtonFile.Visible = False End Sub + Private Sub EnsureFormIsVisible() + Try + ' Aktuellen Bildschirm basierend auf der Formularposition ermitteln + Dim currentScreen As Screen = Screen.FromPoint(Me.Location) + Dim workingArea As Rectangle = currentScreen.WorkingArea + + ' Prüfen ob das Formular vollständig außerhalb des sichtbaren Bereichs liegt + Dim formBounds As New Rectangle(Me.Location, Me.Size) + + ' Wenn das Formular nicht mit dem Arbeitsbereich überschneidet + If Not workingArea.IntersectsWith(formBounds) Then + CenterFormOnScreen() + Exit Sub + End If + + ' Optional: Prüfen ob das Formular zu weit außerhalb liegt (z.B. nur 20% sichtbar) + Dim visibleArea As Rectangle = Rectangle.Intersect(workingArea, formBounds) + Dim visiblePercentage As Double = (visibleArea.Width * visibleArea.Height) / (formBounds.Width * formBounds.Height) + + If visiblePercentage < 0.2 Then ' Weniger als 20% sichtbar + CenterFormOnScreen() + End If + + Catch ex As Exception + LOGGER.Error(ex) + ' Bei Fehler sicherheitshalber zentrieren + CenterFormOnScreen() + End Try + End Sub + + Private Sub CenterFormOnScreen() + Try + ' Formular auf dem primären Bildschirm zentrieren + Me.StartPosition = FormStartPosition.CenterScreen + + ' Alternative: Auf aktuellem Bildschirm zentrieren + Dim currentScreen As Screen = Screen.PrimaryScreen + Dim x As Integer = currentScreen.WorkingArea.Left + (currentScreen.WorkingArea.Width - Me.Width) \ 2 + Dim y As Integer = currentScreen.WorkingArea.Top + (currentScreen.WorkingArea.Height - Me.Height) \ 2 + Me.Location = New Point(x, y) + + LOGGER.Info("Formular wurde zentriert, da es außerhalb des sichtbaren Bereichs lag") + Catch ex As Exception + LOGGER.Error(ex) + End Try + End Sub Private Sub frmValidatorSearch_Shown(sender As Object, e As EventArgs) Handles Me.Shown + ' Prüfen ob das Formular im sichtbaren Bereich liegt + EnsureFormIsVisible() formLoaded = True End Sub