Compare commits
5 Commits
c0a17f5cd4
...
70c9bbe11a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70c9bbe11a | ||
|
|
d8b1cca14d | ||
|
|
0cc7fe45d3 | ||
|
|
3e7d700536 | ||
|
|
d7546e23cc |
@@ -124,19 +124,19 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
@@ -152,15 +152,15 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
|
||||
@@ -176,7 +176,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="DocumentFormat.OpenXml.Framework" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
|
||||
@@ -188,7 +188,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
@@ -196,7 +196,11 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Formats.Asn1" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.5" newVersion="10.0.0.5" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -544,8 +544,9 @@ Public Class ClassControlCreator
|
||||
Return oControl
|
||||
End Function
|
||||
|
||||
Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean, pcurrencySymbol As String) As GridControl
|
||||
Dim oGridControlCreator = New ControlCreator.GridControl(LogConfig, GridTables, pcurrencySymbol)
|
||||
Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean,
|
||||
pcurrencySymbol As String, pParentControl As Control) As GridControl
|
||||
Dim oGridControlCreator = New ControlCreator.GridControl(LogConfig, GridTables, pcurrencySymbol, pParentControl)
|
||||
Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode)
|
||||
Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid
|
||||
Dim oView As GridView
|
||||
@@ -900,7 +901,15 @@ Public Class ClassControlCreator
|
||||
Dim oColumnName = oRow.Item("SPALTENNAME")
|
||||
Dim oAdvancedLookup = oRow.Item("ADVANCED_LOOKUP")
|
||||
|
||||
' *** NEU: Prüfe ob Spalte #TBCOL# verwendet (dynamisch pro Zeile) ***
|
||||
If oSqlStatement <> String.Empty AndAlso oConnectionId > -1 Then
|
||||
' *** NEU: Skip Spalten mit #TBCOL# (werden in ShowingEditor behandelt) ***
|
||||
If oSqlStatement.Contains("{#TBCOL#") Then
|
||||
Logger.Debug($"GridTables_HandleControlValueChange -> Skipping column [{oColumnName}] (has #TBCOL# placeholders, will be resolved per row)")
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' *** BESTEHENDER CODE: Nur für statische Spalten ({#CTRL#} only) ***
|
||||
oSqlStatement = clsPatterns.ReplaceAllValues(oSqlStatement, pControlPanel, True)
|
||||
GridTables_CacheDatatableForColumn(oControlId, oColumnName, oSqlStatement, oConnectionId, oAdvancedLookup)
|
||||
|
||||
|
||||
@@ -22,11 +22,15 @@ Namespace ControlCreator
|
||||
Private ReadOnly _LogConfig As LogConfig
|
||||
Private ReadOnly _Logger As Logger
|
||||
Private ReadOnly _GridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))
|
||||
Private ReadOnly _ParentControl As Control
|
||||
|
||||
Private newRowModified As Boolean
|
||||
Private isApplyingInheritedValue As Boolean
|
||||
Private _FormulaColumnNames As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase)
|
||||
Private _FormulaSqlColumns As New Dictionary(Of String, FormulaSqlDefinition)(StringComparer.OrdinalIgnoreCase)
|
||||
Private _DynamicEditorColumns As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase)
|
||||
Private Shared _DynamicEditorCacheShared As New Dictionary(Of String, RepositoryItem)
|
||||
Private Shared _ResolvedSqlCache As New Dictionary(Of String, String)
|
||||
|
||||
Private _isRefreshingFormula As Boolean = False ' *** NEU: Flag für Formel-Refresh ***
|
||||
Private _currencySymbol As String = "€"
|
||||
@@ -39,6 +43,14 @@ Namespace ControlCreator
|
||||
''' </summary>
|
||||
Private Shared _CurrencySymbolByGridName As New Dictionary(Of String, String)(StringComparer.OrdinalIgnoreCase)
|
||||
|
||||
''' <summary>
|
||||
''' Leert den Cache für dynamische Editoren. Muss bei jedem Dokumentwechsel aufgerufen werden.
|
||||
''' </summary>
|
||||
Public Shared Sub ClearDynamicEditorCache()
|
||||
SyncLock _DynamicEditorCacheShared
|
||||
_DynamicEditorCacheShared.Clear()
|
||||
End SyncLock
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Definiert eine SQL-basierte Formelspalte mit allen nötigen Metadaten.
|
||||
''' </summary>
|
||||
@@ -71,37 +83,69 @@ Namespace ControlCreator
|
||||
''' </summary>
|
||||
Private Function ResolveSqlTemplate(sqlTemplate As String, pView As GridView, rowHandle As Integer) As String
|
||||
Dim resolvedSql As String = sqlTemplate
|
||||
|
||||
' *** SCHRITT 1: {#TBCOL#...} Platzhalter ersetzen ***
|
||||
Dim pattern As String = "\{#TBCOL#([^}]+)\}"
|
||||
Dim matches = Regex.Matches(sqlTemplate, pattern)
|
||||
|
||||
For Each match As Match In matches
|
||||
Dim colName = match.Groups(1).Value
|
||||
Dim cellValue = pView.GetRowCellValue(rowHandle, colName)
|
||||
Dim safeValue As String
|
||||
|
||||
If cellValue Is Nothing OrElse IsDBNull(cellValue) Then
|
||||
safeValue = "NULL"
|
||||
ElseIf TypeOf cellValue Is String Then
|
||||
' SQL-Injection-Schutz: Einfache Anführungszeichen escapen
|
||||
safeValue = cellValue.ToString().Replace("'", "''")
|
||||
ElseIf TypeOf cellValue Is Boolean Then
|
||||
safeValue = If(CBool(cellValue), "1", "0")
|
||||
Else
|
||||
' Numerische Werte: Invariant-Format (Punkt als Dezimaltrenner)
|
||||
safeValue = Convert.ToString(cellValue, CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
Dim safeValue As String = ConvertToSqlValue(cellValue) ' Hilfsfunktion
|
||||
resolvedSql = resolvedSql.Replace(match.Value, safeValue)
|
||||
_Logger.Debug("Resolved SQL placeholder [{0}] with value [{1}] → {2}", match.Value, cellValue, safeValue)
|
||||
Next
|
||||
_Logger.Debug("Final resolved SQL: {0}", resolvedSql)
|
||||
|
||||
' *** SCHRITT 2: {#CTRL#...} via clsPatterns - MIT CACHE ***
|
||||
If _ParentControl IsNot Nothing AndAlso resolvedSql.Contains("{#CTRL#") Then
|
||||
' Cache-Key: Hash aus SQL + Control-Werten
|
||||
Dim cacheKey = GenerateCacheKey(resolvedSql, _ParentControl)
|
||||
|
||||
SyncLock _ResolvedSqlCache
|
||||
If _ResolvedSqlCache.ContainsKey(cacheKey) Then
|
||||
resolvedSql = _ResolvedSqlCache(cacheKey)
|
||||
' Kein Log → spart 200+ Zeilen
|
||||
Else
|
||||
' Nur bei Cache-Miss ReplaceAllValues aufrufen
|
||||
resolvedSql = clsPatterns.ReplaceAllValues(resolvedSql, _ParentControl, True)
|
||||
_ResolvedSqlCache(cacheKey) = resolvedSql
|
||||
If LOG_HOTSPOTS Then _Logger.Debug("[ResolveSqlTemplate] ReplaceAllValues-Cache MISS")
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
|
||||
Return resolvedSql
|
||||
End Function
|
||||
Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)), pCurrencySymbol As String)
|
||||
''' <summary>
|
||||
''' Konvertiert einen Zellwert in einen SQL-sicheren String (für {#TBCOL#...} Platzhalter).
|
||||
''' </summary>
|
||||
Private Function ConvertToSqlValue(cellValue As Object) As String
|
||||
If cellValue Is Nothing OrElse IsDBNull(cellValue) Then
|
||||
Return "NULL"
|
||||
ElseIf TypeOf cellValue Is String Then
|
||||
' SQL-Injection-Schutz: Einfache Anführungszeichen escapen
|
||||
Return cellValue.ToString().Replace("'", "''")
|
||||
ElseIf TypeOf cellValue Is Boolean Then
|
||||
Return If(CBool(cellValue), "1", "0")
|
||||
ElseIf TypeOf cellValue Is DateTime Then
|
||||
' ISO-Format für SQL
|
||||
Return CDate(cellValue).ToString("yyyy-MM-dd HH:mm:ss")
|
||||
Else
|
||||
' Numerische Werte: Invariant-Format (Punkt als Dezimaltrenner)
|
||||
Return Convert.ToString(cellValue, CultureInfo.InvariantCulture)
|
||||
End If
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Placeholder für Control-Value-Hashing.
|
||||
''' </summary>
|
||||
Private Function GenerateCacheKey(sql As String, parent As Control) As String
|
||||
' Cache-Key basiert NUR auf aufgelöstem SQL (Control-Werte sind bereits drin)
|
||||
Return sql.GetHashCode().ToString()
|
||||
End Function
|
||||
Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)), pCurrencySymbol As String, pParentControl As Control)
|
||||
_LogConfig = pLogConfig
|
||||
_Logger = pLogConfig.GetLogger()
|
||||
_GridTables = pGridTables
|
||||
_currencySymbol = pCurrencySymbol
|
||||
_ParentControl = pParentControl ' *** NEU ***
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Setzt den Shared Currency-Cache zurück. Muss beim Laden eines neuen Dokuments
|
||||
@@ -212,7 +256,7 @@ Namespace ControlCreator
|
||||
Public Function FillGridTables(pColumnTable As DataTable, pControlId As Integer, pControlName As String) As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))
|
||||
For Each oRow As DataRow In pColumnTable.Rows
|
||||
' Fetch and cache Combobox results
|
||||
Dim oConnectionId As Integer = oRow.ItemEx("CONNECTION_ID", 0)
|
||||
Dim oConnectionId As Integer = oRow.ItemEx("CONNECTION_ID", 1)
|
||||
Dim oSqlCommand As String = oRow.ItemEx("SQL_COMMAND", "")
|
||||
|
||||
If oSqlCommand <> "" Then
|
||||
@@ -248,7 +292,10 @@ Namespace ControlCreator
|
||||
_Logger.Warn("⚠️ Could not load data for column {0} in control {1}", oRow.Item("SPALTENNAME"), pControlName)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
Else
|
||||
_Logger.Debug("No SQL_COMMAND for Column[{0}] – skipping.", oRow.Item("SPALTENNAME"))
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Return _GridTables
|
||||
@@ -567,7 +614,6 @@ Namespace ControlCreator
|
||||
Dim oFormulaExpression = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty)
|
||||
Dim oFormulaSql = ObjectEx.NotNull(oColumnData.Item("FORMULA_SQL"), String.Empty)
|
||||
|
||||
' Entweder/Oder: Beide gleichzeitig → Expression gewinnt, SQL ignoriert
|
||||
If oFormulaExpression <> String.Empty AndAlso oFormulaSql <> String.Empty Then
|
||||
_Logger.Warn("[ConfigureViewColumnsCurrency] Column [{0}] has BOTH FORMULA_EXPRESSION and FORMULA_SQL – treating as EXPRESSION only.", oCol.FieldName)
|
||||
oFormulaSql = String.Empty
|
||||
@@ -575,19 +621,13 @@ Namespace ControlCreator
|
||||
_Logger.Debug("[ConfigureViewColumnsCurrency] Column [{0}] is a SQL formula column: {1}", oCol.FieldName, oFormulaSql)
|
||||
End If
|
||||
|
||||
' Spalte ist eine Formel-Spalte (Expression ODER SQL) → nur DisplayFormat, kein ColumnEdit
|
||||
Dim oIsAnyFormula As Boolean = oFormulaExpression <> String.Empty OrElse oFormulaSql <> String.Empty
|
||||
|
||||
If oIsAnyFormula Then
|
||||
' Formel-Spalten (Expression oder SQL): nur DisplayFormat setzen
|
||||
oCol.DisplayFormat.FormatType = FormatType.Custom
|
||||
oCol.DisplayFormat.FormatString = $"#,##0.00 {_currencySymbol}"
|
||||
_Logger.Debug("[ConfigureViewColumnsCurrency] Formel-Spalte [{0}] (IsExpression=[{1}], IsSql=[{2}]): DisplayFormat=[{3}], RepositoryItems.Count=[{4}]",
|
||||
oCol.FieldName,
|
||||
oFormulaExpression <> String.Empty,
|
||||
oFormulaSql <> String.Empty,
|
||||
oCol.DisplayFormat.FormatString,
|
||||
pGrid.RepositoryItems.Count)
|
||||
_Logger.Debug("[ConfigureViewColumnsCurrency] Formel-Spalte [{0}]: DisplayFormat=[{1}]",
|
||||
oCol.FieldName, oCol.DisplayFormat.FormatString)
|
||||
|
||||
ElseIf oCol.OptionsColumn.AllowEdit Then
|
||||
_Logger.Debug("[ConfigureViewColumnsCurrency] [{0}] VOR ColumnEdit: RepositoryItems.Count=[{1}]",
|
||||
@@ -597,85 +637,15 @@ Namespace ControlCreator
|
||||
|
||||
_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))
|
||||
|
||||
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
|
||||
|
||||
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 oColumnData As DataRow = pColumnTable.
|
||||
Select($"SPALTENNAME = '{e.Column.FieldName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
If oColumnData IsNot Nothing AndAlso
|
||||
oColumnData.Item("TYPE_COLUMN").ToString() = "CURRENCY" Then
|
||||
|
||||
Try
|
||||
Dim currentSymbol As String = _currencySymbol
|
||||
Dim gridName As String = pGrid.Name
|
||||
SyncLock _CurrencySymbolByGridName
|
||||
If _CurrencySymbolByGridName.ContainsKey(gridName) Then
|
||||
currentSymbol = _CurrencySymbolByGridName(gridName)
|
||||
End If
|
||||
End SyncLock
|
||||
|
||||
Dim oValue As Double
|
||||
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()
|
||||
|
||||
Dim oDeCulture As CultureInfo = New CultureInfo("de-DE")
|
||||
If Double.TryParse(oStringValue, NumberStyles.Currency Or NumberStyles.Number, oDeCulture, oValue) Then
|
||||
ElseIf Double.TryParse(oStringValue, NumberStyles.Currency Or NumberStyles.Number, CultureInfo.InvariantCulture, oValue) Then
|
||||
Else
|
||||
oValue = Convert.ToDouble(oStringValue, CultureInfo.CurrentCulture)
|
||||
End If
|
||||
Else
|
||||
oValue = Convert.ToDouble(e.Value)
|
||||
End If
|
||||
|
||||
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)
|
||||
Dim fallbackSymbol As String = _currencySymbol
|
||||
SyncLock _CurrencySymbolByGridName
|
||||
If _CurrencySymbolByGridName.ContainsKey(pGrid.Name) Then
|
||||
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 einmalig cachen + Validierung: Entweder EXPRESSION oder SQL, nie beides ***
|
||||
_FormulaColumnNames.Clear()
|
||||
_FormulaSqlColumns.Clear()
|
||||
_DynamicEditorColumns.Clear()
|
||||
|
||||
For Each r As DataRow In pColumnTable.Rows
|
||||
Dim oColName = r.Item("SPALTENNAME").ToString()
|
||||
@@ -698,7 +668,7 @@ Namespace ControlCreator
|
||||
_FormulaColumnNames.Add(oColName)
|
||||
_Logger.Debug("[ConfigureViewEvents] Column [{0}] registered as FORMULA_EXPRESSION column.", oColName)
|
||||
ElseIf oSql_FORMULA <> String.Empty Then
|
||||
Dim oConnectionId As Integer = r.ItemEx("CONNECTION_ID", 0)
|
||||
Dim oConnectionId As Integer = r.ItemEx("CONNECTION_ID", 1)
|
||||
_FormulaSqlColumns(oColName) = New FormulaSqlDefinition() With {
|
||||
.SqlTemplate = oSql_FORMULA,
|
||||
.ReferencedColumns = GetReferencedSqlColumnNames(oSql_FORMULA),
|
||||
@@ -709,6 +679,13 @@ Namespace ControlCreator
|
||||
_Logger.Debug("[ConfigureViewEvents] Column [{0}] registered as FORMULA_SQL column. ReferencedColumns=[{1}]",
|
||||
oColName, String.Join(", ", GetReferencedSqlColumnNames(oSql_FORMULA)))
|
||||
End If
|
||||
|
||||
' *** NEU: Dynamische Editor-Spalten cachen ***
|
||||
Dim oSqlCommand As String = r.ItemEx("SQL_COMMAND", "")
|
||||
If oSqlCommand <> "" AndAlso (ContainsTableColumnPlaceholder(oSqlCommand) OrElse clsPatterns.HasComplexPatterns(oSqlCommand)) Then
|
||||
_DynamicEditorColumns.Add(oColName)
|
||||
_Logger.Debug("[ConfigureViewEvents] Column [{0}] registered as DYNAMIC_EDITOR column (has placeholders)", oColName)
|
||||
End If
|
||||
Next
|
||||
|
||||
AddHandler pGridView.InitNewRow, Sub(sender As Object, e As InitNewRowEventArgs)
|
||||
@@ -804,41 +781,92 @@ Namespace ControlCreator
|
||||
End If
|
||||
End Sub
|
||||
|
||||
AddHandler pGridView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs)
|
||||
Try
|
||||
For Each oRow As DataRow In pColumnTable.Rows
|
||||
Dim oColumnName As String = oRow.Item("SPALTENNAME").ToString()
|
||||
If oColumnName <> e.Column.FieldName Then Continue For
|
||||
Dim oSqlCommand As String = oRow.ItemEx("SQL_COMMAND", "")
|
||||
Dim oConnectionId As Integer = oRow.ItemEx("CONNECTION_ID", 1)
|
||||
AddHandler pGridView.CustomRowCellEdit,
|
||||
Sub(sender As Object, e As CustomRowCellEditEventArgs)
|
||||
Try
|
||||
' *** NEU: Dynamische Editoren aus Cache oder neu erstellen ***
|
||||
If _DynamicEditorColumns.Contains(e.Column.FieldName) Then
|
||||
Dim oColumnData As DataRow = pColumnTable.
|
||||
Select($"SPALTENNAME = '{e.Column.FieldName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
Dim oEditorExists = GridTables_TestEditorExistsByControlAndColumn(pControlId, oColumnName)
|
||||
If oColumnData IsNot Nothing Then
|
||||
Dim oSqlCommand As String = oColumnData.ItemEx("SQL_COMMAND", "")
|
||||
Dim oConnectionId As Integer = oColumnData.ItemEx("CONNECTION_ID", 1)
|
||||
Dim oIsAdvancedLookup As Boolean = oColumnData.ItemEx("ADVANCED_LOOKUP", False)
|
||||
|
||||
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
|
||||
Dim oColumnType As String = ObjectEx.NotNull(oRow.Item("TYPE_COLUMN"), String.Empty).ToString()
|
||||
If oColumnType = "CURRENCY" Then
|
||||
If _FormulaColumnNames.Contains(oColumnName) Then
|
||||
_Logger.Debug("CURRENCY column [{0}] is formula/readonly – CustomColumnDisplayText handles display", oColumnName)
|
||||
Else
|
||||
_Logger.Debug("CURRENCY column [{0}] – NO e.RepositoryItem set. Display via CustomColumnDisplayText, Edit via GridColumn.ColumnEdit", oColumnName)
|
||||
End If
|
||||
Else
|
||||
_Logger.Debug("Editor for Column [{0}] does not exist", oColumnName)
|
||||
End If
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("⚠️ Error in CustomRowCellEdit for [{0}]", e.CellValue)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
' *** SQL auflösen (für Cache-Key) ***
|
||||
Dim resolvedSql = ResolveSqlTemplate(oSqlCommand, TryCast(sender, GridView), e.RowHandle)
|
||||
|
||||
' *** CACHE-KEY: Spaltenname + aufgelöstes SQL (HashCode) ***
|
||||
Dim cacheKey As String = $"{e.Column.FieldName}|{resolvedSql.GetHashCode()}"
|
||||
|
||||
' *** CACHE-CHECK ***
|
||||
SyncLock _DynamicEditorCacheShared
|
||||
If _DynamicEditorCacheShared.ContainsKey(cacheKey) Then
|
||||
' ✅ CACHE HIT: Editor wiederverwenden
|
||||
e.RepositoryItem = _DynamicEditorCacheShared(cacheKey)
|
||||
Else
|
||||
' ❌ CACHE MISS: Neuen Editor erstellen
|
||||
_Logger.Info("[CustomRowCellEdit] 🆕 MISS: Creating editor for [{0}]", e.Column.FieldName)
|
||||
|
||||
Dim realEditor = CreateRowSpecificEditor(e.Column.FieldName, resolvedSql, oConnectionId, oIsAdvancedLookup)
|
||||
|
||||
If realEditor IsNot Nothing Then
|
||||
' *** IN CACHE SPEICHERN ***
|
||||
_DynamicEditorCacheShared(cacheKey) = realEditor
|
||||
e.RepositoryItem = realEditor
|
||||
_Logger.Info("[CustomRowCellEdit] ✓ Cached [{0}] editor (Type=[{1}])", e.Column.FieldName, realEditor.GetType().Name)
|
||||
Else
|
||||
_Logger.Warn("[CustomRowCellEdit] CreateRowSpecificEditor returned Nothing for [{0}]", e.Column.FieldName)
|
||||
End If
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
' Standard-Editor aus Cache
|
||||
Dim oEditorExists = GridTables_TestEditorExistsByControlAndColumn(pControlId, e.Column.FieldName)
|
||||
If oEditorExists Then
|
||||
_Logger.Debug("[CustomRowCellEdit] Assigning RepositoryItem for column [{0}] from GridTables cache.", e.Column.FieldName)
|
||||
e.RepositoryItem = _GridTables.Item(pControlId).Item(e.Column.FieldName)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("⚠️ Error in CustomRowCellEdit for column [{0}]", e.Column.FieldName)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
' *** NEU: Visuelle Kennzeichnung für dynamische Editoren ***
|
||||
AddHandler pGridView.CustomDrawCell,
|
||||
Sub(sender As Object, e As RowCellCustomDrawEventArgs)
|
||||
Try
|
||||
' Nur für dynamische Editor-Spalten
|
||||
If Not _DynamicEditorColumns.Contains(e.Column.FieldName) Then Return
|
||||
|
||||
' Zellwert abrufen
|
||||
Dim cellValue = pGridView.GetRowCellValue(e.RowHandle, e.Column.FieldName)
|
||||
|
||||
' Wenn Zelle LEER ist → grau einfärben
|
||||
If cellValue Is Nothing OrElse IsDBNull(cellValue) OrElse String.IsNullOrWhiteSpace(cellValue.ToString()) Then
|
||||
' Helles Grau als Hintergrund
|
||||
e.Appearance.BackColor = Color.FromArgb(240, 240, 240)
|
||||
e.Appearance.ForeColor = Color.Gray
|
||||
Else
|
||||
' Wert vorhanden → Standardfarbe (nur bei Fokus-Wechsel)
|
||||
' WICHTIG: Nicht überschreiben, wenn Zelle selektiert ist!
|
||||
If Not e.Appearance.BackColor.Equals(SystemColors.Highlight) Then
|
||||
e.Appearance.BackColor = Color.White
|
||||
e.Appearance.ForeColor = Color.Black
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[CustomDrawCell] Error: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
AddHandler pGridView.ValidatingEditor, Sub(sender As Object, e As BaseContainerValidateEditorEventArgs)
|
||||
Dim oRow As DataRowView = pGridView.GetRow(pGridView.FocusedRowHandle)
|
||||
Dim oColumnName = pGridView.FocusedColumn.FieldName
|
||||
@@ -972,73 +1000,33 @@ Namespace ControlCreator
|
||||
AddHandler pControl.LostFocus, AddressOf Control_LostFocus
|
||||
|
||||
AddHandler pGridView.ShowingEditor,
|
||||
Sub(sender As Object, e As CancelEventArgs)
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing Then Return
|
||||
Sub(sender As Object, e As CancelEventArgs)
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing Then Return
|
||||
|
||||
_Logger.Debug("Showing editor.")
|
||||
_Logger.Debug("Showing editor.")
|
||||
|
||||
' Formel-Spalten dürfen keinen Editor öffnen
|
||||
If oView.FocusedColumn IsNot Nothing Then
|
||||
Dim oFieldName As String = oView.FocusedColumn.FieldName
|
||||
If _FormulaColumnNames.Contains(oFieldName) Then
|
||||
_Logger.Debug("Cancelling editor – column [{0}] is a formula column (Expression or SQL).", oFieldName)
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
' *** NEU: Row-specific Editor für #TBCOL# Platzhalter ***
|
||||
If oView.FocusedColumn IsNot Nothing Then
|
||||
Dim oFocusedColumnName As String = oView.FocusedColumn.FieldName
|
||||
Dim oRowHandle As Integer = oView.FocusedRowHandle
|
||||
|
||||
' Spalten-Metadata aus pColumnTable holen
|
||||
Dim oColumnData As DataRow = pColumnTable.
|
||||
Select($"SPALTENNAME = '{oFocusedColumnName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
If oColumnData IsNot Nothing Then
|
||||
Dim oSqlCommand As String = oColumnData.ItemEx("SQL_COMMAND", "")
|
||||
Dim oConnectionId As Integer = oColumnData.ItemEx("CONNECTION_ID", 1)
|
||||
|
||||
' Prüfen ob SQL Platzhalter enthält
|
||||
If oSqlCommand <> "" AndAlso ContainsTableColumnPlaceholder(oSqlCommand) Then
|
||||
_Logger.Debug("[ShowingEditor] Column [{0}] has SQL with #TBCOL# placeholders – creating row-specific editor", oFocusedColumnName)
|
||||
|
||||
' Platzhalter ersetzen mit aktuellen Zeilenwerten
|
||||
Dim resolvedSql As String = ResolveSqlTemplate(oSqlCommand, oView, oRowHandle)
|
||||
|
||||
' Editor mit aufgelöstem SQL laden
|
||||
Dim oRowSpecificEditor = CreateRowSpecificEditor(
|
||||
oFocusedColumnName,
|
||||
resolvedSql,
|
||||
oConnectionId,
|
||||
oColumnData.ItemEx("ADVANCED_LOOKUP", False))
|
||||
|
||||
If oRowSpecificEditor IsNot Nothing Then
|
||||
' Editor temporär zur Spalte hinzufügen
|
||||
oView.FocusedColumn.ColumnEdit = oRowSpecificEditor
|
||||
_Logger.Debug("[ShowingEditor] Row-specific editor assigned for [{0}]", oFocusedColumnName)
|
||||
Else
|
||||
_Logger.Warn("[ShowingEditor] Failed to create row-specific editor for [{0}] – cancelling edit", oFocusedColumnName)
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
' Formel-Spalten blockieren
|
||||
If oView.FocusedColumn IsNot Nothing Then
|
||||
Dim oFieldName As String = oView.FocusedColumn.FieldName
|
||||
If _FormulaColumnNames.Contains(oFieldName) Then
|
||||
_Logger.Debug("Cancelling editor – column [{0}] is a formula column.", oFieldName)
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' BESTEHENDER CODE: NewItemRow-Handling
|
||||
If oView.IsNewItemRow(oView.FocusedRowHandle) AndAlso Not newRowModified Then
|
||||
_Logger.Debug("Adding new row.")
|
||||
oView.AddNewRow()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
CheckNewItemRow:
|
||||
If oView.IsNewItemRow(oView.FocusedRowHandle) AndAlso Not newRowModified Then
|
||||
_Logger.Debug("Adding new row.")
|
||||
oView.AddNewRow()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[ShowingEditor] Error: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
AddHandler pGridView.FocusedColumnChanged,
|
||||
Sub(sender As Object, e As FocusedColumnChangedEventArgs)
|
||||
@@ -1062,15 +1050,127 @@ Namespace ControlCreator
|
||||
|
||||
AddHandler pGridView.CellValueChanged,
|
||||
Sub(sender As Object, e As CellValueChangedEventArgs)
|
||||
' *** HandleInheritedColumnValue MUSS zuerst aufgerufen werden ***
|
||||
' *** 1. HandleInheritedColumnValue ZUERST ***
|
||||
Try
|
||||
HandleInheritedColumnValue(TryCast(sender, GridView), pColumnTable, e)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
' *** FORMULA_EXPRESSION-Refresh via CellValueChanged (FALLBACK) ***
|
||||
' (EditValueChanged macht das normalerweise schon LIVE)
|
||||
' *** 2. Cache-Invalidierung für dynamische Editoren ***
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing OrElse e.Column Is Nothing Then Return
|
||||
|
||||
' Finde alle dynamischen Spalten, die die geänderte Spalte via {#TBCOL#...} referenzieren
|
||||
Dim oDependentDynamicColumns As New List(Of String)
|
||||
|
||||
For Each dynColName In _DynamicEditorColumns
|
||||
Dim oColDef As DataRow = pColumnTable.
|
||||
Select($"SPALTENNAME = '{dynColName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
If oColDef Is Nothing Then Continue For
|
||||
|
||||
Dim oSqlCommand As String = oColDef.ItemEx("SQL_COMMAND", "")
|
||||
|
||||
' Prüfe ob SQL {#TBCOL#<ColumnName>} enthält
|
||||
If oSqlCommand.Contains($"{{#TBCOL#{e.Column.FieldName}}}") Then
|
||||
oDependentDynamicColumns.Add(dynColName)
|
||||
_Logger.Debug("[CellValueChanged] Spalte [{0}] referenziert via #TBCOL# [{1}] → Cache invalidieren",
|
||||
dynColName, e.Column.FieldName)
|
||||
End If
|
||||
Next
|
||||
|
||||
' Cache-Einträge für ALLE betroffenen Zeilen löschen
|
||||
If oDependentDynamicColumns.Count > 0 Then
|
||||
SyncLock _DynamicEditorCacheShared
|
||||
Dim oKeysToRemove As New List(Of String)
|
||||
|
||||
For Each cacheKey In _DynamicEditorCacheShared.Keys
|
||||
For Each depCol In oDependentDynamicColumns
|
||||
' Cache-Key-Format: "ColumnName|HashCode"
|
||||
If cacheKey.StartsWith(depCol & "|") Then
|
||||
oKeysToRemove.Add(cacheKey)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
' Cache-Keys löschen
|
||||
For Each keyToRemove In oKeysToRemove
|
||||
_DynamicEditorCacheShared.Remove(keyToRemove)
|
||||
_Logger.Info("[CellValueChanged] ♻️ Cache invalidiert: [{0}]", keyToRemove)
|
||||
Next
|
||||
|
||||
If oKeysToRemove.Count > 0 Then
|
||||
_Logger.Info("[CellValueChanged] ♻️ Gesamt: {0} Cache-Einträge für [{1}] gelöscht",
|
||||
oKeysToRemove.Count, e.Column.FieldName)
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[CellValueChanged] Cache-Invalidierung fehlgeschlagen: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
' *** Block 2.5: Grid-Invalidierung für dynamische Editoren ***
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing OrElse e.Column Is Nothing Then Return
|
||||
|
||||
' Finde alle dynamischen Spalten, die die geänderte Spalte via {#TBCOL#...} referenzieren
|
||||
Dim oDependentDynamicColumns As New List(Of String)
|
||||
|
||||
For Each dynColName In _DynamicEditorColumns
|
||||
Dim oColDef As DataRow = pColumnTable.
|
||||
Select($"SPALTENNAME = '{dynColName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
If oColDef Is Nothing Then Continue For
|
||||
|
||||
Dim oSqlCommand As String = oColDef.ItemEx("SQL_COMMAND", "")
|
||||
|
||||
' Prüfe ob SQL {#TBCOL#<ColumnName>} enthält
|
||||
If oSqlCommand.Contains($"{{#TBCOL#{e.Column.FieldName}}}") Then
|
||||
oDependentDynamicColumns.Add(dynColName)
|
||||
End If
|
||||
Next
|
||||
|
||||
' *** KERN-FIX: Grid-Refresh OHNE Cache-Duplikat ***
|
||||
If oDependentDynamicColumns.Count > 0 Then
|
||||
_Logger.Debug("[CellValueChanged] Invalidiere {0} Zeilen für abhängige Spalten: [{1}]",
|
||||
oView.DataRowCount, String.Join(", ", oDependentDynamicColumns))
|
||||
|
||||
' BeginInvoke: Grid-Refresh NACH allen CellValueChanged-Events
|
||||
oView.GridControl.BeginInvoke(New Action(
|
||||
Sub()
|
||||
Try
|
||||
For rowHandle As Integer = 0 To oView.DataRowCount - 1
|
||||
For Each depCol In oDependentDynamicColumns
|
||||
Dim oGridColumn = oView.Columns.ColumnByFieldName(depCol)
|
||||
If oGridColumn IsNot Nothing Then
|
||||
oView.RefreshRowCell(rowHandle, oGridColumn)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
_Logger.Info("[CellValueChanged] ✓ Grid-Invalidierung abgeschlossen: {0} Zeilen, {1} Spalten",
|
||||
oView.DataRowCount, oDependentDynamicColumns.Count)
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[CellValueChanged] Grid-Invalidierung fehlgeschlagen: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub))
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[CellValueChanged] Grid-Invalidierung fehlgeschlagen: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
' *** 3. FORMULA_EXPRESSION-Refresh via CellValueChanged (FALLBACK) ***
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing OrElse e.Column Is Nothing Then Return
|
||||
@@ -1092,7 +1192,7 @@ Namespace ControlCreator
|
||||
Next
|
||||
|
||||
If oFormulaColumnsToRefresh.Count = 0 Then
|
||||
' Kein FORMULA_EXPRESSION-Refresh nötig – weiter zu FORMULA_SQL
|
||||
' Kein FORMULA_EXPRESSION-Refresh nötig
|
||||
Else
|
||||
Dim oRowHandle As Integer = e.RowHandle
|
||||
_Logger.Debug("[FormulaRefresh] CellValueChanged FALLBACK – refreshing EXPRESSION columns for row [{0}] after column [{1}] changed.", oRowHandle, e.Column.FieldName)
|
||||
@@ -1110,7 +1210,7 @@ Namespace ControlCreator
|
||||
_Logger.Debug("[FormulaRefresh] FALLBACK DisplayText for [{0}]: [{1}]",
|
||||
oFormulaColumnName, oView.GetRowCellDisplayText(oRowHandle, oGridColumn))
|
||||
Next
|
||||
' Dies fängt den Fall ab, dass eine SQL-Spalte eine Expression-Spalte referenziert
|
||||
' SQL-Formeln die Expression-Spalten referenzieren auch triggern
|
||||
TriggerSqlFormulasAfterExpressionUpdate(oView, oRowHandle, oFormulaColumnsToRefresh)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
@@ -1122,8 +1222,7 @@ Namespace ControlCreator
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
' *** FORMULA_SQL-Refresh via CellValueChanged ***
|
||||
' SQL wird NUR hier ausgeführt (nicht in EditValueChanged) um DB-Roundtrips zu minimieren
|
||||
' *** 4. FORMULA_SQL-Refresh via CellValueChanged ***
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView Is Nothing OrElse e.Column Is Nothing Then Return
|
||||
@@ -1143,7 +1242,7 @@ Namespace ControlCreator
|
||||
_Logger.Debug("[FormulaSql] CellValueChanged – column [{0}] triggers SQL refresh for: [{1}]",
|
||||
e.Column.FieldName, String.Join(", ", oSqlColumnsToRefresh))
|
||||
|
||||
' BeginInvoke: UI nicht blockieren, GridView in stabilem Zustand
|
||||
' BeginInvoke: UI nicht blockieren
|
||||
oView.GridControl.BeginInvoke(New Action(
|
||||
Sub()
|
||||
Try
|
||||
@@ -1171,7 +1270,9 @@ Namespace ControlCreator
|
||||
|
||||
Try
|
||||
Dim oResultTable As DataTable = DatabaseFallback.GetDatatable(
|
||||
New GetDatatableOptions(resolvedSql, DatabaseType.ECM))
|
||||
New GetDatatableOptions(resolvedSql, DatabaseType.ECM) With {
|
||||
.ConnectionId = oDefinition.ConnectionId
|
||||
})
|
||||
|
||||
If oResultTable IsNot Nothing AndAlso oResultTable.Rows.Count > 0 Then
|
||||
Dim oResult = oResultTable.Rows(0).Item(0)
|
||||
@@ -1202,6 +1303,18 @@ Namespace ControlCreator
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
' *** 5. Dynamische Editor-Invalidierung (visuell) ***
|
||||
Try
|
||||
Dim oView As GridView = TryCast(sender, GridView)
|
||||
If oView IsNot Nothing AndAlso e.Column IsNot Nothing Then
|
||||
If _DynamicEditorColumns.Contains(e.Column.FieldName) Then
|
||||
oView.InvalidateRow(e.RowHandle)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Sub
|
||||
''' <summary>
|
||||
@@ -1222,7 +1335,8 @@ Namespace ControlCreator
|
||||
isAdvancedLookup As Boolean) As RepositoryItem
|
||||
|
||||
Try
|
||||
_Logger.Debug("[CreateRowSpecificEditor] Executing SQL for column [{0}]: {1}", columnName, resolvedSql)
|
||||
If LOG_HOTSPOTS Then _Logger.Debug("[CreateRowSpecificEditor] Executing SQL for column [{0}]: {1}", columnName, resolvedSql)
|
||||
|
||||
|
||||
' SQL ausführen
|
||||
Dim oDataTable As DataTable = DatabaseFallback.GetDatatable(
|
||||
@@ -1235,7 +1349,12 @@ Namespace ControlCreator
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
_Logger.Debug("[CreateRowSpecificEditor] Retrieved {0} rows for column [{1}]", oDataTable.Rows.Count, columnName)
|
||||
If LOG_HOTSPOTS Then _Logger.Debug("[CreateRowSpecificEditor] Retrieved {0} rows for column [{1}]", oDataTable.Rows.Count, columnName)
|
||||
|
||||
' *** NEU: Log erste 5 Rows für Debugging ***
|
||||
For i As Integer = 0 To Math.Min(4, oDataTable.Rows.Count - 1)
|
||||
If LOG_HOTSPOTS Then _Logger.Debug("[CreateRowSpecificEditor] DataTable Row[{0}]: [{1}]", i, oDataTable.Rows(i)(0))
|
||||
Next
|
||||
|
||||
' Editor erstellen (analog zu GridTables_GetRepositoryItemForColumn)
|
||||
If isAdvancedLookup Then
|
||||
@@ -1244,6 +1363,8 @@ Namespace ControlCreator
|
||||
.ValueMember = oDataTable.Columns(0).ColumnName,
|
||||
.DataSource = oDataTable
|
||||
}
|
||||
_Logger.Debug("[CreateRowSpecificEditor] Created LookupControl3 with DisplayMember=[{0}], ValueMember=[{1}]",
|
||||
oEditor.DisplayMember, oEditor.ValueMember)
|
||||
Return oEditor
|
||||
Else
|
||||
Dim oEditor = New RepositoryItemComboBox()
|
||||
@@ -1269,8 +1390,10 @@ Namespace ControlCreator
|
||||
|
||||
oEditor.Items.Add(oValue)
|
||||
oItems.Add(oValue)
|
||||
If LOG_HOTSPOTS Then _Logger.Debug("[CreateRowSpecificEditor] Added ComboBox item: [{0}]", oValue)
|
||||
Next
|
||||
|
||||
_Logger.Debug("[CreateRowSpecificEditor] Created ComboBox with {0} items", oEditor.Items.Count)
|
||||
Return oEditor
|
||||
End If
|
||||
|
||||
@@ -1433,6 +1556,11 @@ Namespace ControlCreator
|
||||
End If
|
||||
|
||||
If isApplyingInheritedValue OrElse pArgs.RowHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
|
||||
If isApplyingInheritedValue Then
|
||||
_Logger.Debug("Currently applying inherited value for column {0} – skipping to prevent recursion.", pArgs.Column.FieldName)
|
||||
Else
|
||||
_Logger.Debug("Invalid RowHandle ({0}) – skipping HandleInheritedColumnValue.", pArgs.RowHandle)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -1476,9 +1604,9 @@ Namespace ControlCreator
|
||||
affectedRowsCount)
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
confirmMessage = String.Format(
|
||||
"Do you want to inherit the value '{0}' to {1} subsequent row(s)?",
|
||||
valueToApply,
|
||||
affectedRowsCount)
|
||||
"Do you want to inherit the value '{0}' to {1} subsequent row(s)?",
|
||||
valueToApply,
|
||||
affectedRowsCount)
|
||||
End If
|
||||
Dim confirmTitle As String = "Wertevererbung bestätigen"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
@@ -1534,9 +1662,14 @@ Namespace ControlCreator
|
||||
_Logger.Info("Skipping confirmation dialog (already confirmed {0} times)", confirmationEntry.Count)
|
||||
End If
|
||||
|
||||
' *** NEU: Cache-Keys sammeln WÄHREND der Vererbung ***
|
||||
Dim oCacheKeysToInvalidate As New List(Of String)
|
||||
|
||||
isApplyingInheritedValue = True
|
||||
Try
|
||||
_Logger.Info(String.Format("Inherit Value is active for column. So inheritting the value [{0}]...", valueToApply))
|
||||
_Logger.Info(String.Format("Inherit Value is active for column [{0}]. Inheriting value [{1}] to {2} rows...",
|
||||
pArgs.Column.FieldName, valueToApply, affectedRowsCount))
|
||||
|
||||
For dataIndex As Integer = listIndex + 1 To pView.DataRowCount - 1
|
||||
Dim targetHandle = pView.GetRowHandle(dataIndex)
|
||||
If targetHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle OrElse pView.IsGroupRow(targetHandle) Then
|
||||
@@ -1552,12 +1685,62 @@ Namespace ControlCreator
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' *** SCHRITT 1: Wert setzen ***
|
||||
pView.SetRowCellValue(targetHandle, pArgs.Column.FieldName, valueToApply)
|
||||
|
||||
' *** SCHRITT 2: Cache-Keys für DIESE Zeile sammeln ***
|
||||
' Finde alle dynamischen Spalten, die die geänderte Spalte via {#TBCOL#...} referenzieren
|
||||
For Each dynColName In _DynamicEditorColumns
|
||||
Dim oColDef As DataRow = pColumnDefinition.
|
||||
Select($"SPALTENNAME = '{dynColName}'").
|
||||
FirstOrDefault()
|
||||
|
||||
If oColDef Is Nothing Then Continue For
|
||||
|
||||
Dim oSqlCommand As String = oColDef.ItemEx("SQL_COMMAND", "")
|
||||
|
||||
' Prüfe ob SQL {#TBCOL#<ColumnName>} enthält
|
||||
If oSqlCommand.Contains($"{{#TBCOL#{pArgs.Column.FieldName}}}") Then
|
||||
' SQL auflösen mit NEUEM Wert (targetHandle!)
|
||||
Try
|
||||
Dim resolvedSql = ResolveSqlTemplate(oSqlCommand, pView, targetHandle)
|
||||
Dim cacheKey = $"{dynColName}|{resolvedSql.GetHashCode()}"
|
||||
|
||||
If Not oCacheKeysToInvalidate.Contains(cacheKey) Then
|
||||
oCacheKeysToInvalidate.Add(cacheKey)
|
||||
_Logger.Debug("[HandleInheritedColumnValue] Marked for invalidation: [{0}] (Row {1})",
|
||||
cacheKey, targetHandle)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error("[HandleInheritedColumnValue] Failed to resolve SQL for column [{0}], row {1}: {2}",
|
||||
dynColName, targetHandle, ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
' *** SCHRITT 3: Cache SOFORT invalidieren BEVOR Grid refresht wird ***
|
||||
If oCacheKeysToInvalidate.Count > 0 Then
|
||||
_Logger.Info("[HandleInheritedColumnValue] ♻️ Invalidating {0} cache entries BEFORE grid refresh...",
|
||||
oCacheKeysToInvalidate.Count)
|
||||
|
||||
SyncLock _DynamicEditorCacheShared
|
||||
For Each keyToRemove In oCacheKeysToInvalidate
|
||||
If _DynamicEditorCacheShared.ContainsKey(keyToRemove) Then
|
||||
_DynamicEditorCacheShared.Remove(keyToRemove)
|
||||
_Logger.Debug("[HandleInheritedColumnValue] ✓ Cache invalidated (IMMEDIATE): [{0}]", keyToRemove)
|
||||
End If
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
_Logger.Info("[HandleInheritedColumnValue] ✓ Cache invalidation complete. User can now click cells safely.")
|
||||
End If
|
||||
|
||||
Finally
|
||||
isApplyingInheritedValue = False
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub SetInheritanceConfirmationCount(columnName As String, newCount As Integer)
|
||||
Dim entries = UserInheritance_ConfirmationByColumn
|
||||
If entries Is Nothing Then
|
||||
|
||||
@@ -227,84 +227,71 @@
|
||||
<Reference Include="FormsUtils">
|
||||
<HintPath>M:\Bibliotheken\3rdParty\FormsUtils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.CAD, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14.CAD, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Common, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Common, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Document, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Document, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Email, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Email, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.HTML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.HTML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Imaging, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Imaging, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.Markdown, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.Markdown.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.PDF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.RTF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.PDF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.SVG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="GdPicture.NET.14.RTF, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.SVG, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Google.Protobuf, Version=3.33.2.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
@@ -329,11 +316,14 @@
|
||||
<Reference Include="Mail">
|
||||
<HintPath>M:\Bibliotheken\3rdParty\Limilabs\Mail.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Cryptography.9.0.0\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.HashCode, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
|
||||
@@ -342,6 +332,15 @@
|
||||
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NativeSDK.Exceptions, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Exceptions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NativeSDK.Settings, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NativeSDK.Settings.Edition, Version=14.4.4.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.4.4\lib\net462\NativeSDK.Settings.Edition.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -351,8 +350,8 @@
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenMcdf, Version=2.4.1.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll</HintPath>
|
||||
<Reference Include="OpenMcdf, Version=3.1.4.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenMcdf.3.1.4\lib\netstandard2.0\OpenMcdf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess, Version=4.122.21.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Oracle.ManagedDataAccess.21.15.0\lib\net462\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
@@ -367,14 +366,14 @@
|
||||
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.CodeDom, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.CodeDom.9.0.0\lib\net462\System.CodeDom.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.9.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||
<Reference Include="System.Collections.Immutable, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Collections.Immutable.10.0.5\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
@@ -389,53 +388,53 @@
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Formats.Asn1, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Formats.Asn1.9.0.0\lib\net462\System.Formats.Asn1.dll</HintPath>
|
||||
<Reference Include="System.Formats.Asn1, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Formats.Asn1.10.0.5\lib\net462\System.Formats.Asn1.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IdentityModel" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.IO.Packaging, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Packaging.9.0.0\lib\net462\System.IO.Packaging.dll</HintPath>
|
||||
<Reference Include="System.IO.Packaging, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Packaging.10.0.5\lib\net462\System.IO.Packaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
<Reference Include="System.IO.Pipelines, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.10.0.5\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
|
||||
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Pkcs.9.0.0\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||
<Reference Include="System.Security.Cryptography.Pkcs, Version=10.0.0.5, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Pkcs.10.0.5\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.10.0.5\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll</HintPath>
|
||||
<Reference Include="System.Text.Json, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.10.0.5\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.8.0.0\lib\net462\System.Threading.Channels.dll</HintPath>
|
||||
<Reference Include="System.Threading.Channels, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.10.0.5\lib\net462\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.6.1\lib\net462\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
@@ -1366,10 +1365,10 @@
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
|
||||
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.4.4\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
||||
@@ -70,7 +70,7 @@ Public Class clsPatterns
|
||||
''' </summary>
|
||||
Public Shared Sub ClearControlCache()
|
||||
_ControlLookupCache = Nothing
|
||||
LOGGER.Debug("Control cache cleared")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("Control cache cleared")
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Aktualisiert den Wert eines Controls im Cache
|
||||
@@ -122,7 +122,7 @@ Public Class clsPatterns
|
||||
LOGGER.Warn($"Unsupported control type for cache update: {ctrl.GetType.Name}")
|
||||
End Select
|
||||
|
||||
LOGGER.Debug($"Cache updated for control [{controlName}] with value type [{newValue?.GetType().Name}]")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"Cache updated for control [{controlName}] with value type [{newValue?.GetType().Name}]")
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@@ -144,7 +144,7 @@ Public Class clsPatterns
|
||||
UpdateControlInCache(kvp.Key, kvp.Value)
|
||||
Next
|
||||
|
||||
LOGGER.Debug($"Batch cache update completed for {updates.Count} controls")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"Batch cache update completed for {updates.Count} controls")
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Wraps a pattern-type and -value in the common format: {#type#value}
|
||||
@@ -175,9 +175,9 @@ Public Class clsPatterns
|
||||
|
||||
If Not IsNothing(oResult) Then
|
||||
oResult = ReplaceUserValues(oResult)
|
||||
LOGGER.Debug($"input AFTER replacing: [{oResult}]")
|
||||
End If
|
||||
|
||||
End If
|
||||
LOGGER.Debug($"input AFTER replacing: [{oResult}]")
|
||||
Return oResult
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
@@ -305,7 +305,7 @@ Public Class clsPatterns
|
||||
End SyncLock
|
||||
|
||||
Try
|
||||
LOGGER.Debug($"Starting ReplaceControlValues with input: [{oResult}] for document ID: {CURRENT_DOC_ID}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"Starting ReplaceControlValues with input: [{oResult}] for document ID: {CURRENT_DOC_ID}")
|
||||
Dim oTryCounter = 0
|
||||
|
||||
While ContainsPattern(oResult, PATTERN_CTRL)
|
||||
@@ -325,7 +325,7 @@ Public Class clsPatterns
|
||||
oColumnName = oSplitName.Last()
|
||||
End If
|
||||
|
||||
LOGGER.Debug("Found placeholder for control [{0}].", oControlName)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("Found placeholder for control [{0}].", oControlName)
|
||||
' Beim Cache-Zugriff Lock verwenden
|
||||
Dim oControl As Control = Nothing
|
||||
SyncLock _ControlLookupCache
|
||||
@@ -349,11 +349,11 @@ Public Class clsPatterns
|
||||
|
||||
If oControl IsNot Nothing Then
|
||||
Dim oReplaceValue As String
|
||||
LOGGER.Debug("oControl.GetType [{0}].", oControl.GetType.ToString)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("oControl.GetType [{0}].", oControl.GetType.ToString)
|
||||
Select Case oControl.GetType
|
||||
Case GetType(TextBox)
|
||||
oReplaceValue = oControl.Text
|
||||
LOGGER.Debug("TextBox- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("TextBox- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
Case GetType(TextEdit)
|
||||
Try
|
||||
oReplaceValue = ClassAllgemeineFunktionen.NotNullString(DirectCast(oControl, TextEdit).EditValue, String.Empty)
|
||||
@@ -361,7 +361,7 @@ Public Class clsPatterns
|
||||
LOGGER.Warn($"Error in ReplaceValue MemoEdit: {ex.Message}")
|
||||
oReplaceValue = ""
|
||||
End Try
|
||||
LOGGER.Debug("TextEdit- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("TextEdit- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
Case GetType(MemoEdit)
|
||||
Try
|
||||
oReplaceValue = ClassAllgemeineFunktionen.NotNullString(DirectCast(oControl, MemoEdit).EditValue, String.Empty)
|
||||
@@ -369,7 +369,7 @@ Public Class clsPatterns
|
||||
LOGGER.Warn($"Error in ReplaceValue MemoEdit: {ex.Message}")
|
||||
oReplaceValue = ""
|
||||
End Try
|
||||
LOGGER.Debug("MemoEdit- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("MemoEdit- oReplaceValue will be [{0}].", oReplaceValue)
|
||||
Case GetType(LookupControl3)
|
||||
Dim oLookupControl3 As LookupControl3 = oControl
|
||||
|
||||
@@ -391,7 +391,7 @@ Public Class clsPatterns
|
||||
oReplaceValue = ERROR_REPLACE_VALUE
|
||||
' ========== FIX END ==========
|
||||
ElseIf selectedValues.Count > 1 Then
|
||||
LOGGER.Debug($"LookupControl3 [{oControlName}] mit mehr als 1 Value")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"LookupControl3 [{oControlName}] mit mehr als 1 Value")
|
||||
Dim oIndex As Integer = 0
|
||||
For Each oString As String In selectedValues
|
||||
If oIndex = 0 Then
|
||||
@@ -403,12 +403,11 @@ Public Class clsPatterns
|
||||
Next
|
||||
oIsSQL = False
|
||||
Else ' Count = 1
|
||||
LOGGER.Debug($"LookupControl3 [{oControlName}] mit genau einem Value")
|
||||
If LOG_HOTSPOTS Then 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}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"oReplaceValue nach Durchlaufen selectedValues: {oReplaceValue}")
|
||||
|
||||
Case GetType(Windows.Forms.ComboBox)
|
||||
oReplaceValue = oControl.Text
|
||||
@@ -440,7 +439,7 @@ Public Class clsPatterns
|
||||
Case Else
|
||||
oReplaceValue = ERROR_REPLACE_VALUE
|
||||
End Select
|
||||
LOGGER.Debug($"[SQL-ESCAPE CHECK] Control: [{oControlName}], oReplaceValue Type: [{If(oReplaceValue?.GetType()?.Name, "NULL")}], Value: [{oReplaceValue}], IsSQL: [{oIsSQL}]")
|
||||
If LOG_HOTSPOTS Then 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
|
||||
@@ -468,7 +467,7 @@ Public Class clsPatterns
|
||||
End Try
|
||||
End Function
|
||||
Private Shared Function SafeSqlEscape(value As Object) As String
|
||||
LOGGER.Debug($"[SafeSqlEscape] Input Type: [{If(value?.GetType()?.Name, "NULL")}], Value: [{value}]")
|
||||
If LOG_HOTSPOTS Then 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")
|
||||
@@ -490,14 +489,14 @@ Public Class clsPatterns
|
||||
End If
|
||||
|
||||
Dim escaped = strValue.Replace("'", "''")
|
||||
LOGGER.Debug($"[SafeSqlEscape] Output: [{escaped}]")
|
||||
If LOG_HOTSPOTS Then 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
|
||||
LOGGER.Debug($"Starting ReplaceWindreamIndicies with input: [{oResult}] for document ID: {CURRENT_DOC_ID}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"Starting ReplaceWindreamIndicies with input: [{oResult}] for document ID: {CURRENT_DOC_ID}")
|
||||
While ContainsPattern(oResult, PATTERN_WMI)
|
||||
Dim oWMValue As String
|
||||
Dim oIndexName As String = GetNextPattern(oResult, PATTERN_WMI).Value
|
||||
@@ -517,9 +516,9 @@ Public Class clsPatterns
|
||||
|
||||
If oWMValue IsNot Nothing Then
|
||||
If pIsSQL = True Then
|
||||
LOGGER.Debug($"IS_SQL = True - oReplaceValue = {oWMValue}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"IS_SQL = True - oReplaceValue = {oWMValue}")
|
||||
oWMValue = oWMValue.ToString().Replace("'", "''")
|
||||
LOGGER.Debug($"oReplaceValue = {oWMValue}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"oReplaceValue = {oWMValue}")
|
||||
End If
|
||||
oResult = ReplacePattern(oResult, PATTERN_WMI, oWMValue)
|
||||
Else
|
||||
@@ -543,7 +542,7 @@ Public Class clsPatterns
|
||||
Try
|
||||
Dim result = input
|
||||
Dim oTryCounter As Integer = 0
|
||||
LOGGER.Debug($"Starting ReplaceIDBAttributes with input: [{result}] for document ID: {CURRENT_DOC_ID}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"Starting ReplaceIDBAttributes with input: [{result}] for document ID: {CURRENT_DOC_ID}")
|
||||
While ContainsPattern(result, PATTERN_IDBA)
|
||||
|
||||
Dim indexName As String = GetNextPattern(result, PATTERN_IDBA).Value
|
||||
@@ -568,7 +567,7 @@ Public Class clsPatterns
|
||||
If oIDBValue IsNot Nothing Or Not IsDBNull(oIDBValue) Then
|
||||
Dim oReplaceValue = "{" + $"#{PATTERN_IDBA}#{indexName}" + "}"
|
||||
If IS_SQL = True Then
|
||||
LOGGER.Debug($"IS_SQL = True - oReplaceValue = [{oReplaceValue}]")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"IS_SQL = True - oReplaceValue = [{oReplaceValue}]")
|
||||
If indexName <> "ObjectID" And indexName <> "OBJID" And indexName <> "DocID" Then
|
||||
Try
|
||||
oIDBValue = oIDBValue.Replace("'", "''")
|
||||
@@ -578,7 +577,7 @@ Public Class clsPatterns
|
||||
End Try
|
||||
|
||||
End If
|
||||
LOGGER.Debug($"oIDBValue = {oIDBValue}")
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug($"oIDBValue = {oIDBValue}")
|
||||
End If
|
||||
result = result.Replace(oReplaceValue, oIDBValue)
|
||||
Else
|
||||
@@ -590,7 +589,7 @@ Public Class clsPatterns
|
||||
' Increase counter by 10 to avoid DDOSing the Database/IDB Service
|
||||
oTryCounter += 10
|
||||
End While
|
||||
LOGGER.Debug("sql after ReplaceIDBAttributes: " & input)
|
||||
If LOG_HOTSPOTS Then LOGGER.Debug("sql after ReplaceIDBAttributes: " & input)
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
|
||||
@@ -195,7 +195,10 @@ Public Class frmColumn_Detail
|
||||
CURRENT_INDEX_ID = GUIDTextBox.Text
|
||||
Dim oForm2 As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
||||
.SQLCommand = SQL_COMMANDTextBox.Text,
|
||||
.SQLConnection = 0
|
||||
.SQLConnection = 0,
|
||||
.PlaceholdersManualPrefix = "CTRL",
|
||||
.PlaceholdersManualTitle = "Controls",
|
||||
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||
}
|
||||
oForm2.ShowDialog()
|
||||
|
||||
@@ -241,7 +244,10 @@ Public Class frmColumn_Detail
|
||||
CURRENT_INDEX_ID = GUIDTextBox.Text
|
||||
Dim oForm2 As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
|
||||
.SQLCommand = FORMULA_SQLTextBox.Text,
|
||||
.SQLConnection = 0
|
||||
.SQLConnection = 0,
|
||||
.PlaceholdersManualPrefix = "CTRL",
|
||||
.PlaceholdersManualTitle = "Controls",
|
||||
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
|
||||
}
|
||||
oForm2.ShowDialog()
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ Public Class frmFormDesigner
|
||||
Dim oDTColumnsPerDevExGrid As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "FDesignLaodControls")
|
||||
|
||||
|
||||
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True, "EUR")
|
||||
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True, "EUR", Panel1)
|
||||
|
||||
AddHandler table.MouseClick, AddressOf gridControl_MouseClick
|
||||
' AddHandler table.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick
|
||||
|
||||
@@ -354,7 +354,7 @@ Public Class frmMassValidator
|
||||
LOGGER.Debug("Versuch Tabelle zu laden")
|
||||
Dim oDTMyColumns As DataTable = DatabaseFallback.GetDatatableECM($"SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = {oControlRow.Item("GUID")} ORDER BY SEQUENCE") ', "MV_LoadControls1")
|
||||
|
||||
oControl = ControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False, CURRENT_DOC_CURRENCY)
|
||||
oControl = ControlCreator.CreateExistingGridControl(oControlRow, oDTMyColumns, False, CURRENT_DOC_CURRENCY, pnldesigner)
|
||||
End Select
|
||||
|
||||
If oControl IsNot Nothing AndAlso TypeOf oControl IsNot Label Then
|
||||
|
||||
@@ -1675,7 +1675,7 @@ Public Class frmValidator
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, DocCurrency)
|
||||
Dim oGrid = ControlCreator.CreateExistingGridControl(oControlRow, oFilteredDatatable, False, DocCurrency, PanelValidatorControl)
|
||||
oMyControl = oGrid
|
||||
' NEU: GridView Event registrieren
|
||||
AddHandler DirectCast(oGrid.MainView, GridView).CellValueChanged, AddressOf GridView_CellValueChanged
|
||||
@@ -4195,6 +4195,9 @@ Public Class frmValidator
|
||||
DocCurrency = oCurrency
|
||||
MyValidationLogger.Info($"[FINAL] DocCurrency = [{DocCurrency}]")
|
||||
|
||||
taskFLOW.ControlCreator.GridControl.ClearDynamicEditorCache()
|
||||
taskFLOW.ControlCreator.GridControl.ResetCurrencySymbolCache()
|
||||
|
||||
Catch ex As Exception
|
||||
MyValidationLogger.Error($"Währungsladung fehlgeschlagen: {ex.Message}")
|
||||
DocCurrency = "EUR"
|
||||
@@ -4447,7 +4450,7 @@ Public Class frmValidator
|
||||
End If
|
||||
|
||||
' GridControl-Helper erstellen und Währungsformat aktualisieren
|
||||
Dim oGridControlHelper As New ControlCreator.GridControl(LOGCONFIG, ControlCreator.GridTables, currencySymbol)
|
||||
Dim oGridControlHelper As New ControlCreator.GridControl(LOGCONFIG, ControlCreator.GridTables, currencySymbol, PanelValidatorControl)
|
||||
oGridControlHelper.UpdateCurrencyFormat(oColumnTable, oView, oGrid, currencySymbol)
|
||||
|
||||
MyValidationLogger.Info("[UpdateGridCurrencyFormats] ✓ Updated GridControl [{0}] to currency [{1}]", oGrid.Name, DocCurrency)
|
||||
@@ -8816,4 +8819,8 @@ Public Class frmValidator
|
||||
CONFIG.Config.NOTES_ONCLICK = bchkitmNotes.Checked
|
||||
CONFIG.Save()
|
||||
End Sub
|
||||
|
||||
Private Sub frmValidator_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -5,12 +5,13 @@
|
||||
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
|
||||
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
||||
<package id="GdPicture" version="14.4.4" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.4.4" targetFramework="net462" />
|
||||
<package id="Google.Protobuf" version="3.33.2" targetFramework="net462" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.5" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.Cryptography" version="10.0.5" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
|
||||
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
|
||||
@@ -18,27 +19,27 @@
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
<package id="OpenMcdf" version="2.4.1" targetFramework="net462" />
|
||||
<package id="OpenMcdf" version="3.1.4" targetFramework="net462" />
|
||||
<package id="Oracle.ManagedDataAccess" version="21.15.0" targetFramework="net462" />
|
||||
<package id="protobuf-net" version="3.2.46" targetFramework="net462" />
|
||||
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
|
||||
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
|
||||
<package id="S22.Imap" version="3.6.0.0" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.6.1" targetFramework="net462" />
|
||||
<package id="System.CodeDom" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Collections.Immutable" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Collections.Immutable" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
|
||||
<package id="System.Formats.Asn1" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.IO.Packaging" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.IO.Pipelines" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Formats.Asn1" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.IO.Packaging" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.IO.Pipelines" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Management" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
||||
<package id="System.Security.Cryptography.Pkcs" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Channels" version="8.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.6.3" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net462" />
|
||||
<package id="System.Security.Cryptography.Pkcs" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Threading.Channels" version="10.0.5" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user