Compare commits
10 Commits
e086c5db14
...
Release-Sp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
969e07eb17 | ||
|
|
7629d54fe1 | ||
|
|
41e46f9dbb | ||
|
|
a192267d96 | ||
|
|
a0d3a487d8 | ||
|
|
54744a0531 | ||
|
|
743ef3fe22 | ||
|
|
25dcfb2061 | ||
|
|
3e34b52c6f | ||
|
|
950aeba89e |
@@ -69,6 +69,8 @@ Public Class ClassControlCreator
|
|||||||
Public Property GridTables As New Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))
|
Public Property GridTables As New Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))
|
||||||
Public Property GridColumns As New Dictionary(Of Integer, DataTable)
|
Public Property GridColumns As New Dictionary(Of Integer, DataTable)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Standard Eigenschaften für alle Controls
|
''' Standard Eigenschaften für alle Controls
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -533,12 +535,11 @@ Public Class ClassControlCreator
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function CreateExistingGridControl(row As DataRow, DT_MY_COLUMNS As DataTable, designMode As Boolean, pcurrencySymbol As String) As GridControl
|
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)
|
Dim oGridControlCreator = New ControlCreator.GridControl(LogConfig, GridTables, pcurrencySymbol)
|
||||||
Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode)
|
Dim oControl As GridControl = CreateBaseControl(New GridControl(), row, designMode)
|
||||||
Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid
|
Dim oControlId = DirectCast(oControl.Tag, ControlMetadata).Guid
|
||||||
Dim oView As GridView
|
Dim oView As GridView
|
||||||
Dim oControlName = oControl.Name
|
Dim oControlName = oControl.Name
|
||||||
|
|
||||||
oControl.ForceInitialize()
|
oControl.ForceInitialize()
|
||||||
|
|
||||||
oView = oControl.MainView
|
oView = oControl.MainView
|
||||||
@@ -635,9 +636,13 @@ Public Class ClassControlCreator
|
|||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oGridControlCreator.ConfigureViewColumns(DT_MY_COLUMNS, oView, oControl, pcurrencySymbol)
|
' *** KORRIGIERT: ConfigureViewColumns OHNE currencySymbol-Parameter ***
|
||||||
|
oGridControlCreator.ConfigureViewColumns(DT_MY_COLUMNS, oView, oControl)
|
||||||
|
|
||||||
|
' *** NEU: ConfigureViewColumnsCurrency() für editierbare Währungsspalten ***
|
||||||
|
oGridControlCreator.ConfigureViewColumnsCurrency(DT_MY_COLUMNS, oView, oControl)
|
||||||
|
|
||||||
oGridControlCreator.ConfigureViewEvents(DT_MY_COLUMNS, oView, oControl, oControlId)
|
oGridControlCreator.ConfigureViewEvents(DT_MY_COLUMNS, oView, oControl, oControlId)
|
||||||
' 08.11.2021: Fix editor being empty on first open
|
|
||||||
oView.FocusInvalidRow()
|
oView.FocusInvalidRow()
|
||||||
|
|
||||||
Return oControl
|
Return oControl
|
||||||
|
|||||||
@@ -28,6 +28,99 @@ Public Class ClassFormat
|
|||||||
|
|
||||||
End Select
|
End Select
|
||||||
End Function
|
End Function
|
||||||
|
''' <summary>
|
||||||
|
''' Normalisiert einen numerischen String für die invariante Kultur-Konvertierung.
|
||||||
|
''' Entfernt Tausendertrennzeichen und ersetzt Dezimaltrennzeichen durch Punkt.
|
||||||
|
''' </summary>
|
||||||
|
Private Shared Function NormalizeNumericString(pValue As String) As String
|
||||||
|
If String.IsNullOrWhiteSpace(pValue) Then
|
||||||
|
Return pValue
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim normalized As String = pValue.Trim()
|
||||||
|
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Input: [{pValue}]")
|
||||||
|
|
||||||
|
' Entferne Währungssymbole und Leerzeichen
|
||||||
|
normalized = System.Text.RegularExpressions.Regex.Replace(normalized, "[€$£¥\s]", "")
|
||||||
|
|
||||||
|
Dim hasDot As Boolean = normalized.Contains(".")
|
||||||
|
Dim hasComma As Boolean = normalized.Contains(",")
|
||||||
|
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] After cleanup: [{normalized}], HasDot={hasDot}, HasComma={hasComma}")
|
||||||
|
|
||||||
|
If hasDot AndAlso hasComma Then
|
||||||
|
' Beide vorhanden: Das letzte ist der Dezimaltrenner
|
||||||
|
Dim lastDotPos As Integer = normalized.LastIndexOf(".")
|
||||||
|
Dim lastCommaPos As Integer = normalized.LastIndexOf(",")
|
||||||
|
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Both separators found: LastDotPos={lastDotPos}, LastCommaPos={lastCommaPos}")
|
||||||
|
|
||||||
|
If lastDotPos > lastCommaPos Then
|
||||||
|
normalized = normalized.Replace(",", "")
|
||||||
|
Else
|
||||||
|
normalized = normalized.Replace(".", "").Replace(",", ".")
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf hasComma Then
|
||||||
|
Dim commaCount As Integer = normalized.Count(Function(c) c = ","c)
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Only comma found: CommaCount={commaCount}")
|
||||||
|
|
||||||
|
If commaCount = 1 Then
|
||||||
|
Dim lastCommaPos As Integer = normalized.LastIndexOf(",")
|
||||||
|
Dim digitsAfterComma As Integer = normalized.Length - lastCommaPos - 1
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Single comma: DigitsAfterComma={digitsAfterComma}")
|
||||||
|
|
||||||
|
If digitsAfterComma <= 3 Then
|
||||||
|
normalized = normalized.Replace(",", ".")
|
||||||
|
Else
|
||||||
|
normalized = normalized.Replace(",", "")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
normalized = normalized.Replace(",", "")
|
||||||
|
End If
|
||||||
|
|
||||||
|
ElseIf hasDot Then
|
||||||
|
Dim dotCount As Integer = normalized.Count(Function(c) c = "."c)
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Only dot found: DotCount={dotCount}")
|
||||||
|
|
||||||
|
If dotCount = 1 Then
|
||||||
|
Dim lastDotPos As Integer = normalized.LastIndexOf(".")
|
||||||
|
Dim digitsAfterDot As Integer = normalized.Length - lastDotPos - 1
|
||||||
|
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Single dot: DigitsAfterDot={digitsAfterDot}")
|
||||||
|
|
||||||
|
' ✅ KRITISCHE ÄNDERUNG: Prüfe auch Stellen VOR dem Punkt
|
||||||
|
Dim digitsBeforeDot As Integer = lastDotPos
|
||||||
|
|
||||||
|
' Heuristik: Wenn <= 3 Stellen nach Punkt UND >= 1 Stelle davor → Dezimaltrenner
|
||||||
|
' Wenn > 3 Stellen davor UND <= 3 Stellen nach Punkt → unklar, vermutlich Dezimal
|
||||||
|
' Wenn > 3 Stellen nach Punkt → definitiv KEIN Dezimaltrenner
|
||||||
|
|
||||||
|
If digitsAfterDot > 3 Then
|
||||||
|
LOGGER.Warn($"⚠️ [NormalizeNumericString] Dot with {digitsAfterDot} digits after → treating as THOUSAND separator!")
|
||||||
|
normalized = normalized.Replace(".", "")
|
||||||
|
ElseIf digitsAfterDot >= 1 AndAlso digitsAfterDot <= 3 Then
|
||||||
|
' Wahrscheinlich Dezimaltrenner (z.B. 5464.17 oder 120.5)
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Dot treated as decimal separator ({digitsBeforeDot} digits before, {digitsAfterDot} after)")
|
||||||
|
Else
|
||||||
|
' digitsAfterDot = 0 → Punkt am Ende, vermutlich Fehler
|
||||||
|
LOGGER.Warn($"⚠️ [NormalizeNumericString] Dot at end of string → removing")
|
||||||
|
normalized = normalized.Replace(".", "")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
' Mehrere Punkte → Tausendertrenner
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Multiple dots → removing all")
|
||||||
|
normalized = normalized.Replace(".", "")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] No separators found → integer or already normalized")
|
||||||
|
End If
|
||||||
|
|
||||||
|
LOGGER.Debug($"[NormalizeNumericString] Output: [{normalized}]")
|
||||||
|
|
||||||
|
Return normalized
|
||||||
|
End Function
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Converts a string according to the type information, using the invariant culture
|
''' Converts a string according to the type information, using the invariant culture
|
||||||
@@ -41,25 +134,40 @@ Public Class ClassFormat
|
|||||||
|
|
||||||
Select Case pType
|
Select Case pType
|
||||||
Case ClassControlCreator.CONTROL_TYPE_DOUBLE
|
Case ClassControlCreator.CONTROL_TYPE_DOUBLE
|
||||||
If Double.TryParse(pValue, NumberStyles.Float, CultureInfo.InvariantCulture, oConvertedValue) Then
|
|
||||||
Return oConvertedValue
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case ClassControlCreator.CONTROL_TYPE_CURRENCY
|
|
||||||
Try
|
Try
|
||||||
LOGGER.Debug($"GetConvertedValue: Converting {pValue.ToString} to Currency ")
|
' ✅ IMMER normalisieren – auch für DB-Werte!
|
||||||
If Double.TryParse(pValue, NumberStyles.Currency, CultureInfo.InvariantCulture, oConvertedValue) Then
|
Dim normalizedValue As String = NormalizeNumericString(pValue?.ToString())
|
||||||
|
If Double.TryParse(normalizedValue, NumberStyles.Float, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||||
Return oConvertedValue
|
Return oConvertedValue
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
Case ClassControlCreator.CONTROL_TYPE_CURRENCY
|
||||||
|
Try
|
||||||
|
' ✅ KRITISCH: Normalisierung VOR Konvertierung
|
||||||
|
Dim normalizedValue As String = NormalizeNumericString(pValue?.ToString())
|
||||||
|
LOGGER.Debug($"GetConvertedValue CURRENCY: Original=[{pValue}], Normalized=[{normalizedValue}]")
|
||||||
|
|
||||||
|
If Double.TryParse(normalizedValue, NumberStyles.Float, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||||
|
Return oConvertedValue
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error($"Currency conversion failed for [{pValue}]: {ex.Message}")
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
Case ClassControlCreator.CONTROL_TYPE_INTEGER
|
Case ClassControlCreator.CONTROL_TYPE_INTEGER
|
||||||
If Integer.TryParse(pValue, NumberStyles.Integer, CultureInfo.InvariantCulture, oConvertedValue) Then
|
Try
|
||||||
Return oConvertedValue
|
Dim normalizedValue As String = NormalizeNumericString(pValue?.ToString())
|
||||||
End If
|
If Integer.TryParse(normalizedValue, NumberStyles.Integer, CultureInfo.InvariantCulture, oConvertedValue) Then
|
||||||
|
Return oConvertedValue
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
LOGGER.Debug($"GetConvertedValue - Case ELSE - pType is {pType}")
|
LOGGER.Debug($"GetConvertedValue - Case ELSE - pType is {pType}")
|
||||||
Try
|
Try
|
||||||
@@ -68,7 +176,6 @@ Public Class ClassFormat
|
|||||||
LOGGER.Warn($"Error in GetConvertedValue: pType is {pType} - converting value to String")
|
LOGGER.Warn($"Error in GetConvertedValue: pType is {pType} - converting value to String")
|
||||||
oConvertedValue = ""
|
oConvertedValue = ""
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Return oConvertedValue
|
Return oConvertedValue
|
||||||
@@ -76,26 +183,32 @@ Public Class ClassFormat
|
|||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Converts values to their respective data type and then back to string
|
''' Converts values to their respective data type and then back to string
|
||||||
''' according to the current culture
|
''' using INVARIANT culture for consistency across systems.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <param name="pValue"></param>
|
''' <param name="pValue"></param>
|
||||||
''' <returns></returns>
|
''' <returns></returns>
|
||||||
Public Shared Function GetStringValue(pValue As Object) As String
|
Public Shared Function GetStringValue(pValue As Object) As String
|
||||||
|
' ✅ FIX: Immer InvariantCulture verwenden für DB-Speicherung
|
||||||
Select Case pValue.GetType
|
Select Case pValue.GetType
|
||||||
Case GetType(Single)
|
Case GetType(Single)
|
||||||
Return DirectCast(pValue, Single).ToString(CultureInfo.CurrentCulture)
|
' ✅ NEU: InvariantCulture statt CurrentCulture
|
||||||
|
Return DirectCast(pValue, Single).ToString(CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
Case GetType(Double)
|
Case GetType(Double)
|
||||||
Return DirectCast(pValue, Double).ToString(CultureInfo.CurrentCulture)
|
' ✅ NEU: InvariantCulture statt CurrentCulture
|
||||||
|
Return DirectCast(pValue, Double).ToString(CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
Case GetType(Decimal)
|
Case GetType(Decimal)
|
||||||
Return DirectCast(pValue, Decimal).ToString(CultureInfo.CurrentCulture)
|
' ✅ NEU: InvariantCulture statt CurrentCulture
|
||||||
|
Return DirectCast(pValue, Decimal).ToString(CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
Case GetType(Date)
|
Case GetType(Date)
|
||||||
Return DirectCast(pValue, Date).ToString(CultureInfo.CurrentCulture)
|
' Datum: ISO 8601 Format für Culture-Unabhängigkeit
|
||||||
|
Return DirectCast(pValue, Date).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
Case GetType(DateTime)
|
Case GetType(DateTime)
|
||||||
Return DirectCast(pValue, DateTime).ToString(CultureInfo.CurrentCulture)
|
' DateTime: ISO 8601 Format
|
||||||
|
Return DirectCast(pValue, DateTime).ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return pValue.ToString
|
Return pValue.ToString
|
||||||
|
|||||||
@@ -1,5 +1,75 @@
|
|||||||
Public Class ClassIDBData
|
Public Class ClassIDBData
|
||||||
Public DTVWIDB_BE_ATTRIBUTE As DataTable
|
Public DTVWIDB_BE_ATTRIBUTE As DataTable
|
||||||
|
Public IDBSystemIndices As List(Of String)
|
||||||
|
''' <summary>
|
||||||
|
''' Wenn True, werden SQL-Statements nicht sofort ausgeführt,
|
||||||
|
''' sondern in <see cref="_sqlBatch"/> gesammelt.
|
||||||
|
''' </summary>
|
||||||
|
Public Property BatchMode As Boolean = False
|
||||||
|
Private _sqlBatch As New List(Of String)
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Startet den Batch-Sammelmodus.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub BeginBatch()
|
||||||
|
_sqlBatch.Clear()
|
||||||
|
BatchMode = True
|
||||||
|
End Sub
|
||||||
|
''' <summary>
|
||||||
|
''' Führt alle gesammelten SQL-Statements als einen einzigen String
|
||||||
|
''' an ExecuteNonQueryIDB weiter. Jeder Block wird in BEGIN...END
|
||||||
|
''' gekapselt, damit DECLARE-Variablen nicht kollidieren.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns>True wenn erfolgreich</returns>
|
||||||
|
Public Function CommitBatch() As Boolean
|
||||||
|
BatchMode = False
|
||||||
|
If _sqlBatch.Count = 0 Then Return True
|
||||||
|
Try
|
||||||
|
Dim oStatements = _sqlBatch.
|
||||||
|
Where(Function(s) Not String.IsNullOrWhiteSpace(s)).
|
||||||
|
ToList()
|
||||||
|
|
||||||
|
' @NEW_OBJ_MD_ID pro Statement eindeutig umbenennen → kein Namenskonflikt im Batch
|
||||||
|
Dim oNumberedStatements As New List(Of String)
|
||||||
|
Dim oIndex As Integer = 0
|
||||||
|
For Each oStatement As String In oStatements
|
||||||
|
Dim oNumbered = oStatement.Replace("@NEW_OBJ_MD_ID", $"@NEW_OBJ_MD_ID_{oIndex}")
|
||||||
|
oNumberedStatements.Add(oNumbered)
|
||||||
|
oIndex += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim oBatchSQL = String.Join(vbNewLine, oNumberedStatements)
|
||||||
|
LOGGER.Debug($"⚡ CommitBatch - Executing {oStatements.Count} statements as one batch:{vbNewLine}{oBatchSQL}")
|
||||||
|
Dim oResult = DatabaseFallback.ExecuteNonQueryIDB(oBatchSQL)
|
||||||
|
_sqlBatch.Clear()
|
||||||
|
Return oResult
|
||||||
|
Catch ex As Exception
|
||||||
|
LOGGER.Error(ex)
|
||||||
|
_sqlBatch.Clear()
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Verwirft alle gesammelten Statements ohne Ausführung.
|
||||||
|
''' </summary>
|
||||||
|
Public Sub RollbackBatch()
|
||||||
|
_sqlBatch.Clear()
|
||||||
|
BatchMode = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Führt ein SQL-Statement aus – sofort oder gesammelt je nach BatchMode.
|
||||||
|
''' </summary>
|
||||||
|
Private Function ExecuteOrQueue(oSQL As String) As Boolean
|
||||||
|
If BatchMode Then
|
||||||
|
_sqlBatch.Add(oSQL)
|
||||||
|
LOGGER.Debug($"BatchMode - Queued statement: {oSQL}")
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return DatabaseFallback.ExecuteNonQueryIDB(oSQL)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Gets all indices by BusinessEntity.
|
''' Gets all indices by BusinessEntity.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -7,15 +77,16 @@
|
|||||||
''' <returns>Array with all Indices</returns>
|
''' <returns>Array with all Indices</returns>
|
||||||
''' <remarks></remarks>
|
''' <remarks></remarks>
|
||||||
'''
|
'''
|
||||||
Public Function Init()
|
Public Function Init() As Boolean
|
||||||
Dim oSQL = $"SELECT DISTINCT ATTR_TITLE, TYP_ID, TYP_ID as [TYPE_ID] FROM VWIDB_BE_ATTRIBUTE WHERE SYS_ATTRIBUTE = 0 ORDER BY ATTR_TITLE"
|
Dim oSQL = $"SELECT DISTINCT ATTR_TITLE, TYP_ID, TYP_ID as [TYPE_ID] FROM VWIDB_BE_ATTRIBUTE WHERE SYS_ATTRIBUTE = 0 ORDER BY ATTR_TITLE"
|
||||||
DTVWIDB_BE_ATTRIBUTE = DatabaseFallback.GetDatatableIDB(oSQL)
|
DTVWIDB_BE_ATTRIBUTE = DatabaseFallback.GetDatatableIDB(oSQL)
|
||||||
If IsNothing(DTVWIDB_BE_ATTRIBUTE) Then
|
If IsNothing(DTVWIDB_BE_ATTRIBUTE) Then
|
||||||
oSQL = $"SELECT DISTINCT ATTR_TITLE, TYP_ID, TYP_ID as [TYPE_ID] FROM VWIDB_BE_ATTRIBUTE ORDER BY ATTR_TITLE "
|
oSQL = $"SELECT DISTINCT ATTR_TITLE, TYP_ID, TYP_ID as [TYPE_ID] FROM VWIDB_BE_ATTRIBUTE ORDER BY ATTR_TITLE "
|
||||||
DTVWIDB_BE_ATTRIBUTE = DatabaseFallback.GetDatatableIDB(oSQL)
|
DTVWIDB_BE_ATTRIBUTE = DatabaseFallback.GetDatatableIDB(oSQL)
|
||||||
End If
|
End If
|
||||||
|
Return True
|
||||||
End Function
|
End Function
|
||||||
Public IDBSystemIndices As List(Of String)
|
|
||||||
Public Function GetIndicesByBE(ByVal BusinessEntity As String) As String()
|
Public Function GetIndicesByBE(ByVal BusinessEntity As String) As String()
|
||||||
Try
|
Try
|
||||||
Dim aNames(4) As String
|
Dim aNames(4) As String
|
||||||
@@ -118,7 +189,7 @@
|
|||||||
LOGGER.Debug($"oAttributeValue for Attribute [{oAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ")
|
LOGGER.Debug($"oAttributeValue for Attribute [{oAttributeName}] is so far nothing..Now trying FNIDB_PM_GET_VARIABLE_VALUE ")
|
||||||
End If
|
End If
|
||||||
Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({CURRENT_DOC_ID},'{oAttributeName}','{USER_LANGUAGE}',CONVERT(BIT,'{IDB_USES_WMFILESTORE}'))"
|
Dim oFNSQL = $"SELECT * FROM [dbo].[FNIDB_PM_GET_VARIABLE_VALUE] ({CURRENT_DOC_ID},'{oAttributeName}','{USER_LANGUAGE}',CONVERT(BIT,'{IDB_USES_WMFILESTORE}'))"
|
||||||
LOGGER.Debug($"GetVariableValue: {oFNSQL}")
|
LOGGER.Debug($": {oFNSQL}")
|
||||||
oAttributeValue = DatabaseFallback.GetDatatableIDB(oFNSQL)
|
oAttributeValue = DatabaseFallback.GetDatatableIDB(oFNSQL)
|
||||||
Dim odt As DataTable = oAttributeValue
|
Dim odt As DataTable = oAttributeValue
|
||||||
If odt.Rows.Count = 1 Then
|
If odt.Rows.Count = 1 Then
|
||||||
@@ -138,10 +209,11 @@
|
|||||||
If IDB_USES_WMFILESTORE Then
|
If IDB_USES_WMFILESTORE Then
|
||||||
oID_IS_FOREIGN = 1
|
oID_IS_FOREIGN = 1
|
||||||
End If
|
End If
|
||||||
|
oTerm2Delete = oTerm2Delete.Replace("'", "''")
|
||||||
Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {CURRENT_DOC_ID},'{oAttributeName}','{oTerm2Delete}','{USER_USERNAME}','{USER_LANGUAGE}',{oID_IS_FOREIGN}"
|
Dim oDELSQL = $"EXEC PRIDB_DELETE_TERM_OBJECT_METADATA {CURRENT_DOC_ID},'{oAttributeName}','{oTerm2Delete}','{USER_USERNAME}','{USER_LANGUAGE}',{oID_IS_FOREIGN};"
|
||||||
DatabaseFallback.ExecuteNonQueryIDB(oDELSQL)
|
LOGGER.Debug($"Delete_Term_Object_From_Metadata: {oDELSQL}")
|
||||||
|
'DatabaseFallback.ExecuteNonQueryIDB(oDELSQL)
|
||||||
|
Return ExecuteOrQueue(oDELSQL)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@@ -150,9 +222,10 @@
|
|||||||
End Function
|
End Function
|
||||||
Public Function Delete_AttributeData(pIDB_OBJID As Int64, pAttributeName As String) As Object
|
Public Function Delete_AttributeData(pIDB_OBJID As Int64, pAttributeName As String) As Object
|
||||||
Try
|
Try
|
||||||
Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pIDB_OBJID},'{pAttributeName}','{USER_USERNAME}'"
|
Dim oDELSQL = $"EXEC PRIDB_DELETE_ATTRIBUTE_DATA {pIDB_OBJID},'{pAttributeName}','{USER_USERNAME}';"
|
||||||
DatabaseFallback.ExecuteNonQueryIDB(oDELSQL)
|
LOGGER.Debug($"Delete_Attribute_Data: {oDELSQL}")
|
||||||
|
' DatabaseFallback.ExecuteNonQueryIDB(oDELSQL)
|
||||||
|
Return ExecuteOrQueue(oDELSQL)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@@ -162,18 +235,23 @@
|
|||||||
|
|
||||||
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0)
|
Public Function SetVariableValue(oAttributeName As String, oNewValue As Object, Optional CheckDeleted As Boolean = False, Optional oIDBTyp As Integer = 0)
|
||||||
Try
|
Try
|
||||||
|
Dim omsg = $"IDBData - SetVariableValue - Attribute: [{oAttributeName}] - NewValue: [{oNewValue}] - CheckDeleted: [{CheckDeleted.ToString}] - oIDBTyp: [{oIDBTyp}]"
|
||||||
|
LOGGER.Debug(omsg)
|
||||||
Dim omytype = oNewValue.GetType.ToString
|
Dim omytype = oNewValue.GetType.ToString
|
||||||
If omytype = "System.Data.DataTable" Then
|
If omytype = "System.Data.DataTable" Then
|
||||||
Dim oDTMyNewValues As DataTable = oNewValue
|
Dim oDTMyNewValues As DataTable = oNewValue
|
||||||
Dim oOldAttributeResult
|
Dim oAttributeResultFromDB
|
||||||
Dim oTypeOldResult
|
Dim oTypeOldResult
|
||||||
|
' Für DataTable (Mehrfachauswahl/Vektor) IMMER auf gelöschte Werte prüfen,
|
||||||
|
' unabhängig vom übergebenen CheckDeleted-Parameter.
|
||||||
|
Dim oEffectiveCheckDeleted As Boolean = True
|
||||||
|
|
||||||
If CheckDeleted = True Then
|
If oEffectiveCheckDeleted = True Then
|
||||||
oOldAttributeResult = GetVariableValue(oAttributeName, oIDBTyp)
|
oAttributeResultFromDB = GetVariableValue(oAttributeName, oIDBTyp)
|
||||||
oTypeOldResult = oOldAttributeResult.GetType.ToString
|
oTypeOldResult = oAttributeResultFromDB.GetType.ToString
|
||||||
If oTypeOldResult = "System.Data.DataTable" Then
|
If TypeOf oAttributeResultFromDB Is DataTable Then
|
||||||
Dim myOldValues As DataTable = oOldAttributeResult
|
Dim myOldValues As DataTable = oAttributeResultFromDB
|
||||||
If myOldValues.Rows.Count > 1 Then
|
If myOldValues.Rows.Count >= 1 Then
|
||||||
|
|
||||||
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
'now Checking whether the old row still remains in Vector? If not it will be deleted as it cannot be replaced in multivalues
|
||||||
For Each oOldValueRow As DataRow In myOldValues.Rows
|
For Each oOldValueRow As DataRow In myOldValues.Rows
|
||||||
@@ -199,27 +277,26 @@
|
|||||||
'### Old Value is a single value ###
|
'### Old Value is a single value ###
|
||||||
If oDTMyNewValues.Rows.Count > 1 Then
|
If oDTMyNewValues.Rows.Count > 1 Then
|
||||||
'### there is more than one new value ###
|
'### there is more than one new value ###
|
||||||
Dim oExists As Boolean
|
Dim oExists As Boolean = False
|
||||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||||
oExists = False
|
LOGGER.Debug($"Checking oldValue[{oAttributeResultFromDB}] vs NewValue [{oNewValueRow.Item(1)}]")
|
||||||
Dim oInfo1 = $"Checking oldValue[{oOldAttributeResult}] vs NewValue [{oNewValueRow.Item(1)}]"
|
If oNewValueRow.Item(1).ToString.ToUpper = oAttributeResultFromDB.ToString.ToUpper Then
|
||||||
If oNewValueRow.Item(1).ToString.ToUpper = oOldAttributeResult.ToString.ToUpper Then
|
|
||||||
oExists = True
|
oExists = True
|
||||||
|
Exit For ' ← sobald gefunden, abbrechen
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
If oExists = False Then
|
If oExists = False Then
|
||||||
Dim oInfo2 = $"Value [{oOldAttributeResult}] no longer existing in Vector-Attribute [{oAttributeName}] - will be deleted!"
|
LOGGER.Debug($"Value [{oAttributeResultFromDB}] no longer existing in Attribute [{oAttributeName}] - will be deleted!")
|
||||||
LOGGER.Debug(oInfo2)
|
|
||||||
'SetVariableValue(CURRENT_PROFILE_LOG_INDEX, oInfo2)
|
'SetVariableValue(CURRENT_PROFILE_LOG_INDEX, oInfo2)
|
||||||
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult)
|
Delete_Term_Object_From_Metadata(oAttributeName, oAttributeResultFromDB)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'### there is only ONE new value ###
|
'### there is only ONE new value ###
|
||||||
If oDTMyNewValues.Rows(0).Item(1) <> oOldAttributeResult Then
|
If oDTMyNewValues.Rows(0).Item(1) <> oAttributeResultFromDB Then
|
||||||
Dim oInfo = $"Value [{oOldAttributeResult}] of Attribute [{oAttributeName}] obviously was updated during runtime - will be deleted!"
|
Dim oInfo = $"Value [{oAttributeResultFromDB}] of Attribute [{oAttributeName}] obviously was updated during runtime - will be deleted!"
|
||||||
LOGGER.Debug(oInfo)
|
LOGGER.Debug(oInfo)
|
||||||
SetVariableValue(CURRENT_PROFILE_LOG_INDEX, oInfo)
|
SetVariableValue(CURRENT_PROFILE_LOG_INDEX, oInfo)
|
||||||
Delete_Term_Object_From_Metadata(oAttributeName, oOldAttributeResult)
|
Delete_Term_Object_From_Metadata(oAttributeName, oAttributeResultFromDB)
|
||||||
Else
|
Else
|
||||||
LOGGER.Debug($"Attributvalue of [{oAttributeName}] did not change!")
|
LOGGER.Debug($"Attributvalue of [{oAttributeName}] did not change!")
|
||||||
End If
|
End If
|
||||||
@@ -231,22 +308,25 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
For Each oNewValueRow As DataRow In oDTMyNewValues.Rows
|
||||||
Dim oSuccess As Boolean = False
|
'Dim oSuccess As Boolean = False
|
||||||
Dim oVALUE = oNewValueRow.Item(1).ToString
|
Dim oVALUE = oNewValueRow.Item(1).ToString
|
||||||
oVALUE = oVALUE.Replace("'", "''")
|
oVALUE = oVALUE.Replace("'", "''")
|
||||||
Dim oPRSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {CURRENT_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oVALUE}','{USER_LANGUAGE}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
|
Dim oPRSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {CURRENT_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oVALUE}','{USER_LANGUAGE}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT;"
|
||||||
LOGGER.Debug(oPRSQL)
|
LOGGER.Debug(oPRSQL)
|
||||||
oSuccess = DatabaseFallback.ExecuteNonQueryIDB(oPRSQL)
|
'oSuccess = DatabaseFallback.ExecuteNonQueryIDB(oPRSQL)
|
||||||
If oSuccess = False Then
|
If Not ExecuteOrQueue(oPRSQL) Then Return False
|
||||||
Return False
|
'If oSuccess = False Then
|
||||||
End If
|
' Return False
|
||||||
|
'End If
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
'oNewValue = oNewValue.Replace("'", "' + NCHAR(39) + '")
|
'oNewValue = oNewValue.Replace("'", "' + NCHAR(39) + '")
|
||||||
Dim oFNSQL = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {CURRENT_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValue}','{USER_LANGUAGE}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
|
oNewValue = oNewValue.Replace("'", "''")
|
||||||
LOGGER.Debug(oFNSQL)
|
Dim oPRIDB_NEW_OBJ_DATA = $"DECLARE @NEW_OBJ_MD_ID BIGINT " & vbNewLine & $"EXEC PRIDB_NEW_OBJ_DATA {CURRENT_DOC_ID},'{oAttributeName}','{USER_USERNAME}','{oNewValue}','{USER_LANGUAGE}',0,@OMD_ID = @NEW_OBJ_MD_ID OUTPUT;"
|
||||||
Return DatabaseFallback.ExecuteNonQueryIDB(oFNSQL)
|
LOGGER.Debug(oPRIDB_NEW_OBJ_DATA)
|
||||||
|
' Return DatabaseFallback.ExecuteNonQueryIDB(oPRIDB_NEW_OBJ_DATA)
|
||||||
|
Return ExecuteOrQueue(oPRIDB_NEW_OBJ_DATA)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ Public Class ClassInit
|
|||||||
USER_DATE_FORMAT = DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT")
|
USER_DATE_FORMAT = DT_CHECKUSER_MODULE.Rows(0).Item("USER_DATE_FORMAT")
|
||||||
|
|
||||||
|
|
||||||
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE)
|
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE, "Load")
|
||||||
|
|
||||||
|
|
||||||
FINALINDICES = New ClassFinalIndex()
|
FINALINDICES = New ClassFinalIndex()
|
||||||
@@ -468,7 +468,7 @@ Public Class ClassInit
|
|||||||
' DataASorDB = New ClassDataASorDB
|
' DataASorDB = New ClassDataASorDB
|
||||||
'End If
|
'End If
|
||||||
Dim oStopWatch As New RefreshHelper.SW("InitBasics")
|
Dim oStopWatch As New RefreshHelper.SW("InitBasics")
|
||||||
Dim oSql = String.Format("select * from TBPM_KONFIGURATION WHERE GUID = 1")
|
Dim oSql = String.Format("select * from TBPM_KONFIGURATION WITH (NOLOCK) WHERE GUID = 1")
|
||||||
oStep = "TBPM_KONFIGURATION"
|
oStep = "TBPM_KONFIGURATION"
|
||||||
|
|
||||||
BASEDATA_DT_CONFIG = DatabaseFallback.GetDatatable("TBPM_KONFIGURATION", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
BASEDATA_DT_CONFIG = DatabaseFallback.GetDatatable("TBPM_KONFIGURATION", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
||||||
@@ -498,23 +498,23 @@ Public Class ClassInit
|
|||||||
LOGGER.Warn($"Keine GDPICTURE-Lizenz gefunden. Version Konfiguration: {My.Settings.GDPICTURE_VERSION} - Prüfe TBDD_3RD_PARTY_MODULES")
|
LOGGER.Warn($"Keine GDPICTURE-Lizenz gefunden. Version Konfiguration: {My.Settings.GDPICTURE_VERSION} - Prüfe TBDD_3RD_PARTY_MODULES")
|
||||||
End If
|
End If
|
||||||
oStep = "TBDD_SQL_COMMANDS"
|
oStep = "TBDD_SQL_COMMANDS"
|
||||||
oSql = "Select * FROM TBDD_SQL_COMMANDS"
|
oSql = "Select * FROM TBDD_SQL_COMMANDS WITH (NOLOCK)"
|
||||||
|
|
||||||
BASEDATA_DT_TBDD_SQL_COMMANDS = DatabaseFallback.GetDatatable("TBDD_SQL_COMMANDS", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_DT_TBDD_SQL_COMMANDS = DatabaseFallback.GetDatatable("TBDD_SQL_COMMANDS", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
|
|
||||||
oStep = "TBDD_GUI_LANGUAGE_PHRASE"
|
oStep = "TBDD_GUI_LANGUAGE_PHRASE"
|
||||||
oSql = $"SELECT * FROM TBDD_GUI_LANGUAGE_PHRASE WHERE MODULE IN ('PM','All Modules')"
|
oSql = $"SELECT * FROM TBDD_GUI_LANGUAGE_PHRASE WITH (NOLOCK) WHERE MODULE IN ('PM','All Modules')"
|
||||||
'BASEDATA_DT_GUI_LANGUAGE_PHRASES = DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_GUI_LANGUAGE_PHRASE", "")
|
'BASEDATA_DT_GUI_LANGUAGE_PHRASES = DataASorDB.GetDatatable("DD_ECM", oSql, "TBDD_GUI_LANGUAGE_PHRASE", "")
|
||||||
BASEDATA_DT_GUI_LANGUAGE_PHRASES = DatabaseFallback.GetDatatable("TBDD_GUI_LANGUAGE_PHRASE", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_DT_GUI_LANGUAGE_PHRASES = DatabaseFallback.GetDatatable("TBDD_GUI_LANGUAGE_PHRASE", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
oStep = "TBPM_PROFILE_SEARCH"
|
oStep = "TBPM_PROFILE_SEARCH"
|
||||||
oSql = "select * from TBPM_PROFILE_SEARCH where TYPE = 'DOC' AND ACTIVE = 1 ORDER BY PROFILE_ID,TAB_INDEX"
|
oSql = "select * from TBPM_PROFILE_SEARCH WITH (NOLOCK) where TYPE = 'DOC' AND ACTIVE = 1 ORDER BY PROFILE_ID,TAB_INDEX"
|
||||||
BASEDATA_DT_PROFILES_SEARCHES_DOC = DatabaseFallback.GetDatatable("TBPM_PROFILE_SEARCH", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
BASEDATA_DT_PROFILES_SEARCHES_DOC = DatabaseFallback.GetDatatable("TBPM_PROFILE_SEARCH", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
||||||
.SortByColumn = "PROFILE_ID,TAB_INDEX"
|
.SortByColumn = "PROFILE_ID,TAB_INDEX"
|
||||||
})
|
})
|
||||||
DT_FILTERED_PROFILE_SEARCHES_DOC = BASEDATA_DT_PROFILES_SEARCHES_DOC.Clone()
|
DT_FILTERED_PROFILE_SEARCHES_DOC = BASEDATA_DT_PROFILES_SEARCHES_DOC.Clone()
|
||||||
|
|
||||||
oStep = "TBPM_MAIN_VIEW_GROUPS"
|
oStep = "TBPM_MAIN_VIEW_GROUPS"
|
||||||
oSql = "SELECT * FROM TBPM_MAIN_VIEW_GROUPS WHERE ACTIVE = 1"
|
oSql = "SELECT * FROM TBPM_MAIN_VIEW_GROUPS WITH (NOLOCK) WHERE ACTIVE = 1"
|
||||||
|
|
||||||
BASEDATA_DTGRID_GROUPS = DatabaseFallback.GetDatatable("TBPM_MAIN_VIEW_GROUPS", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_DTGRID_GROUPS = DatabaseFallback.GetDatatable("TBPM_MAIN_VIEW_GROUPS", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
|
|
||||||
@@ -524,11 +524,11 @@ Public Class ClassInit
|
|||||||
|
|
||||||
BASEDATA_DT_CHARTS = DatabaseFallback.GetDatatable("TBPM_CHART", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_DT_CHARTS = DatabaseFallback.GetDatatable("TBPM_CHART", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
oStep = "TBDD_GUI_LANGUAGE"
|
oStep = "TBDD_GUI_LANGUAGE"
|
||||||
oSql = "SELECT LANG_CODE FROM TBDD_GUI_LANGUAGE WHERE ACTIVE = 1 ORDER BY LANG_CODE"
|
oSql = "SELECT LANG_CODE FROM TBDD_GUI_LANGUAGE WITH (NOLOCK) WHERE ACTIVE = 1 ORDER BY LANG_CODE"
|
||||||
|
|
||||||
BASEDATA_DT_LANGUAGE = DatabaseFallback.GetDatatable("TBDD_GUI_LANGUAGE", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_DT_LANGUAGE = DatabaseFallback.GetDatatable("TBDD_GUI_LANGUAGE", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
|
|
||||||
oSql = "SELECT * FROM TBDD_COLUMNS_FORMAT WHERE MODULE = 'taskFLOW' AND GRIDVIEW = 'GridViewWorkflows'"
|
oSql = "SELECT * FROM TBDD_COLUMNS_FORMAT WITH (NOLOCK) WHERE MODULE = 'taskFLOW' AND GRIDVIEW = 'GridViewWorkflows'"
|
||||||
BASEDATA_TBDD_COLUMNS_FORMAT = DatabaseFallback.GetDatatable("TBDD_COLUMNS_FORMAT", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
BASEDATA_TBDD_COLUMNS_FORMAT = DatabaseFallback.GetDatatable("TBDD_COLUMNS_FORMAT", New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
|
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ Public Class ClassInit
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
oSql = "SELECT KEY_NAME, VALUE_TEXT1
|
oSql = "SELECT KEY_NAME, VALUE_TEXT1
|
||||||
FROM TBDD_USER_KEY_VALUE_PAIR
|
FROM TBDD_USER_KEY_VALUE_PAIR WITH (NOLOCK)
|
||||||
WHERE FK_USER_ID = " & USER_ID & " And [FK_MODULE_ID] = '" & USER_MODULE_ID & "'"
|
WHERE FK_USER_ID = " & USER_ID & " And [FK_MODULE_ID] = '" & USER_MODULE_ID & "'"
|
||||||
|
|
||||||
Dim oDT_USER_KEY_VALUE_PAIR As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSql, DatabaseType.ECM))
|
Dim oDT_USER_KEY_VALUE_PAIR As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSql, DatabaseType.ECM))
|
||||||
@@ -608,7 +608,7 @@ Public Class ClassInit
|
|||||||
<STAThread()>
|
<STAThread()>
|
||||||
Private Function Settings_LoadBasicConfig()
|
Private Function Settings_LoadBasicConfig()
|
||||||
Try
|
Try
|
||||||
Dim oSql As String = "select * from tbdd_Modules where SHORT_NAME = 'PM'"
|
Dim oSql As String = "select * from tbdd_Modules WITH (NOLOCK) where SHORT_NAME = 'PM'"
|
||||||
Dim oDTtbdd_Modules As DataTable
|
Dim oDTtbdd_Modules As DataTable
|
||||||
'oDTtbdd_Modules = DataASorDB.GetDatatable("DD_ECM", oSql, "tbdd_Modules", $" SHORT_NAME = 'PM'")
|
'oDTtbdd_Modules = DataASorDB.GetDatatable("DD_ECM", oSql, "tbdd_Modules", $" SHORT_NAME = 'PM'")
|
||||||
oDTtbdd_Modules = DatabaseFallback.GetDatatable("TBDD_MODULES", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
oDTtbdd_Modules = DatabaseFallback.GetDatatable("TBDD_MODULES", New GetDatatableOptions(oSql, DatabaseType.ECM) With {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
|
|
||||||
Public Class ClassParamRefresh
|
Public Class ClassParamRefresh
|
||||||
Public Shared Sub Refresh_Params(DT_CHECKUSER As DataTable)
|
Public Shared Sub Refresh_Params(DT_CHECKUSER As DataTable, pMode As String)
|
||||||
LOGGER.Debug("Refresh_Params starting ...")
|
LOGGER.Debug("Refresh_Params starting ...")
|
||||||
Dim oStopwatch As New RefreshHelper.SW("Refresh_Params")
|
Dim oStopwatch As New RefreshHelper.SW("Refresh_Params")
|
||||||
FORCE_LAYOUT_OVERVIEW = False
|
FORCE_LAYOUT_OVERVIEW = False
|
||||||
@@ -221,14 +221,14 @@ Public Class ClassParamRefresh
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TITLE_NOTIFICATIONS = ""
|
TITLE_NOTIFICATIONS = ""
|
||||||
End Try
|
End Try
|
||||||
ElseIf oMode.StartsWith("TF.InheritanceMsgAmount") Then
|
ElseIf oMode.StartsWith("TF.InheritanceMsgAmount") And pMode = "Load" Then
|
||||||
Dim oParam = oMode.Replace("TF.InheritanceMsgAmount=", "")
|
Dim oParam = oMode.Replace("TF.InheritanceMsgAmount=", "")
|
||||||
Try
|
Try
|
||||||
InheritanceMsgAmount = oParam
|
InheritanceMsgAmount = oParam
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
ElseIf oMode.StartsWith("TF.InheritanceCalcReset") Then
|
ElseIf oMode.StartsWith("TF.InheritanceCalcReset") And pMode = "Load" Then
|
||||||
Dim oParam = oMode.Replace("TF.InheritanceCalcReset=", "")
|
Dim oParam = oMode.Replace("TF.InheritanceCalcReset=", "")
|
||||||
Try
|
Try
|
||||||
If CBool(oParam) = True Then
|
If CBool(oParam) = True Then
|
||||||
|
|||||||
@@ -25,15 +25,19 @@ Namespace ControlCreator
|
|||||||
|
|
||||||
Private newRowModified As Boolean
|
Private newRowModified As Boolean
|
||||||
Private isApplyingInheritedValue As Boolean
|
Private isApplyingInheritedValue As Boolean
|
||||||
|
Private _FormulaColumnNames As New HashSet(Of String)(StringComparer.OrdinalIgnoreCase)
|
||||||
Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)))
|
Private _isRefreshingFormula As Boolean = False ' *** NEU: Flag für Formel-Refresh ***
|
||||||
|
Private _currencySymbol As String = "€"
|
||||||
|
Public Sub New(pLogConfig As LogConfig, pGridTables As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem)), pCurrencySymbol As String)
|
||||||
_LogConfig = pLogConfig
|
_LogConfig = pLogConfig
|
||||||
_Logger = pLogConfig.GetLogger()
|
_Logger = pLogConfig.GetLogger()
|
||||||
_GridTables = pGridTables
|
_GridTables = pGridTables
|
||||||
|
_currencySymbol = pCurrencySymbol
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function CreateGridColumns(pColumnTable As DataTable) As DataTable
|
Public Function CreateGridColumns(pColumnTable As DataTable) As DataTable
|
||||||
Dim oDataTable As New DataTable
|
Dim oDataTable As New DataTable
|
||||||
|
Dim columnsWithExpressions As New List(Of Tuple(Of DataColumn, String))
|
||||||
|
|
||||||
For Each oRow As DataRow In pColumnTable.Rows
|
For Each oRow As DataRow In pColumnTable.Rows
|
||||||
' Create Columns in Datatable
|
' Create Columns in Datatable
|
||||||
@@ -57,22 +61,65 @@ Namespace ControlCreator
|
|||||||
Case Else
|
Case Else
|
||||||
oColumn.DataType = GetType(String)
|
oColumn.DataType = GetType(String)
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim oFormulaExpression = ObjectEx.NotNull(oRow.Item("FORMULA_EXPRESSION"), String.Empty)
|
Dim oFormulaExpression = ObjectEx.NotNull(oRow.Item("FORMULA_EXPRESSION"), String.Empty)
|
||||||
If oFormulaExpression <> String.Empty Then
|
If oFormulaExpression <> String.Empty Then
|
||||||
Try
|
' Expression merken, aber erst später setzen
|
||||||
oColumn.Expression = oFormulaExpression
|
columnsWithExpressions.Add(New Tuple(Of DataColumn, String)(oColumn, oFormulaExpression))
|
||||||
oColumn.ReadOnly = True
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Warn("⚠️ Invalid FORMULA_EXPRESSION for column {0}: {1}", oColumn.ColumnName, oFormulaExpression)
|
|
||||||
_Logger.Error(ex)
|
|
||||||
End Try
|
|
||||||
End If
|
End If
|
||||||
oDataTable.Columns.Add(oColumn)
|
|
||||||
|
Try
|
||||||
|
oDataTable.Columns.Add(oColumn)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("⚠️ Could not add column {0} to DataTable", oColumn.ColumnName)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
' Jetzt alle Expressions setzen, nachdem alle Spalten existieren
|
||||||
|
For Each columnExpressionPair In columnsWithExpressions
|
||||||
|
Dim oColumn = columnExpressionPair.Item1
|
||||||
|
Dim oExpression = columnExpressionPair.Item2
|
||||||
|
|
||||||
|
Try
|
||||||
|
_Logger.Debug("Setting expression for column [{0}]: {1}", oColumn.ColumnName, oExpression)
|
||||||
|
|
||||||
|
' Prüfe, ob alle referenzierten Spalten existieren
|
||||||
|
Dim referencedColumns = GetReferencedColumnNames(oExpression)
|
||||||
|
For Each refCol In referencedColumns
|
||||||
|
If Not oDataTable.Columns.Contains(refCol) Then
|
||||||
|
_Logger.Warn("⚠️ Referenced column [{0}] does not exist in DataTable!", refCol)
|
||||||
|
MsgBox(String.Format("Referenced column [{0}] does not exist in DataTable!", refCol), MsgBoxStyle.Exclamation)
|
||||||
|
|
||||||
|
Else
|
||||||
|
_Logger.Debug("Referenced column [{0}] exists with DataType: {1}", refCol, oDataTable.Columns(refCol).DataType.Name)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
oColumn.Expression = oExpression
|
||||||
|
oColumn.ReadOnly = True
|
||||||
|
_Logger.Info("✓ Expression successfully set for column [{0}]: {1}", oColumn.ColumnName, oColumn.Expression)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Warn("⚠️ Invalid FORMULA_EXPRESSION for column {0}: {1}", oColumn.ColumnName, oExpression)
|
||||||
|
_Logger.Error(ex)
|
||||||
|
MsgBox(String.Format("The column '{0}' inlcudes an invalid formula: {1}. Please check the FORMULA_EXPRESSION in the table designer." & vbCrLf &
|
||||||
|
"Error: {2}", oColumn.ColumnName, oExpression, ex.Message), MsgBoxStyle.Exclamation, "Ungültige Formel")
|
||||||
|
End Try
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return oDataTable
|
Return oDataTable
|
||||||
End Function
|
End Function
|
||||||
|
Private Function GetReferencedColumnNames(expression As String) As List(Of String)
|
||||||
|
Dim columnNames As New List(Of String)
|
||||||
|
Dim pattern As String = "\[([^\]]+)\]"
|
||||||
|
Dim matches = Regex.Matches(expression, pattern)
|
||||||
|
|
||||||
|
For Each match As Match In matches
|
||||||
|
columnNames.Add(match.Groups(1).Value)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return columnNames
|
||||||
|
End Function
|
||||||
Public Function FillGridTables(pColumnTable As DataTable, pControlId As Integer, pControlName As String) As Dictionary(Of Integer, Dictionary(Of String, RepositoryItem))
|
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
|
For Each oRow As DataRow In pColumnTable.Rows
|
||||||
' Fetch and cache Combobox results
|
' Fetch and cache Combobox results
|
||||||
@@ -156,15 +203,15 @@ Namespace ControlCreator
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
' Hilfsroutine: passt NUR das Summary-Item an (ohne FormatInfo)
|
' Hilfsroutine: passt NUR das Summary-Item an (ohne FormatInfo)
|
||||||
Private Sub ApplyCurrencySummaryFormat(oCol As GridColumn, currencySymbol As String)
|
Private Sub ApplyCurrencySummaryFormat(oCol As GridColumn)
|
||||||
oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum
|
oCol.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum
|
||||||
' Variante A: Standard-Währungsformat aus aktueller Kultur
|
' Variante A: Standard-Währungsformat aus aktueller Kultur
|
||||||
' oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}"
|
' oCol.SummaryItem.DisplayFormat = "SUM: {0:C2}"
|
||||||
|
|
||||||
' Variante B: Kulturunabhängig, Symbol explizit anhängen
|
' Variante B: Kulturunabhängig, Symbol explizit anhängen
|
||||||
oCol.SummaryItem.DisplayFormat = $"SUM: {{0:N2}} {currencySymbol}"
|
oCol.SummaryItem.DisplayFormat = $"SUM: {{0:N2}} {_currencySymbol}"
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl, pcurrencySymbol As String)
|
Public Sub ConfigureViewColumns(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl)
|
||||||
Dim oShouldDisplayFooter As Boolean = False
|
Dim oShouldDisplayFooter As Boolean = False
|
||||||
For Each oCol As GridColumn In pGridView.Columns
|
For Each oCol As GridColumn In pGridView.Columns
|
||||||
Dim oColumnData As DataRow = pColumnTable.
|
Dim oColumnData As DataRow = pColumnTable.
|
||||||
@@ -210,7 +257,8 @@ Namespace ControlCreator
|
|||||||
|
|
||||||
Case "CURRENCY"
|
Case "CURRENCY"
|
||||||
oCol.DisplayFormat.FormatType = FormatType.Custom
|
oCol.DisplayFormat.FormatType = FormatType.Custom
|
||||||
oCol.DisplayFormat.FormatString = "C2"
|
oCol.DisplayFormat.FormatString = $"N2 {_currencySymbol}"
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Dim oSummaryFunction As String = oColumnData.Item("SUMMARY_FUNCTION")
|
Dim oSummaryFunction As String = oColumnData.Item("SUMMARY_FUNCTION")
|
||||||
@@ -227,7 +275,7 @@ Namespace ControlCreator
|
|||||||
oShouldDisplayFooter = True
|
oShouldDisplayFooter = True
|
||||||
|
|
||||||
Case Constants.AGGREGATE_TOTAL_CURRENCY
|
Case Constants.AGGREGATE_TOTAL_CURRENCY
|
||||||
ApplyCurrencySummaryFormat(oCol, pcurrencySymbol)
|
ApplyCurrencySummaryFormat(oCol)
|
||||||
oShouldDisplayFooter = True
|
oShouldDisplayFooter = True
|
||||||
|
|
||||||
Case Constants.AGGREGATE_TOTAL_AVG
|
Case Constants.AGGREGATE_TOTAL_AVG
|
||||||
@@ -262,16 +310,16 @@ Namespace ControlCreator
|
|||||||
End With
|
End With
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub ConfigureViewColumnsCurrency(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl, pCurrency As String)
|
Public Sub ConfigureViewColumnsCurrency(pColumnTable As DataTable, pGridView As GridView, pGrid As DevExpress.XtraGrid.GridControl)
|
||||||
|
|
||||||
Dim oCultureInfo As CultureInfo = New CultureInfo("de-DE")
|
Dim oCultureInfo As CultureInfo = New CultureInfo("de-DE")
|
||||||
oCultureInfo.NumberFormat.CurrencySymbol = pCurrency
|
oCultureInfo.NumberFormat.CurrencySymbol = _currencySymbol
|
||||||
Dim riTextEdit As RepositoryItemTextEdit = New RepositoryItemTextEdit()
|
Dim riTextEdit As RepositoryItemTextEdit = New RepositoryItemTextEdit()
|
||||||
riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)(Sub(settings)
|
riTextEdit.MaskSettings.Configure(Of MaskSettings.Numeric)(Sub(settings)
|
||||||
settings.MaskExpression = "c"
|
settings.MaskExpression = "c"
|
||||||
settings.Culture = oCultureInfo
|
settings.Culture = oCultureInfo
|
||||||
End Sub)
|
End Sub)
|
||||||
riTextEdit.UseMaskAsDisplayFormat = True 'Optional
|
riTextEdit.UseMaskAsDisplayFormat = True
|
||||||
pGrid.RepositoryItems.Add(riTextEdit)
|
pGrid.RepositoryItems.Add(riTextEdit)
|
||||||
|
|
||||||
For Each oCol As GridColumn In pGridView.Columns
|
For Each oCol As GridColumn In pGridView.Columns
|
||||||
@@ -283,16 +331,39 @@ Namespace ControlCreator
|
|||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' *** 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
|
||||||
|
End If
|
||||||
|
|
||||||
|
' 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
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN")
|
Dim oColumnType As String = oColumnData.Item("TYPE_COLUMN")
|
||||||
|
|
||||||
Select Case oColumnType
|
Select Case oColumnType
|
||||||
Case "CURRENCY"
|
Case "CURRENCY"
|
||||||
oCol.DisplayFormat.FormatType = FormatType.Custom
|
' *** WICHTIG: NUR ColumnEdit setzen, KEIN DisplayFormat mehr! ***
|
||||||
oCol.ColumnEdit = riTextEdit
|
oCol.ColumnEdit = riTextEdit
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub ConfigureViewEvents(pColumnTable As DataTable, pGridView As GridView, pControl As Windows.Forms.Control, pControlId As Integer)
|
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()
|
||||||
|
For Each r As DataRow In pColumnTable.Rows
|
||||||
|
Dim oExpr = ObjectEx.NotNull(r.Item("FORMULA_EXPRESSION"), String.Empty).ToString()
|
||||||
|
If oExpr <> String.Empty Then
|
||||||
|
_FormulaColumnNames.Add(r.Item("SPALTENNAME").ToString())
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
AddHandler pGridView.InitNewRow, Sub(sender As Object, e As InitNewRowEventArgs)
|
AddHandler pGridView.InitNewRow, Sub(sender As Object, e As InitNewRowEventArgs)
|
||||||
Try
|
Try
|
||||||
_Logger.Debug("Initialzing new row")
|
_Logger.Debug("Initialzing new row")
|
||||||
@@ -318,6 +389,55 @@ Namespace ControlCreator
|
|||||||
newRowModified = False
|
newRowModified = False
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
' *** NEU: CustomColumnDisplayText für robuste CURRENCY-Formatierung ***
|
||||||
|
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
|
||||||
|
|
||||||
|
' Prüfe ob Spalte vom Typ CURRENCY ist
|
||||||
|
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 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) & " " & _currencySymbol
|
||||||
|
|
||||||
|
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
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
AddHandler pGridView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs)
|
AddHandler pGridView.CustomRowCellEdit, Sub(sender As Object, e As CustomRowCellEditEventArgs)
|
||||||
Try
|
Try
|
||||||
@@ -350,30 +470,233 @@ Namespace ControlCreator
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
AddHandler pGridView.PopupMenuShowing, AddressOf View_PopupMenuShowing
|
AddHandler pGridView.PopupMenuShowing, AddressOf View_PopupMenuShowing
|
||||||
|
|
||||||
AddHandler pGridView.InvalidRowException, AddressOf View_InvalidRowException
|
AddHandler pGridView.InvalidRowException, AddressOf View_InvalidRowException
|
||||||
AddHandler pGridView.ValidatingEditor, AddressOf View_ValidatingEditor
|
AddHandler pGridView.ValidatingEditor, AddressOf View_ValidatingEditor
|
||||||
' AddHandler pGridView.CustomColumnDisplayText, AddressOf View_CustomColumnDisplayText
|
AddHandler pGridView.ShownEditor,
|
||||||
|
Sub(sender As Object, e As EventArgs)
|
||||||
|
Dim view As GridView = TryCast(sender, GridView)
|
||||||
|
If view.IsNewItemRow(view.FocusedRowHandle) Then
|
||||||
|
_Logger.Debug("Attaching Modified Handler.")
|
||||||
|
AddHandler view.ActiveEditor.Modified, Sub()
|
||||||
|
_Logger.Debug("Row was modified.")
|
||||||
|
newRowModified = True
|
||||||
|
End Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
' *** KRITISCH: LIVE-REFRESH bei JEDER Eingabe (auch NewItemRow!) ***
|
||||||
|
If view.FocusedColumn IsNot Nothing AndAlso view.ActiveEditor IsNot Nothing Then
|
||||||
|
Dim oFocusedColumnName As String = view.FocusedColumn.FieldName
|
||||||
|
|
||||||
|
' Prüfen ob diese Spalte von Formel-Spalten referenziert wird
|
||||||
|
Dim oFormulaColumnsToRefresh As New List(Of String)
|
||||||
|
For Each oColumnData As DataRow In pColumnTable.Rows
|
||||||
|
Dim oExpr = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty).ToString()
|
||||||
|
If oExpr = String.Empty Then Continue For
|
||||||
|
|
||||||
|
Dim referencedColumns = GetReferencedColumnNames(oExpr)
|
||||||
|
If referencedColumns.Any(Function(col) String.Equals(col, oFocusedColumnName, StringComparison.OrdinalIgnoreCase)) Then
|
||||||
|
oFormulaColumnsToRefresh.Add(oColumnData.Item("SPALTENNAME").ToString())
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oFormulaColumnsToRefresh.Count > 0 Then
|
||||||
|
_Logger.Debug("[FormulaRefresh] Attaching EditValueChanged handler for LIVE formula updates on column [{0}].", oFocusedColumnName)
|
||||||
|
|
||||||
|
' Handler für LIVE Aktualisierung während JEDER Eingabe
|
||||||
|
AddHandler view.ActiveEditor.EditValueChanged,
|
||||||
|
Sub(editorSender As Object, editorArgs As EventArgs)
|
||||||
|
Try
|
||||||
|
Dim oRowHandle As Integer = view.FocusedRowHandle
|
||||||
|
If Not view.IsValidRowHandle(oRowHandle) Then Return
|
||||||
|
|
||||||
|
Dim oEditor As DevExpress.XtraEditors.BaseEdit = TryCast(editorSender, DevExpress.XtraEditors.BaseEdit)
|
||||||
|
If oEditor Is Nothing Then Return
|
||||||
|
|
||||||
|
Dim isNewItemRow As Boolean = view.IsNewItemRow(oRowHandle)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oValue As Object = oEditor.EditValue
|
||||||
|
|
||||||
|
If TypeOf oEditor Is DevExpress.XtraEditors.TextEdit Then
|
||||||
|
Dim oTextEdit As DevExpress.XtraEditors.TextEdit = DirectCast(oEditor, DevExpress.XtraEditors.TextEdit)
|
||||||
|
If oTextEdit.Properties.MaskSettings IsNot Nothing Then
|
||||||
|
oValue = oEditor.EditValue
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If isNewItemRow Then
|
||||||
|
_Logger.Debug("[FormulaRefresh] EditValueChanged (NewItemRow) – setting value for [{0}] = [{1}].", oFocusedColumnName, oValue)
|
||||||
|
|
||||||
|
_isRefreshingFormula = True
|
||||||
|
Try
|
||||||
|
' Wert setzen
|
||||||
|
view.SetRowCellValue(oRowHandle, oFocusedColumnName, If(oValue Is Nothing, DBNull.Value, oValue))
|
||||||
|
|
||||||
|
' *** KRITISCH: DoEvents() damit SetRowCellValue processed wird ***
|
||||||
|
view.UpdateCurrentRow()
|
||||||
|
|
||||||
|
' Formel-Spalten SOFORT refreshen
|
||||||
|
For Each oFormulaColumnName As String In oFormulaColumnsToRefresh
|
||||||
|
Dim oGridColumn As GridColumn = view.Columns.ColumnByFieldName(oFormulaColumnName)
|
||||||
|
If oGridColumn IsNot Nothing Then
|
||||||
|
view.RefreshRowCell(oRowHandle, oGridColumn)
|
||||||
|
_Logger.Debug("[FormulaRefresh] (NewItemRow) Refreshed [{0}], current value: [{1}]",
|
||||||
|
oFormulaColumnName, view.GetRowCellValue(oRowHandle, oGridColumn))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Finally
|
||||||
|
_isRefreshingFormula = False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Else
|
||||||
|
' Bestehende Row
|
||||||
|
Dim oDataRow As DataRow = view.GetDataRow(oRowHandle)
|
||||||
|
If oDataRow IsNot Nothing Then
|
||||||
|
_Logger.Debug("[FormulaRefresh] EditValueChanged – setting value for [{0}] in DataTable.", oFocusedColumnName)
|
||||||
|
oDataRow.Item(oFocusedColumnName) = If(oValue Is Nothing, DBNull.Value, oValue)
|
||||||
|
|
||||||
|
For Each oFormulaColumnName As String In oFormulaColumnsToRefresh
|
||||||
|
Dim oGridColumn As GridColumn = view.Columns.ColumnByFieldName(oFormulaColumnName)
|
||||||
|
If oGridColumn IsNot Nothing Then
|
||||||
|
view.RefreshRowCell(oRowHandle, oGridColumn)
|
||||||
|
Dim currentValue = view.GetRowCellValue(oRowHandle, oGridColumn)
|
||||||
|
_Logger.Debug("[FormulaRefresh] Current value for [{0}]: [{1}]", oFormulaColumnName, currentValue)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch parseEx As Exception
|
||||||
|
_Logger.Debug("[FormulaRefresh] Parse error during EditValueChanged: {0}", parseEx.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
' These handlers are all used for the custom DefaultValue functionality, additionally some code in the 'InitNewRow' event.
|
|
||||||
' https://supportcenter.devexpress.com/ticket/details/t1035580/how-to-default-a-value-in-a-column-when-add-new-row-in-data-grid
|
|
||||||
AddHandler pGridView.ShowingEditor, AddressOf View_ShowingEditor
|
|
||||||
AddHandler pGridView.ShownEditor, AddressOf View_ShownEditor
|
|
||||||
AddHandler pGridView.ValidateRow, AddressOf View_ValidateRow
|
AddHandler pGridView.ValidateRow, AddressOf View_ValidateRow
|
||||||
AddHandler pControl.LostFocus, AddressOf Control_LostFocus
|
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
|
||||||
|
|
||||||
|
_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.", oFieldName)
|
||||||
|
e.Cancel = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
AddHandler pGridView.FocusedColumnChanged,
|
||||||
|
Sub(sender As Object, e As FocusedColumnChangedEventArgs)
|
||||||
|
Try
|
||||||
|
Dim oView As GridView = TryCast(sender, GridView)
|
||||||
|
If oView Is Nothing Then Return
|
||||||
|
|
||||||
|
Dim oRowHandle As Integer = oView.FocusedRowHandle
|
||||||
|
If oView.IsNewItemRow(oRowHandle) Then Return
|
||||||
|
If Not oView.IsValidRowHandle(oRowHandle) Then Return
|
||||||
|
|
||||||
|
If oView.FocusedColumn IsNot Nothing AndAlso
|
||||||
|
_FormulaColumnNames.Contains(oView.FocusedColumn.FieldName) Then
|
||||||
|
_Logger.Debug("[FormulaRefresh] FocusedColumnChanged – closing editor on formula column [{0}].", oView.FocusedColumn.FieldName)
|
||||||
|
oView.CloseEditor()
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
AddHandler pGridView.CellValueChanged,
|
AddHandler pGridView.CellValueChanged,
|
||||||
Sub(sender As Object, e As CellValueChangedEventArgs)
|
Sub(sender As Object, e As CellValueChangedEventArgs)
|
||||||
|
' *** HandleInheritedColumnValue MUSS zuerst aufgerufen werden ***
|
||||||
Try
|
Try
|
||||||
HandleInheritedColumnValue(TryCast(sender, GridView), pColumnTable, e)
|
HandleInheritedColumnValue(TryCast(sender, GridView), pColumnTable, e)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_Logger.Error(ex)
|
_Logger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
' *** Formel-Refresh via CellValueChanged ist FALLBACK ***
|
||||||
|
' (EditValueChanged macht das normalerweise schon LIVE)
|
||||||
|
Try
|
||||||
|
Dim oView As GridView = TryCast(sender, GridView)
|
||||||
|
If oView Is Nothing OrElse e.Column Is Nothing Then Return
|
||||||
|
|
||||||
|
' Prüfen ob überhaupt eine Formel-Spalte referenziert wird
|
||||||
|
Dim oFormulaColumnsToRefresh As New List(Of String)
|
||||||
|
|
||||||
|
For Each oColumnData As DataRow In pColumnTable.Rows
|
||||||
|
Dim oExpr = ObjectEx.NotNull(oColumnData.Item("FORMULA_EXPRESSION"), String.Empty).ToString()
|
||||||
|
If oExpr = String.Empty Then Continue For
|
||||||
|
|
||||||
|
Dim referencedColumns = GetReferencedColumnNames(oExpr)
|
||||||
|
If referencedColumns.Any(Function(col) String.Equals(col, e.Column.FieldName, StringComparison.OrdinalIgnoreCase)) Then
|
||||||
|
oFormulaColumnsToRefresh.Add(oColumnData.Item("SPALTENNAME").ToString())
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If oFormulaColumnsToRefresh.Count = 0 Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' *** FALLBACK: Nur wenn EditValueChanged NICHT gefeuert hat ***
|
||||||
|
' (z.B. bei programmatischer SetRowCellValue oder Paste)
|
||||||
|
Dim oRowHandle As Integer = e.RowHandle
|
||||||
|
_Logger.Debug("[FormulaRefresh] CellValueChanged FALLBACK – refreshing for row [{0}] after column [{1}] changed.", oRowHandle, e.Column.FieldName)
|
||||||
|
|
||||||
|
oView.GridControl.BeginInvoke(New Action(
|
||||||
|
Sub()
|
||||||
|
Try
|
||||||
|
If Not oView.IsValidRowHandle(oRowHandle) Then Return
|
||||||
|
|
||||||
|
For Each oFormulaColumnName As String In oFormulaColumnsToRefresh
|
||||||
|
Dim oGridColumn As GridColumn = oView.Columns.ColumnByFieldName(oFormulaColumnName)
|
||||||
|
If oGridColumn Is Nothing Then Continue For
|
||||||
|
|
||||||
|
oView.RefreshRowCell(oRowHandle, oGridColumn)
|
||||||
|
_Logger.Debug("[FormulaRefresh] FALLBACK DisplayText for [{0}]: [{1}]",
|
||||||
|
oFormulaColumnName, oView.GetRowCellDisplayText(oRowHandle, oGridColumn))
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
End Sub))
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub HandleInheritedColumnValue(pView As GridView, pColumnDefinition As DataTable, pArgs As CellValueChangedEventArgs)
|
Private Sub HandleInheritedColumnValue(pView As GridView, pColumnDefinition As DataTable, pArgs As CellValueChangedEventArgs)
|
||||||
If pView Is Nothing OrElse pArgs Is Nothing OrElse pArgs.Column Is Nothing Then
|
If pView Is Nothing OrElse pArgs Is Nothing OrElse pArgs.Column Is Nothing Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' *** NEU: Bei Formel-Refresh überspringen ***
|
||||||
|
If _isRefreshingFormula Then
|
||||||
|
_Logger.Debug("Skipping HandleInheritedColumnValue during formula refresh.")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
If isApplyingInheritedValue OrElse pArgs.RowHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
|
If isApplyingInheritedValue OrElse pArgs.RowHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle Then
|
||||||
Return
|
Return
|
||||||
@@ -535,16 +858,7 @@ Namespace ControlCreator
|
|||||||
|
|
||||||
Return entry
|
Return entry
|
||||||
End Function
|
End Function
|
||||||
Private Sub View_CustomColumnDisplayText(ByVal eSender As Object, ByVal e As CustomColumnDisplayTextEventArgs)
|
|
||||||
If IsNothing(e.Value) Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
Dim view As GridView = eSender
|
|
||||||
'Dim view As GridView = TryCast(GridView1, GridView)
|
|
||||||
If e.Column.FieldName = "SpalteCurrency" Then
|
|
||||||
' e.DisplayText = e.Value.ToString().Replace("€", "CHF")
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
Private Sub View_PopupMenuShowing(sender As Object, e As PopupMenuShowingEventArgs)
|
Private Sub View_PopupMenuShowing(sender As Object, e As PopupMenuShowingEventArgs)
|
||||||
Dim view As GridView = TryCast(sender, GridView)
|
Dim view As GridView = TryCast(sender, GridView)
|
||||||
Dim oFocusedColumn As GridColumn = view.FocusedColumn
|
Dim oFocusedColumn As GridColumn = view.FocusedColumn
|
||||||
@@ -598,28 +912,12 @@ Namespace ControlCreator
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub View_ShowingEditor(sender As Object, e As CancelEventArgs)
|
|
||||||
Dim view As GridView = TryCast(sender, GridView)
|
|
||||||
_Logger.Debug("Showing editor.")
|
|
||||||
If view.IsNewItemRow(view.FocusedRowHandle) AndAlso Not newRowModified Then
|
|
||||||
_Logger.Debug("Adding new row.")
|
|
||||||
view.AddNewRow()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub View_ShownEditor(sender As Object, e As EventArgs)
|
|
||||||
Dim view As GridView = TryCast(sender, GridView)
|
|
||||||
If view.IsNewItemRow(view.FocusedRowHandle) Then
|
|
||||||
_Logger.Debug("Attaching Modified Handler.")
|
|
||||||
AddHandler view.ActiveEditor.Modified, Sub()
|
|
||||||
_Logger.Debug("Row was modified.")
|
|
||||||
newRowModified = True
|
|
||||||
End Sub
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub View_ValidateRow(sender As Object, e As ValidateRowEventArgs)
|
Private Sub View_ValidateRow(sender As Object, e As ValidateRowEventArgs)
|
||||||
Dim view As GridView = TryCast(sender, GridView)
|
Dim view As GridView = TryCast(sender, GridView)
|
||||||
|
' RowHandle für RowUpdated merken, bevor er sich nach dem Commit ändert
|
||||||
|
|
||||||
If view.IsNewItemRow(e.RowHandle) AndAlso Not newRowModified Then
|
If view.IsNewItemRow(e.RowHandle) AndAlso Not newRowModified Then
|
||||||
_Logger.Debug("Deleting unused row")
|
_Logger.Debug("Deleting unused row")
|
||||||
view.DeleteRow(e.RowHandle)
|
view.DeleteRow(e.RowHandle)
|
||||||
|
|||||||
73
app/TaskFlow/DataColumnExpression.txt
Normal file
73
app/TaskFlow/DataColumnExpression.txt
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
ADO.NET DataColumn.Expression – Kompakte Übersicht
|
||||||
|
|
||||||
|
Spalten werden über den Spaltennamen referenziert, z. B. [MENGE].
|
||||||
|
|
||||||
|
GRUNDOPERATOREN
|
||||||
|
- Arithmetik: + - * /
|
||||||
|
Beispiel: [A] * [B]
|
||||||
|
- Vergleich: = <> > >= < <=
|
||||||
|
Beispiel: [MENGE] > 0
|
||||||
|
- Logik: AND OR NOT
|
||||||
|
Beispiel: [A] > 0 AND [B] < 10
|
||||||
|
- Klammern: (...)
|
||||||
|
Beispiel: ([A] + [B]) * 2
|
||||||
|
|
||||||
|
STRING-VERKETTUNG
|
||||||
|
- Verkettung: +
|
||||||
|
Beispiel: [VORNAME] + ' - ' + [NACHNAME]
|
||||||
|
- Typkonvertierung: Convert
|
||||||
|
Beispiel: Convert([NUMMER], 'System.String')
|
||||||
|
|
||||||
|
BEDINGUNGEN
|
||||||
|
- IIF(Bedingung, True, False)
|
||||||
|
Beispiel: IIF([A] = 'Harry', 'Blume', 'Tier')
|
||||||
|
|
||||||
|
HÄUFIGE FUNKTIONEN
|
||||||
|
- Len([TEXT])
|
||||||
|
- Trim([TEXT])
|
||||||
|
- Substring([TEXT], 0, 3)
|
||||||
|
- IsNull([WERT], 0)
|
||||||
|
- Convert([WERT], 'System.Double')
|
||||||
|
|
||||||
|
BEISPIELE (FORMULA_EXPRESSION)
|
||||||
|
- Multiplikation: [MENGE] * [PREIS]
|
||||||
|
- Addieren: [A] + [B]
|
||||||
|
- Division: [A] / [B]
|
||||||
|
- Text zusammensetzen: [SAKNR] + ' - ' + [KST]
|
||||||
|
- Bedingung: IIF([STATUS] = 'X', 'OK', 'NOK')ADO.NET DataColumn.Expression – Kompakte Übersicht
|
||||||
|
|
||||||
|
Spalten werden über den Spaltennamen referenziert, z. B. [MENGE].
|
||||||
|
|
||||||
|
GRUNDOPERATOREN
|
||||||
|
- Arithmetik: + - * /
|
||||||
|
Beispiel: [A] * [B]
|
||||||
|
- Vergleich: = <> > >= < <=
|
||||||
|
Beispiel: [MENGE] > 0
|
||||||
|
- Logik: AND OR NOT
|
||||||
|
Beispiel: [A] > 0 AND [B] < 10
|
||||||
|
- Klammern: (...)
|
||||||
|
Beispiel: ([A] + [B]) * 2
|
||||||
|
|
||||||
|
STRING-VERKETTUNG
|
||||||
|
- Verkettung: +
|
||||||
|
Beispiel: [VORNAME] + ' - ' + [NACHNAME]
|
||||||
|
- Typkonvertierung: Convert
|
||||||
|
Beispiel: Convert([NUMMER], 'System.String')
|
||||||
|
|
||||||
|
BEDINGUNGEN
|
||||||
|
- IIF(Bedingung, True, False)
|
||||||
|
Beispiel: IIF([A] = 'Harry', 'Blume', 'Tier')
|
||||||
|
|
||||||
|
HÄUFIGE FUNKTIONEN
|
||||||
|
- Len([TEXT])
|
||||||
|
- Trim([TEXT])
|
||||||
|
- Substring([TEXT], 0, 3)
|
||||||
|
- IsNull([WERT], 0)
|
||||||
|
- Convert([WERT], 'System.Double')
|
||||||
|
|
||||||
|
BEISPIELE (FORMULA_EXPRESSION)
|
||||||
|
- Multiplikation: [MENGE] * [PREIS]
|
||||||
|
- Addieren: [A] + [B]
|
||||||
|
- Division: [A] / [B]
|
||||||
|
- Text zusammensetzen: [SAKNR] + ' - ' + [KST]
|
||||||
|
- Bedingung: IIF([STATUS] = 'X', 'OK', 'NOK')
|
||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("")>
|
<Assembly: AssemblyDescription("")>
|
||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("taskFLOW")>
|
<Assembly: AssemblyProduct("taskFLOW")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © Digital Data 2025")>
|
<Assembly: AssemblyCopyright("Digital Data 2026")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.8.0.0")>
|
<Assembly: AssemblyVersion("2.8.4.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("")>
|
<Assembly: NeutralResourcesLanguage("")>
|
||||||
|
|||||||
@@ -624,6 +624,12 @@
|
|||||||
<Compile Include="frmError.vb">
|
<Compile Include="frmError.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="frmExpression_Designer.Designer.vb">
|
||||||
|
<DependentUpon>frmExpression_Designer.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="frmExpression_Designer.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="frmFileInfo.Designer.vb">
|
<Compile Include="frmFileInfo.Designer.vb">
|
||||||
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -868,6 +874,9 @@
|
|||||||
<DependentUpon>frmError.vb</DependentUpon>
|
<DependentUpon>frmError.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="frmExpression_Designer.resx">
|
||||||
|
<DependentUpon>frmExpression_Designer.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmFileInfo.resx">
|
<EmbeddedResource Include="frmFileInfo.resx">
|
||||||
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -1272,6 +1281,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Changelog.md" />
|
<None Include="Changelog.md" />
|
||||||
|
<Content Include="DataColumnExpression.txt" />
|
||||||
<Content Include="DD_Icons_ICO_PMANAGER_48px.ico" />
|
<Content Include="DD_Icons_ICO_PMANAGER_48px.ico" />
|
||||||
<Content Include="DD_taskFLOW_ICON.ico" />
|
<Content Include="DD_taskFLOW_ICON.ico" />
|
||||||
<Content Include="MailLicense.xml">
|
<Content Include="MailLicense.xml">
|
||||||
|
|||||||
@@ -98,8 +98,13 @@ Public Class clsPatterns
|
|||||||
lookup.Properties.SelectedValues = New List(Of String) From {newValue.ToString()}
|
lookup.Properties.SelectedValues = New List(Of String) From {newValue.ToString()}
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case GetType(Windows.Forms.ComboBox)
|
' ========== FIX START: Beide ComboBox-Typen unterstützen ==========
|
||||||
DirectCast(ctrl, ComboBox).Text = newValue?.ToString()
|
Case GetType(System.Windows.Forms.ComboBox)
|
||||||
|
DirectCast(ctrl, System.Windows.Forms.ComboBox).Text = newValue?.ToString()
|
||||||
|
|
||||||
|
Case GetType(DevExpress.XtraEditors.ComboBoxEdit)
|
||||||
|
DirectCast(ctrl, DevExpress.XtraEditors.ComboBoxEdit).Text = newValue?.ToString()
|
||||||
|
' ========== FIX END ==========
|
||||||
|
|
||||||
Case GetType(CheckBox)
|
Case GetType(CheckBox)
|
||||||
If TypeOf newValue Is Boolean Then
|
If TypeOf newValue Is Boolean Then
|
||||||
|
|||||||
58
app/TaskFlow/frmColumn_Detail.Designer.vb
generated
58
app/TaskFlow/frmColumn_Detail.Designer.vb
generated
@@ -37,7 +37,7 @@ Partial Class frmColumn_Detail
|
|||||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl()
|
Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl()
|
||||||
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
|
Me.SimpleButton3 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.FORMULA_EXPRESSIONTextBox = New System.Windows.Forms.TextBox()
|
Me.FORMULA_EXPRESSIONTextBox = New System.Windows.Forms.TextBox()
|
||||||
Me.LU_CAPTIONTextBox = New System.Windows.Forms.TextBox()
|
Me.LU_CAPTIONTextBox = New System.Windows.Forms.TextBox()
|
||||||
Me.GUIDTextBox = New DevExpress.XtraEditors.TextEdit()
|
Me.GUIDTextBox = New DevExpress.XtraEditors.TextEdit()
|
||||||
@@ -88,7 +88,7 @@ Partial Class frmColumn_Detail
|
|||||||
Me.LayoutControlItem23 = New DevExpress.XtraLayout.LayoutControlItem()
|
Me.LayoutControlItem23 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
Me.LayoutControlItem21 = New DevExpress.XtraLayout.LayoutControlItem()
|
Me.LayoutControlItem21 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
Me.LayoutControlItem24 = New DevExpress.XtraLayout.LayoutControlItem()
|
Me.LayoutControlItem24 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
Me.LayoutControlItem15 = New DevExpress.XtraLayout.LayoutControlItem()
|
Me.LayoutControlItem26 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
CType(Me.TBPM_CONTROL_TABLEBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.TBPM_CONTROL_TABLEBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.DD_DMSLiteDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.DD_DMSLiteDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@@ -140,7 +140,7 @@ Partial Class frmColumn_Detail
|
|||||||
CType(Me.LayoutControlItem23, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.LayoutControlItem23, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.LayoutControlItem21, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.LayoutControlItem21, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.LayoutControlItem24, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.LayoutControlItem24, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.LayoutControlItem15, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.LayoutControlItem26, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'TBPM_CONTROL_TABLEBindingSource
|
'TBPM_CONTROL_TABLEBindingSource
|
||||||
@@ -237,7 +237,7 @@ Partial Class frmColumn_Detail
|
|||||||
'
|
'
|
||||||
'LayoutControl1
|
'LayoutControl1
|
||||||
'
|
'
|
||||||
Me.LayoutControl1.Controls.Add(Me.LabelControl1)
|
Me.LayoutControl1.Controls.Add(Me.SimpleButton3)
|
||||||
Me.LayoutControl1.Controls.Add(Me.FORMULA_EXPRESSIONTextBox)
|
Me.LayoutControl1.Controls.Add(Me.FORMULA_EXPRESSIONTextBox)
|
||||||
Me.LayoutControl1.Controls.Add(Me.LU_CAPTIONTextBox)
|
Me.LayoutControl1.Controls.Add(Me.LU_CAPTIONTextBox)
|
||||||
Me.LayoutControl1.Controls.Add(Me.GUIDTextBox)
|
Me.LayoutControl1.Controls.Add(Me.GUIDTextBox)
|
||||||
@@ -266,15 +266,11 @@ Partial Class frmColumn_Detail
|
|||||||
Me.LayoutControl1.Name = "LayoutControl1"
|
Me.LayoutControl1.Name = "LayoutControl1"
|
||||||
Me.LayoutControl1.Root = Me.Root
|
Me.LayoutControl1.Root = Me.Root
|
||||||
'
|
'
|
||||||
'LabelControl1
|
'SimpleButton3
|
||||||
'
|
'
|
||||||
Me.LabelControl1.Appearance.Font = CType(resources.GetObject("LabelControl1.Appearance.Font"), System.Drawing.Font)
|
resources.ApplyResources(Me.SimpleButton3, "SimpleButton3")
|
||||||
Me.LabelControl1.Appearance.Options.UseFont = True
|
Me.SimpleButton3.Name = "SimpleButton3"
|
||||||
Me.LabelControl1.Appearance.Options.UseTextOptions = True
|
Me.SimpleButton3.StyleController = Me.LayoutControl1
|
||||||
Me.LabelControl1.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap
|
|
||||||
resources.ApplyResources(Me.LabelControl1, "LabelControl1")
|
|
||||||
Me.LabelControl1.Name = "LabelControl1"
|
|
||||||
Me.LabelControl1.StyleController = Me.LayoutControl1
|
|
||||||
'
|
'
|
||||||
'FORMULA_EXPRESSIONTextBox
|
'FORMULA_EXPRESSIONTextBox
|
||||||
'
|
'
|
||||||
@@ -482,7 +478,7 @@ Partial Class frmColumn_Detail
|
|||||||
'
|
'
|
||||||
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
||||||
Me.Root.GroupBordersVisible = False
|
Me.Root.GroupBordersVisible = False
|
||||||
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.LayoutControlItem8, Me.LayoutControlItem7, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem12, Me.LayoutControlItem11, Me.LayoutControlItem13, Me.LayoutControlGroup1, Me.LayoutControlItem18, Me.LayoutControlItem19, Me.LayoutControlItem23, Me.LayoutControlItem21, Me.LayoutControlItem24, Me.LayoutControlItem15})
|
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.LayoutControlItem8, Me.LayoutControlItem7, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem12, Me.LayoutControlItem11, Me.LayoutControlItem13, Me.LayoutControlGroup1, Me.LayoutControlItem18, Me.LayoutControlItem19, Me.LayoutControlItem23, Me.LayoutControlItem21, Me.LayoutControlItem24, Me.LayoutControlItem26})
|
||||||
Me.Root.Name = "Root"
|
Me.Root.Name = "Root"
|
||||||
Me.Root.Size = New System.Drawing.Size(593, 816)
|
Me.Root.Size = New System.Drawing.Size(593, 816)
|
||||||
Me.Root.TextVisible = False
|
Me.Root.TextVisible = False
|
||||||
@@ -578,7 +574,7 @@ Partial Class frmColumn_Detail
|
|||||||
'LayoutControlItem10
|
'LayoutControlItem10
|
||||||
'
|
'
|
||||||
Me.LayoutControlItem10.Control = Me.TextEdit7
|
Me.LayoutControlItem10.Control = Me.TextEdit7
|
||||||
Me.LayoutControlItem10.Location = New System.Drawing.Point(0, 547)
|
Me.LayoutControlItem10.Location = New System.Drawing.Point(0, 458)
|
||||||
Me.LayoutControlItem10.Name = "LayoutControlItem10"
|
Me.LayoutControlItem10.Name = "LayoutControlItem10"
|
||||||
Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
||||||
Me.LayoutControlItem10.Size = New System.Drawing.Size(286, 40)
|
Me.LayoutControlItem10.Size = New System.Drawing.Size(286, 40)
|
||||||
@@ -588,7 +584,7 @@ Partial Class frmColumn_Detail
|
|||||||
'LayoutControlItem12
|
'LayoutControlItem12
|
||||||
'
|
'
|
||||||
Me.LayoutControlItem12.Control = Me.CHANGED_WHOTextBox
|
Me.LayoutControlItem12.Control = Me.CHANGED_WHOTextBox
|
||||||
Me.LayoutControlItem12.Location = New System.Drawing.Point(0, 587)
|
Me.LayoutControlItem12.Location = New System.Drawing.Point(0, 498)
|
||||||
Me.LayoutControlItem12.Name = "LayoutControlItem12"
|
Me.LayoutControlItem12.Name = "LayoutControlItem12"
|
||||||
Me.LayoutControlItem12.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
Me.LayoutControlItem12.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
||||||
Me.LayoutControlItem12.Size = New System.Drawing.Size(286, 40)
|
Me.LayoutControlItem12.Size = New System.Drawing.Size(286, 40)
|
||||||
@@ -598,7 +594,7 @@ Partial Class frmColumn_Detail
|
|||||||
'LayoutControlItem11
|
'LayoutControlItem11
|
||||||
'
|
'
|
||||||
Me.LayoutControlItem11.Control = Me.TextEdit8
|
Me.LayoutControlItem11.Control = Me.TextEdit8
|
||||||
Me.LayoutControlItem11.Location = New System.Drawing.Point(286, 547)
|
Me.LayoutControlItem11.Location = New System.Drawing.Point(286, 458)
|
||||||
Me.LayoutControlItem11.Name = "LayoutControlItem11"
|
Me.LayoutControlItem11.Name = "LayoutControlItem11"
|
||||||
Me.LayoutControlItem11.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
Me.LayoutControlItem11.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
||||||
Me.LayoutControlItem11.Size = New System.Drawing.Size(287, 40)
|
Me.LayoutControlItem11.Size = New System.Drawing.Size(287, 40)
|
||||||
@@ -608,7 +604,7 @@ Partial Class frmColumn_Detail
|
|||||||
'LayoutControlItem13
|
'LayoutControlItem13
|
||||||
'
|
'
|
||||||
Me.LayoutControlItem13.Control = Me.TextEdit10
|
Me.LayoutControlItem13.Control = Me.TextEdit10
|
||||||
Me.LayoutControlItem13.Location = New System.Drawing.Point(286, 587)
|
Me.LayoutControlItem13.Location = New System.Drawing.Point(286, 498)
|
||||||
Me.LayoutControlItem13.Name = "LayoutControlItem13"
|
Me.LayoutControlItem13.Name = "LayoutControlItem13"
|
||||||
Me.LayoutControlItem13.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
Me.LayoutControlItem13.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
||||||
Me.LayoutControlItem13.Size = New System.Drawing.Size(287, 40)
|
Me.LayoutControlItem13.Size = New System.Drawing.Size(287, 40)
|
||||||
@@ -618,9 +614,9 @@ Partial Class frmColumn_Detail
|
|||||||
'LayoutControlGroup1
|
'LayoutControlGroup1
|
||||||
'
|
'
|
||||||
Me.LayoutControlGroup1.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem16, Me.LayoutControlItem14, Me.LayoutControlItem17, Me.LayoutControlItem25, Me.LayoutControlItem20, Me.LayoutControlItem22})
|
Me.LayoutControlGroup1.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem16, Me.LayoutControlItem14, Me.LayoutControlItem17, Me.LayoutControlItem25, Me.LayoutControlItem20, Me.LayoutControlItem22})
|
||||||
Me.LayoutControlGroup1.Location = New System.Drawing.Point(0, 627)
|
Me.LayoutControlGroup1.Location = New System.Drawing.Point(0, 538)
|
||||||
Me.LayoutControlGroup1.Name = "LayoutControlGroup1"
|
Me.LayoutControlGroup1.Name = "LayoutControlGroup1"
|
||||||
Me.LayoutControlGroup1.Size = New System.Drawing.Size(573, 169)
|
Me.LayoutControlGroup1.Size = New System.Drawing.Size(573, 258)
|
||||||
resources.ApplyResources(Me.LayoutControlGroup1, "LayoutControlGroup1")
|
resources.ApplyResources(Me.LayoutControlGroup1, "LayoutControlGroup1")
|
||||||
'
|
'
|
||||||
'LayoutControlItem16
|
'LayoutControlItem16
|
||||||
@@ -674,7 +670,7 @@ Partial Class frmColumn_Detail
|
|||||||
Me.LayoutControlItem22.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBPM_CONTROL_TABLEBindingSource, "INHERIT_VALUE", True))
|
Me.LayoutControlItem22.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBPM_CONTROL_TABLEBindingSource, "INHERIT_VALUE", True))
|
||||||
Me.LayoutControlItem22.Location = New System.Drawing.Point(0, 90)
|
Me.LayoutControlItem22.Location = New System.Drawing.Point(0, 90)
|
||||||
Me.LayoutControlItem22.Name = "LayoutControlItem22"
|
Me.LayoutControlItem22.Name = "LayoutControlItem22"
|
||||||
Me.LayoutControlItem22.Size = New System.Drawing.Size(549, 34)
|
Me.LayoutControlItem22.Size = New System.Drawing.Size(549, 123)
|
||||||
Me.LayoutControlItem22.TextSize = New System.Drawing.Size(0, 0)
|
Me.LayoutControlItem22.TextSize = New System.Drawing.Size(0, 0)
|
||||||
Me.LayoutControlItem22.TextVisible = False
|
Me.LayoutControlItem22.TextVisible = False
|
||||||
'
|
'
|
||||||
@@ -724,18 +720,18 @@ Partial Class frmColumn_Detail
|
|||||||
Me.LayoutControlItem24.Location = New System.Drawing.Point(0, 412)
|
Me.LayoutControlItem24.Location = New System.Drawing.Point(0, 412)
|
||||||
Me.LayoutControlItem24.Name = "LayoutControlItem24"
|
Me.LayoutControlItem24.Name = "LayoutControlItem24"
|
||||||
Me.LayoutControlItem24.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
Me.LayoutControlItem24.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
|
||||||
Me.LayoutControlItem24.Size = New System.Drawing.Size(573, 40)
|
Me.LayoutControlItem24.Size = New System.Drawing.Size(488, 46)
|
||||||
resources.ApplyResources(Me.LayoutControlItem24, "LayoutControlItem24")
|
resources.ApplyResources(Me.LayoutControlItem24, "LayoutControlItem24")
|
||||||
Me.LayoutControlItem24.TextSize = New System.Drawing.Size(110, 13)
|
Me.LayoutControlItem24.TextSize = New System.Drawing.Size(110, 13)
|
||||||
'
|
'
|
||||||
'LayoutControlItem15
|
'LayoutControlItem26
|
||||||
'
|
'
|
||||||
Me.LayoutControlItem15.Control = Me.LabelControl1
|
Me.LayoutControlItem26.Control = Me.SimpleButton3
|
||||||
Me.LayoutControlItem15.Location = New System.Drawing.Point(0, 452)
|
Me.LayoutControlItem26.Location = New System.Drawing.Point(488, 412)
|
||||||
Me.LayoutControlItem15.Name = "LayoutControlItem15"
|
Me.LayoutControlItem26.Name = "LayoutControlItem26"
|
||||||
Me.LayoutControlItem15.Size = New System.Drawing.Size(573, 95)
|
Me.LayoutControlItem26.Size = New System.Drawing.Size(85, 46)
|
||||||
Me.LayoutControlItem15.TextSize = New System.Drawing.Size(0, 0)
|
Me.LayoutControlItem26.TextSize = New System.Drawing.Size(0, 0)
|
||||||
Me.LayoutControlItem15.TextVisible = False
|
Me.LayoutControlItem26.TextVisible = False
|
||||||
'
|
'
|
||||||
'frmColumn_Detail
|
'frmColumn_Detail
|
||||||
'
|
'
|
||||||
@@ -802,7 +798,7 @@ Partial Class frmColumn_Detail
|
|||||||
CType(Me.LayoutControlItem23, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.LayoutControlItem23, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.LayoutControlItem21, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.LayoutControlItem21, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.LayoutControlItem24, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.LayoutControlItem24, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.LayoutControlItem15, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.LayoutControlItem26, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
Me.PerformLayout
|
Me.PerformLayout
|
||||||
|
|
||||||
@@ -870,6 +866,6 @@ End Sub
|
|||||||
Friend WithEvents FORMULA_EXPRESSIONTextBox As TextBox
|
Friend WithEvents FORMULA_EXPRESSIONTextBox As TextBox
|
||||||
Friend WithEvents LayoutControlItem24 As DevExpress.XtraLayout.LayoutControlItem
|
Friend WithEvents LayoutControlItem24 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
Friend WithEvents LayoutControlItem25 As DevExpress.XtraLayout.LayoutControlItem
|
Friend WithEvents LayoutControlItem25 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
|
Friend WithEvents SimpleButton3 As DevExpress.XtraEditors.SimpleButton
|
||||||
Friend WithEvents LayoutControlItem15 As DevExpress.XtraLayout.LayoutControlItem
|
Friend WithEvents LayoutControlItem26 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -184,50 +184,40 @@
|
|||||||
<data name="RibbonPage2.Text" xml:space="preserve">
|
<data name="RibbonPage2.Text" xml:space="preserve">
|
||||||
<value>RibbonPage2</value>
|
<value>RibbonPage2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Appearance.Font" type="System.Drawing.Font, System.Drawing">
|
<data name="SimpleButton3.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>Segoe UI, 8.25pt</value>
|
<value>500, 424</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="DevExpress.XtraEditors.v21.2" name="DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="LabelControl1.AutoSizeMode" type="DevExpress.XtraEditors.LabelAutoSizeMode, DevExpress.XtraEditors.v21.2">
|
<data name="SimpleButton3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
<value>None</value>
|
<value>10, 10, 10, 10</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="SimpleButton3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>12, 464</value>
|
<value>81, 42</value>
|
||||||
</data>
|
|
||||||
<data name="LabelControl1.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>569, 91</value>
|
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="LabelControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="SimpleButton3.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>30</value>
|
<value>31</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Text" xml:space="preserve">
|
<data name="SimpleButton3.Text" xml:space="preserve">
|
||||||
<value>In der Formel nutzen wir die DataColumn.Expression‑Ausdruckssprache von ADO.NET
|
<value>...</value>
|
||||||
Kurz: ADO.NET DataColumn Expression Language.
|
|
||||||
Die Spaltennamen sind hier relevant.
|
|
||||||
Beispiele:
|
|
||||||
Multiplikation: [colMENGE] * [colPREIS]
|
|
||||||
Verkettung: [colVORNAME] + ' - ' [colNACHNAME]
|
|
||||||
IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|
||||||
</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Name" xml:space="preserve">
|
<data name=">>SimpleButton3.Name" xml:space="preserve">
|
||||||
<value>LabelControl1</value>
|
<value>SimpleButton3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Type" xml:space="preserve">
|
<data name=">>SimpleButton3.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Parent" xml:space="preserve">
|
<data name=">>SimpleButton3.Parent" xml:space="preserve">
|
||||||
<value>LayoutControl1</value>
|
<value>LayoutControl1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.ZOrder" xml:space="preserve">
|
<data name=">>SimpleButton3.ZOrder" xml:space="preserve">
|
||||||
<value>4</value>
|
<value>4</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FORMULA_EXPRESSIONTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="FORMULA_EXPRESSIONTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>142, 432</value>
|
<value>142, 432</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FORMULA_EXPRESSIONTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="FORMULA_EXPRESSIONTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>431, 20</value>
|
<value>346, 20</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="FORMULA_EXPRESSIONTextBox.TabIndex" type="System.Int32, mscorlib">
|
<data name="FORMULA_EXPRESSIONTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>29</value>
|
<value>29</value>
|
||||||
@@ -380,7 +370,6 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<data name="SimpleButton1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="SimpleButton1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>500, 212</value>
|
<value>500, 212</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
|
||||||
<data name="SimpleButton1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
<data name="SimpleButton1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
<value>10, 10, 10, 10</value>
|
<value>10, 10, 10, 10</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -478,7 +467,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>15</value>
|
<value>15</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit7.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="TextEdit7.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>142, 567</value>
|
<value>142, 478</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit7.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="TextEdit7.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>144, 20</value>
|
<value>144, 20</value>
|
||||||
@@ -499,7 +488,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>16</value>
|
<value>16</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit8.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="TextEdit8.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>428, 567</value>
|
<value>428, 478</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit8.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="TextEdit8.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>145, 20</value>
|
<value>145, 20</value>
|
||||||
@@ -520,7 +509,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>17</value>
|
<value>17</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CHANGED_WHOTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="CHANGED_WHOTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>142, 607</value>
|
<value>142, 518</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CHANGED_WHOTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="CHANGED_WHOTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>144, 20</value>
|
<value>144, 20</value>
|
||||||
@@ -541,7 +530,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>18</value>
|
<value>18</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit10.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="TextEdit10.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>428, 607</value>
|
<value>428, 518</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TextEdit10.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="TextEdit10.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>145, 20</value>
|
<value>145, 20</value>
|
||||||
@@ -562,7 +551,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>19</value>
|
<value>19</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="READ_ONLYCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="READ_ONLYCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>24, 696</value>
|
<value>24, 607</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="READ_ONLYCheckBox.Properties.Caption" xml:space="preserve">
|
<data name="READ_ONLYCheckBox.Properties.Caption" xml:space="preserve">
|
||||||
<value>Read Only</value>
|
<value>Read Only</value>
|
||||||
@@ -586,7 +575,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>20</value>
|
<value>20</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LOAD_IDX_VALUECheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="LOAD_IDX_VALUECheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>24, 740</value>
|
<value>24, 651</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LOAD_IDX_VALUECheckBox.Properties.Caption" xml:space="preserve">
|
<data name="LOAD_IDX_VALUECheckBox.Properties.Caption" xml:space="preserve">
|
||||||
<value>Lade Indexdaten</value>
|
<value>Lade Indexdaten</value>
|
||||||
@@ -610,7 +599,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>21</value>
|
<value>21</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VALIDATIONCheckbox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="VALIDATIONCheckbox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>24, 672</value>
|
<value>24, 583</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VALIDATIONCheckbox.Properties.Caption" xml:space="preserve">
|
<data name="VALIDATIONCheckbox.Properties.Caption" xml:space="preserve">
|
||||||
<value>Muss ausgefüllt werden</value>
|
<value>Muss ausgefüllt werden</value>
|
||||||
@@ -634,7 +623,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>22</value>
|
<value>22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ADVANCED_LOOKUPCheckbox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="ADVANCED_LOOKUPCheckbox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>24, 718</value>
|
<value>24, 629</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ADVANCED_LOOKUPCheckbox.Properties.Caption" xml:space="preserve">
|
<data name="ADVANCED_LOOKUPCheckbox.Properties.Caption" xml:space="preserve">
|
||||||
<value>Erweitertes Auswahl Control (für lange Listen)</value>
|
<value>Erweitertes Auswahl Control (für lange Listen)</value>
|
||||||
@@ -706,7 +695,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>25</value>
|
<value>25</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SUMMARY_FUNCTIONCombobox.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="SUMMARY_FUNCTIONCombobox.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>420, 672</value>
|
<value>420, 583</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SUMMARY_FUNCTIONCombobox.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
<data name="SUMMARY_FUNCTIONCombobox.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||||
<value>Combo</value>
|
<value>Combo</value>
|
||||||
@@ -760,7 +749,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<value>27</value>
|
<value>27</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CheckEditInheritValue.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="CheckEditInheritValue.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>24, 762</value>
|
<value>24, 673</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CheckEditInheritValue.Properties.Caption" xml:space="preserve">
|
<data name="CheckEditInheritValue.Properties.Caption" xml:space="preserve">
|
||||||
<value>Inherit Value (Vererbt den Wert der aktuellen Zelle auf alle nachfolgenden)</value>
|
<value>Inherit Value (Vererbt den Wert der aktuellen Zelle auf alle nachfolgenden)</value>
|
||||||
@@ -1098,10 +1087,10 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
|
|||||||
<data name=">>LayoutControlItem24.Type" xml:space="preserve">
|
<data name=">>LayoutControlItem24.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LayoutControlItem15.Name" xml:space="preserve">
|
<data name=">>LayoutControlItem26.Name" xml:space="preserve">
|
||||||
<value>LayoutControlItem15</value>
|
<value>LayoutControlItem26</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LayoutControlItem15.Type" xml:space="preserve">
|
<data name=">>LayoutControlItem26.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>$this.Name" xml:space="preserve">
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
|
|||||||
@@ -206,4 +206,22 @@ Public Class frmColumn_Detail
|
|||||||
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
|
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SimpleButton3_Click(sender As Object, e As EventArgs) Handles SimpleButton3.Click
|
||||||
|
' Alle verfügbaren Spalten für dieses Control laden
|
||||||
|
Dim availableColumns As DataTable = GetAvailableColumnsForControl()
|
||||||
|
|
||||||
|
' Expression Designer öffnen
|
||||||
|
Using designer As New frmExpression_Designer(availableColumns, FORMULA_EXPRESSIONTextBox.Text)
|
||||||
|
If designer.ShowDialog() = DialogResult.OK Then
|
||||||
|
FORMULA_EXPRESSIONTextBox.Text = designer.Expression
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Sub
|
||||||
|
Private Function GetAvailableColumnsForControl() As DataTable
|
||||||
|
' Spalten aus der aktuellen Control-Definition laden
|
||||||
|
Dim oSQL = "SELECT * FROM TBPM_CONTROL_TABLE WHERE CONTROL_ID = " & CURRENT_CONTROL_ID & " ORDER BY SEQUENCE"
|
||||||
|
Dim dt As DataTable = DatabaseFallback.GetDatatableECM(oSQL)
|
||||||
|
Return dt
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
@@ -2,8 +2,21 @@
|
|||||||
|
|
||||||
Public Class frmError
|
Public Class frmError
|
||||||
Public ValidatorError As String = ""
|
Public ValidatorError As String = ""
|
||||||
|
Private _isClosing As Boolean = False
|
||||||
|
|
||||||
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
|
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
|
||||||
Me.Close()
|
' ========== FIX 1: Event-Handler SOFORT deregistrieren ==========
|
||||||
|
RemoveHandler OK_Button.Click, AddressOf OK_Button_Click
|
||||||
|
|
||||||
|
' ========== DIAGNOSE: StackTrace ausgeben ==========
|
||||||
|
Dim st As New StackTrace(True)
|
||||||
|
LOGGER.Debug($"[frmError] OK_Button_Click aufgerufen von:")
|
||||||
|
For Each frame As StackFrame In st.GetFrames()
|
||||||
|
LOGGER.Debug($" {frame.GetMethod()?.DeclaringType?.Name}.{frame.GetMethod()?.Name} (Zeile {frame.GetFileLineNumber()})")
|
||||||
|
Next
|
||||||
|
' ========== ENDE DIAGNOSE ==========
|
||||||
|
|
||||||
|
CloseDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmError_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Private Sub frmError_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
@@ -27,7 +40,45 @@ Public Class frmError
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmError_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown
|
Private Sub CloseDialog()
|
||||||
Me.Label1.Focus()
|
' ========== FIX 2: Guard mit Dispose-Check ==========
|
||||||
|
If _isClosing OrElse Me.IsDisposed Then
|
||||||
|
LOGGER.Debug($"[frmError] CloseDialog blockiert (isClosing={_isClosing}, IsDisposed={Me.IsDisposed})")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
_isClosing = True
|
||||||
|
LOGGER.Debug($"[frmError] CloseDialog: Flag gesetzt, starte verzögerten Close")
|
||||||
|
|
||||||
|
' ========== FIX 3: VERZÖGERTER Close via BeginInvoke ==========
|
||||||
|
' KRITISCH: Close wird NACH Abschluss des aktuellen Event-Handlers ausgeführt
|
||||||
|
Me.BeginInvoke(New Action(Sub()
|
||||||
|
If Not Me.IsDisposed Then
|
||||||
|
Me.DialogResult = DialogResult.OK
|
||||||
|
Me.Close()
|
||||||
|
LOGGER.Debug($"[frmError] Dialog geschlossen via BeginInvoke")
|
||||||
|
End If
|
||||||
|
End Sub))
|
||||||
|
' ========== ENDE FIX 3 ==========
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub frmError_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||||
|
Me.Label1.Focus()
|
||||||
|
LOGGER.Debug($"[frmError] Dialog angezeigt - Enabled: {Me.Enabled}")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmError_Activated(sender As Object, e As EventArgs) Handles Me.Activated
|
||||||
|
LOGGER.Debug($"[frmError] Dialog aktiviert")
|
||||||
|
End Sub
|
||||||
|
' ========== FIX 4: FormClosing-Handler hinzufügen ==========
|
||||||
|
Private Sub frmError_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||||
|
If _isClosing Then
|
||||||
|
LOGGER.Debug($"[frmError] FormClosing: Close bereits aktiv, erlauben")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Falls Close von außen (z.B. [X]-Button) ausgelöst wurde
|
||||||
|
_isClosing = True
|
||||||
|
LOGGER.Debug($"[frmError] FormClosing: Flag gesetzt via FormClosing")
|
||||||
|
End Sub
|
||||||
|
' ========== ENDE FIX 4 ==========
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
465
app/TaskFlow/frmExpression_Designer.Designer.vb
generated
Normal file
465
app/TaskFlow/frmExpression_Designer.Designer.vb
generated
Normal file
@@ -0,0 +1,465 @@
|
|||||||
|
Imports DevExpress.XtraEditors
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
|
Partial Class frmExpression_Designer
|
||||||
|
Inherits DevExpress.XtraEditors.XtraForm
|
||||||
|
|
||||||
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()>
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Wird vom Windows Form-Designer benötigt.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||||
|
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||||
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Me.layoutControl1 = New DevExpress.XtraLayout.LayoutControl()
|
||||||
|
Me.btnClear = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnCancel = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnOK = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.lblColumnCount = New System.Windows.Forms.Label()
|
||||||
|
Me.lblValidation = New System.Windows.Forms.Label()
|
||||||
|
Me.btnValidate = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.panelOperators = New System.Windows.Forms.Panel()
|
||||||
|
Me.lstFunctions = New System.Windows.Forms.ListBox()
|
||||||
|
Me.lstColumns = New System.Windows.Forms.ListBox()
|
||||||
|
Me.txtExpression = New DevExpress.XtraEditors.MemoEdit()
|
||||||
|
Me.Root = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||||
|
Me.layoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.emptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem()
|
||||||
|
Me.layoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.layoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||||
|
Me.btnAdd = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnSubtract = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnMultiply = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnDivide = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnEquals = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnNotEquals = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnGreater = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnLess = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnAnd = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnOr = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnNot = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnOpenBracket = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnCloseBracket = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
CType(Me.layoutControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.layoutControl1.SuspendLayout()
|
||||||
|
CType(Me.txtExpression.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem6, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.emptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.layoutControlItem10, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'layoutControl1
|
||||||
|
'
|
||||||
|
Me.layoutControl1.Controls.Add(Me.btnClear)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.btnCancel)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.btnOK)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.lblColumnCount)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.lblValidation)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.btnValidate)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.panelOperators)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.lstFunctions)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.lstColumns)
|
||||||
|
Me.layoutControl1.Controls.Add(Me.txtExpression)
|
||||||
|
Me.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.layoutControl1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.layoutControl1.Name = "layoutControl1"
|
||||||
|
Me.layoutControl1.Root = Me.Root
|
||||||
|
Me.layoutControl1.Size = New System.Drawing.Size(900, 600)
|
||||||
|
Me.layoutControl1.TabIndex = 0
|
||||||
|
Me.layoutControl1.Text = "LayoutControl1"
|
||||||
|
'
|
||||||
|
'btnClear
|
||||||
|
'
|
||||||
|
Me.btnClear.Location = New System.Drawing.Point(809, 558)
|
||||||
|
Me.btnClear.Name = "btnClear"
|
||||||
|
Me.btnClear.Size = New System.Drawing.Size(79, 30)
|
||||||
|
Me.btnClear.StyleController = Me.layoutControl1
|
||||||
|
Me.btnClear.TabIndex = 13
|
||||||
|
Me.btnClear.Text = "Löschen"
|
||||||
|
'
|
||||||
|
'btnCancel
|
||||||
|
'
|
||||||
|
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
|
Me.btnCancel.Location = New System.Drawing.Point(724, 558)
|
||||||
|
Me.btnCancel.Name = "btnCancel"
|
||||||
|
Me.btnCancel.Size = New System.Drawing.Size(81, 30)
|
||||||
|
Me.btnCancel.StyleController = Me.layoutControl1
|
||||||
|
Me.btnCancel.TabIndex = 12
|
||||||
|
Me.btnCancel.Text = "Abbrechen"
|
||||||
|
'
|
||||||
|
'btnOK
|
||||||
|
'
|
||||||
|
Me.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||||
|
Me.btnOK.Location = New System.Drawing.Point(644, 558)
|
||||||
|
Me.btnOK.Name = "btnOK"
|
||||||
|
Me.btnOK.Size = New System.Drawing.Size(76, 30)
|
||||||
|
Me.btnOK.StyleController = Me.layoutControl1
|
||||||
|
Me.btnOK.TabIndex = 11
|
||||||
|
Me.btnOK.Text = "OK"
|
||||||
|
'
|
||||||
|
'lblColumnCount
|
||||||
|
'
|
||||||
|
Me.lblColumnCount.Location = New System.Drawing.Point(12, 472)
|
||||||
|
Me.lblColumnCount.Name = "lblColumnCount"
|
||||||
|
Me.lblColumnCount.Size = New System.Drawing.Size(876, 20)
|
||||||
|
Me.lblColumnCount.TabIndex = 10
|
||||||
|
Me.lblColumnCount.Text = "Referenzierte Spalten: 0"
|
||||||
|
'
|
||||||
|
'lblValidation
|
||||||
|
'
|
||||||
|
Me.lblValidation.Location = New System.Drawing.Point(116, 438)
|
||||||
|
Me.lblValidation.Name = "lblValidation"
|
||||||
|
Me.lblValidation.Size = New System.Drawing.Size(772, 30)
|
||||||
|
Me.lblValidation.TabIndex = 9
|
||||||
|
'
|
||||||
|
'btnValidate
|
||||||
|
'
|
||||||
|
Me.btnValidate.Location = New System.Drawing.Point(12, 438)
|
||||||
|
Me.btnValidate.Name = "btnValidate"
|
||||||
|
Me.btnValidate.Size = New System.Drawing.Size(100, 30)
|
||||||
|
Me.btnValidate.StyleController = Me.layoutControl1
|
||||||
|
Me.btnValidate.TabIndex = 8
|
||||||
|
Me.btnValidate.Text = "Validieren"
|
||||||
|
'
|
||||||
|
'panelOperators
|
||||||
|
'
|
||||||
|
Me.panelOperators.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.panelOperators.Location = New System.Drawing.Point(602, 161)
|
||||||
|
Me.panelOperators.Name = "panelOperators"
|
||||||
|
Me.panelOperators.Size = New System.Drawing.Size(286, 273)
|
||||||
|
Me.panelOperators.TabIndex = 7
|
||||||
|
'
|
||||||
|
'lstFunctions
|
||||||
|
'
|
||||||
|
Me.lstFunctions.FormattingEnabled = True
|
||||||
|
Me.lstFunctions.Location = New System.Drawing.Point(307, 161)
|
||||||
|
Me.lstFunctions.Name = "lstFunctions"
|
||||||
|
Me.lstFunctions.Size = New System.Drawing.Size(291, 273)
|
||||||
|
Me.lstFunctions.TabIndex = 6
|
||||||
|
'
|
||||||
|
'lstColumns
|
||||||
|
'
|
||||||
|
Me.lstColumns.FormattingEnabled = True
|
||||||
|
Me.lstColumns.Location = New System.Drawing.Point(12, 161)
|
||||||
|
Me.lstColumns.Name = "lstColumns"
|
||||||
|
Me.lstColumns.Size = New System.Drawing.Size(291, 273)
|
||||||
|
Me.lstColumns.TabIndex = 5
|
||||||
|
'
|
||||||
|
'txtExpression
|
||||||
|
'
|
||||||
|
Me.txtExpression.Location = New System.Drawing.Point(12, 28)
|
||||||
|
Me.txtExpression.Name = "txtExpression"
|
||||||
|
Me.txtExpression.Properties.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||||
|
Me.txtExpression.Properties.WordWrap = False
|
||||||
|
Me.txtExpression.Size = New System.Drawing.Size(876, 113)
|
||||||
|
Me.txtExpression.StyleController = Me.layoutControl1
|
||||||
|
Me.txtExpression.TabIndex = 4
|
||||||
|
'
|
||||||
|
'Root
|
||||||
|
'
|
||||||
|
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
||||||
|
Me.Root.GroupBordersVisible = False
|
||||||
|
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.layoutControlItem1, Me.layoutControlItem2, Me.layoutControlItem3, Me.layoutControlItem4, Me.layoutControlItem5, Me.layoutControlItem6, Me.layoutControlItem7, Me.emptySpaceItem1, Me.layoutControlItem8, Me.layoutControlItem9, Me.layoutControlItem10})
|
||||||
|
Me.Root.Name = "Root"
|
||||||
|
Me.Root.Size = New System.Drawing.Size(900, 600)
|
||||||
|
Me.Root.TextVisible = False
|
||||||
|
'
|
||||||
|
'layoutControlItem1
|
||||||
|
'
|
||||||
|
Me.layoutControlItem1.Control = Me.txtExpression
|
||||||
|
Me.layoutControlItem1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.layoutControlItem1.Name = "layoutControlItem1"
|
||||||
|
Me.layoutControlItem1.Size = New System.Drawing.Size(880, 133)
|
||||||
|
Me.layoutControlItem1.Text = "Expression:"
|
||||||
|
Me.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
|
Me.layoutControlItem1.TextSize = New System.Drawing.Size(61, 13)
|
||||||
|
'
|
||||||
|
'layoutControlItem2
|
||||||
|
'
|
||||||
|
Me.layoutControlItem2.Control = Me.lstColumns
|
||||||
|
Me.layoutControlItem2.Location = New System.Drawing.Point(0, 133)
|
||||||
|
Me.layoutControlItem2.Name = "layoutControlItem2"
|
||||||
|
Me.layoutControlItem2.Size = New System.Drawing.Size(295, 293)
|
||||||
|
Me.layoutControlItem2.Text = "Verfügbare Spalten:"
|
||||||
|
Me.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
|
Me.layoutControlItem2.TextSize = New System.Drawing.Size(61, 13)
|
||||||
|
'
|
||||||
|
'layoutControlItem3
|
||||||
|
'
|
||||||
|
Me.layoutControlItem3.Control = Me.lstFunctions
|
||||||
|
Me.layoutControlItem3.Location = New System.Drawing.Point(295, 133)
|
||||||
|
Me.layoutControlItem3.Name = "layoutControlItem3"
|
||||||
|
Me.layoutControlItem3.Size = New System.Drawing.Size(295, 293)
|
||||||
|
Me.layoutControlItem3.Text = "Funktionen:"
|
||||||
|
Me.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
|
Me.layoutControlItem3.TextSize = New System.Drawing.Size(61, 13)
|
||||||
|
'
|
||||||
|
'layoutControlItem4
|
||||||
|
'
|
||||||
|
Me.layoutControlItem4.Control = Me.panelOperators
|
||||||
|
Me.layoutControlItem4.Location = New System.Drawing.Point(590, 133)
|
||||||
|
Me.layoutControlItem4.Name = "layoutControlItem4"
|
||||||
|
Me.layoutControlItem4.Size = New System.Drawing.Size(290, 293)
|
||||||
|
Me.layoutControlItem4.Text = "Operatoren:"
|
||||||
|
Me.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
|
Me.layoutControlItem4.TextSize = New System.Drawing.Size(61, 13)
|
||||||
|
'
|
||||||
|
'layoutControlItem5
|
||||||
|
'
|
||||||
|
Me.layoutControlItem5.Control = Me.btnValidate
|
||||||
|
Me.layoutControlItem5.Location = New System.Drawing.Point(0, 426)
|
||||||
|
Me.layoutControlItem5.MaxSize = New System.Drawing.Size(104, 34)
|
||||||
|
Me.layoutControlItem5.MinSize = New System.Drawing.Size(104, 34)
|
||||||
|
Me.layoutControlItem5.Name = "layoutControlItem5"
|
||||||
|
Me.layoutControlItem5.Size = New System.Drawing.Size(104, 34)
|
||||||
|
Me.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom
|
||||||
|
Me.layoutControlItem5.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem5.TextVisible = False
|
||||||
|
'
|
||||||
|
'layoutControlItem6
|
||||||
|
'
|
||||||
|
Me.layoutControlItem6.Control = Me.lblValidation
|
||||||
|
Me.layoutControlItem6.Location = New System.Drawing.Point(104, 426)
|
||||||
|
Me.layoutControlItem6.Name = "layoutControlItem6"
|
||||||
|
Me.layoutControlItem6.Size = New System.Drawing.Size(776, 34)
|
||||||
|
Me.layoutControlItem6.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem6.TextVisible = False
|
||||||
|
'
|
||||||
|
'layoutControlItem7
|
||||||
|
'
|
||||||
|
Me.layoutControlItem7.Control = Me.lblColumnCount
|
||||||
|
Me.layoutControlItem7.Location = New System.Drawing.Point(0, 460)
|
||||||
|
Me.layoutControlItem7.Name = "layoutControlItem7"
|
||||||
|
Me.layoutControlItem7.Size = New System.Drawing.Size(880, 24)
|
||||||
|
Me.layoutControlItem7.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem7.TextVisible = False
|
||||||
|
'
|
||||||
|
'emptySpaceItem1
|
||||||
|
'
|
||||||
|
Me.emptySpaceItem1.AllowHotTrack = False
|
||||||
|
Me.emptySpaceItem1.Location = New System.Drawing.Point(0, 484)
|
||||||
|
Me.emptySpaceItem1.Name = "emptySpaceItem1"
|
||||||
|
Me.emptySpaceItem1.Size = New System.Drawing.Size(632, 62)
|
||||||
|
Me.emptySpaceItem1.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
'
|
||||||
|
'layoutControlItem8
|
||||||
|
'
|
||||||
|
Me.layoutControlItem8.Control = Me.btnOK
|
||||||
|
Me.layoutControlItem8.Location = New System.Drawing.Point(632, 546)
|
||||||
|
Me.layoutControlItem8.MaxSize = New System.Drawing.Size(80, 34)
|
||||||
|
Me.layoutControlItem8.MinSize = New System.Drawing.Size(80, 34)
|
||||||
|
Me.layoutControlItem8.Name = "layoutControlItem8"
|
||||||
|
Me.layoutControlItem8.Size = New System.Drawing.Size(80, 34)
|
||||||
|
Me.layoutControlItem8.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom
|
||||||
|
Me.layoutControlItem8.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem8.TextVisible = False
|
||||||
|
'
|
||||||
|
'layoutControlItem9
|
||||||
|
'
|
||||||
|
Me.layoutControlItem9.Control = Me.btnCancel
|
||||||
|
Me.layoutControlItem9.Location = New System.Drawing.Point(712, 546)
|
||||||
|
Me.layoutControlItem9.MaxSize = New System.Drawing.Size(85, 34)
|
||||||
|
Me.layoutControlItem9.MinSize = New System.Drawing.Size(85, 34)
|
||||||
|
Me.layoutControlItem9.Name = "layoutControlItem9"
|
||||||
|
Me.layoutControlItem9.Size = New System.Drawing.Size(85, 34)
|
||||||
|
Me.layoutControlItem9.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom
|
||||||
|
Me.layoutControlItem9.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem9.TextVisible = False
|
||||||
|
'
|
||||||
|
'layoutControlItem10
|
||||||
|
'
|
||||||
|
Me.layoutControlItem10.Control = Me.btnClear
|
||||||
|
Me.layoutControlItem10.Location = New System.Drawing.Point(797, 546)
|
||||||
|
Me.layoutControlItem10.MaxSize = New System.Drawing.Size(83, 34)
|
||||||
|
Me.layoutControlItem10.MinSize = New System.Drawing.Size(83, 34)
|
||||||
|
Me.layoutControlItem10.Name = "layoutControlItem10"
|
||||||
|
Me.layoutControlItem10.Size = New System.Drawing.Size(83, 34)
|
||||||
|
Me.layoutControlItem10.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom
|
||||||
|
Me.layoutControlItem10.TextSize = New System.Drawing.Size(0, 0)
|
||||||
|
Me.layoutControlItem10.TextVisible = False
|
||||||
|
'
|
||||||
|
'btnAdd
|
||||||
|
'
|
||||||
|
Me.btnAdd.Name = "btnAdd"
|
||||||
|
Me.btnAdd.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnAdd.TabIndex = 0
|
||||||
|
Me.btnAdd.Text = "+"
|
||||||
|
'
|
||||||
|
'btnSubtract
|
||||||
|
'
|
||||||
|
Me.btnSubtract.Name = "btnSubtract"
|
||||||
|
Me.btnSubtract.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnSubtract.TabIndex = 1
|
||||||
|
Me.btnSubtract.Text = "-"
|
||||||
|
'
|
||||||
|
'btnMultiply
|
||||||
|
'
|
||||||
|
Me.btnMultiply.Name = "btnMultiply"
|
||||||
|
Me.btnMultiply.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnMultiply.TabIndex = 2
|
||||||
|
Me.btnMultiply.Text = "*"
|
||||||
|
'
|
||||||
|
'btnDivide
|
||||||
|
'
|
||||||
|
Me.btnDivide.Name = "btnDivide"
|
||||||
|
Me.btnDivide.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnDivide.TabIndex = 3
|
||||||
|
Me.btnDivide.Text = "/"
|
||||||
|
'
|
||||||
|
'btnEquals
|
||||||
|
'
|
||||||
|
Me.btnEquals.Name = "btnEquals"
|
||||||
|
Me.btnEquals.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnEquals.TabIndex = 4
|
||||||
|
Me.btnEquals.Text = "="
|
||||||
|
'
|
||||||
|
'btnNotEquals
|
||||||
|
'
|
||||||
|
Me.btnNotEquals.Name = "btnNotEquals"
|
||||||
|
Me.btnNotEquals.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnNotEquals.TabIndex = 5
|
||||||
|
Me.btnNotEquals.Text = "<>"
|
||||||
|
'
|
||||||
|
'btnGreater
|
||||||
|
'
|
||||||
|
Me.btnGreater.Name = "btnGreater"
|
||||||
|
Me.btnGreater.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnGreater.TabIndex = 6
|
||||||
|
Me.btnGreater.Text = ">"
|
||||||
|
'
|
||||||
|
'btnLess
|
||||||
|
'
|
||||||
|
Me.btnLess.Name = "btnLess"
|
||||||
|
Me.btnLess.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnLess.TabIndex = 7
|
||||||
|
Me.btnLess.Text = "<"
|
||||||
|
'
|
||||||
|
'btnAnd
|
||||||
|
'
|
||||||
|
Me.btnAnd.Name = "btnAnd"
|
||||||
|
Me.btnAnd.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnAnd.TabIndex = 8
|
||||||
|
Me.btnAnd.Text = "AND"
|
||||||
|
'
|
||||||
|
'btnOr
|
||||||
|
'
|
||||||
|
Me.btnOr.Name = "btnOr"
|
||||||
|
Me.btnOr.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnOr.TabIndex = 9
|
||||||
|
Me.btnOr.Text = "OR"
|
||||||
|
'
|
||||||
|
'btnNot
|
||||||
|
'
|
||||||
|
Me.btnNot.Name = "btnNot"
|
||||||
|
Me.btnNot.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnNot.TabIndex = 10
|
||||||
|
Me.btnNot.Text = "NOT"
|
||||||
|
'
|
||||||
|
'btnOpenBracket
|
||||||
|
'
|
||||||
|
Me.btnOpenBracket.Name = "btnOpenBracket"
|
||||||
|
Me.btnOpenBracket.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnOpenBracket.TabIndex = 11
|
||||||
|
Me.btnOpenBracket.Text = "("
|
||||||
|
'
|
||||||
|
'btnCloseBracket
|
||||||
|
'
|
||||||
|
Me.btnCloseBracket.Name = "btnCloseBracket"
|
||||||
|
Me.btnCloseBracket.Size = New System.Drawing.Size(50, 30)
|
||||||
|
Me.btnCloseBracket.TabIndex = 12
|
||||||
|
Me.btnCloseBracket.Text = ")"
|
||||||
|
'
|
||||||
|
'frmExpression_Designer
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(900, 600)
|
||||||
|
Me.Controls.Add(Me.layoutControl1)
|
||||||
|
Me.Name = "frmExpression_Designer"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||||
|
Me.Text = "Expression Designer"
|
||||||
|
CType(Me.layoutControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.layoutControl1.ResumeLayout(False)
|
||||||
|
CType(Me.txtExpression.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem6, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.emptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.layoutControlItem10, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents layoutControl1 As DevExpress.XtraLayout.LayoutControl
|
||||||
|
Friend WithEvents btnClear As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnCancel As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnOK As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents lblColumnCount As Label
|
||||||
|
Friend WithEvents lblValidation As Label
|
||||||
|
Friend WithEvents btnValidate As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents panelOperators As Panel
|
||||||
|
Friend WithEvents lstFunctions As ListBox
|
||||||
|
Friend WithEvents lstColumns As ListBox
|
||||||
|
Friend WithEvents txtExpression As DevExpress.XtraEditors.MemoEdit
|
||||||
|
Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup
|
||||||
|
Friend WithEvents layoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem6 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents emptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem
|
||||||
|
Friend WithEvents layoutControlItem8 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem9 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents layoutControlItem10 As DevExpress.XtraLayout.LayoutControlItem
|
||||||
|
Friend WithEvents btnAdd As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnSubtract As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnMultiply As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnDivide As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnEquals As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnNotEquals As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnGreater As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnLess As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnAnd As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnOr As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnNot As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnOpenBracket As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnCloseBracket As DevExpress.XtraEditors.SimpleButton
|
||||||
|
End Class
|
||||||
120
app/TaskFlow/frmExpression_Designer.resx
Normal file
120
app/TaskFlow/frmExpression_Designer.resx
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
284
app/TaskFlow/frmExpression_Designer.vb
Normal file
284
app/TaskFlow/frmExpression_Designer.vb
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
Imports DevExpress.XtraEditors
|
||||||
|
|
||||||
|
Public Class frmExpression_Designer
|
||||||
|
Private _availableColumns As DataTable
|
||||||
|
Private _currentExpression As String = ""
|
||||||
|
|
||||||
|
Public Property Expression As String
|
||||||
|
Get
|
||||||
|
Return _currentExpression
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
_currentExpression = value
|
||||||
|
txtExpression.Text = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub New(pAvailableColumns As DataTable, pCurrentExpression As String)
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
_availableColumns = pAvailableColumns
|
||||||
|
_currentExpression = pCurrentExpression
|
||||||
|
End Sub
|
||||||
|
Private Sub ConfigureOperatorButtons()
|
||||||
|
Dim yPos As Integer = 10
|
||||||
|
|
||||||
|
' Arithmetische Operatoren
|
||||||
|
AddOperatorButton(btnAdd, "+", 10, yPos, "Addition")
|
||||||
|
AddOperatorButton(btnSubtract, "-", 70, yPos, "Subtraktion")
|
||||||
|
AddOperatorButton(btnMultiply, "*", 130, yPos, "Multiplikation")
|
||||||
|
AddOperatorButton(btnDivide, "/", 190, yPos, "Division")
|
||||||
|
|
||||||
|
yPos += 40
|
||||||
|
|
||||||
|
' Vergleichsoperatoren
|
||||||
|
AddOperatorButton(btnEquals, "=", 10, yPos, "Gleich")
|
||||||
|
AddOperatorButton(btnNotEquals, "<>", 70, yPos, "Ungleich")
|
||||||
|
AddOperatorButton(btnGreater, ">", 130, yPos, "Größer")
|
||||||
|
AddOperatorButton(btnLess, "<", 190, yPos, "Kleiner")
|
||||||
|
|
||||||
|
yPos += 40
|
||||||
|
|
||||||
|
' Logische Operatoren
|
||||||
|
AddOperatorButton(btnAnd, "AND", 10, yPos, "Und")
|
||||||
|
AddOperatorButton(btnOr, "OR", 70, yPos, "Oder")
|
||||||
|
AddOperatorButton(btnNot, "NOT", 130, yPos, "Nicht")
|
||||||
|
|
||||||
|
yPos += 40
|
||||||
|
|
||||||
|
' Klammern
|
||||||
|
AddOperatorButton(btnOpenBracket, "(", 10, yPos, "Öffnende Klammer")
|
||||||
|
AddOperatorButton(btnCloseBracket, ")", 70, yPos, "Schließende Klammer")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddOperatorButton(btn As SimpleButton, text As String, x As Integer, y As Integer, tooltip As String)
|
||||||
|
btn.Text = text
|
||||||
|
btn.Location = New Point(x, y)
|
||||||
|
btn.Size = New Size(50, 30)
|
||||||
|
btn.ToolTip = tooltip
|
||||||
|
Me.panelOperators.Controls.Add(btn)
|
||||||
|
End Sub
|
||||||
|
Private Sub frmExpressionDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
' ZUERST Operatoren-Buttons erstellen
|
||||||
|
ConfigureOperatorButtons()
|
||||||
|
|
||||||
|
' Spalten laden
|
||||||
|
LoadAvailableColumns()
|
||||||
|
|
||||||
|
' Funktionen laden
|
||||||
|
LoadFunctions()
|
||||||
|
|
||||||
|
' Operatoren laden
|
||||||
|
LoadOperators()
|
||||||
|
|
||||||
|
' Aktuelle Expression anzeigen
|
||||||
|
txtExpression.Text = _currentExpression
|
||||||
|
|
||||||
|
' Syntax-Highlighting aktivieren (optional)
|
||||||
|
UpdateSyntaxHighlighting()
|
||||||
|
' Event-Handler für Text-Änderungen hinzufügen
|
||||||
|
AddHandler txtExpression.EditValueChanged, AddressOf txtExpression_EditValueChanged
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub txtExpression_EditValueChanged(sender As Object, e As EventArgs)
|
||||||
|
' Validierungsmeldung zurücksetzen
|
||||||
|
lblValidation.Text = String.Empty
|
||||||
|
lblValidation.ForeColor = Color.Black
|
||||||
|
|
||||||
|
' Syntax-Highlighting aktualisieren
|
||||||
|
UpdateSyntaxHighlighting()
|
||||||
|
|
||||||
|
' Aktuellen Wert speichern
|
||||||
|
_currentExpression = txtExpression.Text
|
||||||
|
End Sub
|
||||||
|
Private Sub LoadAvailableColumns()
|
||||||
|
lstColumns.Items.Clear()
|
||||||
|
|
||||||
|
For Each row As DataRow In _availableColumns.Rows
|
||||||
|
Dim columnName As String = row.Item("SPALTENNAME").ToString()
|
||||||
|
Dim columnType As String = row.Item("TYPE_COLUMN").ToString()
|
||||||
|
Dim displayText As String = $"{columnName} ({columnType})"
|
||||||
|
|
||||||
|
lstColumns.Items.Add(New ListBoxItem With {
|
||||||
|
.DisplayText = displayText,
|
||||||
|
.ColumnName = columnName,
|
||||||
|
.DataType = columnType
|
||||||
|
})
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadFunctions()
|
||||||
|
lstFunctions.Items.Clear()
|
||||||
|
|
||||||
|
' Mathematische Funktionen
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("IIF", "IIF([Bedingung], Wahr, Falsch)", "Bedingte Verzweigung"))
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("IsNull", "IsNull([Spalte], Ersatzwert)", "Null-Behandlung"))
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("Convert", "Convert([Spalte], 'System.Double')", "Typkonvertierung"))
|
||||||
|
|
||||||
|
' String-Funktionen
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("Len", "Len([Text])", "Länge eines Textes"))
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("Trim", "Trim([Text])", "Leerzeichen entfernen"))
|
||||||
|
lstFunctions.Items.Add(New FunctionItem("Substring", "Substring([Text], Start, Länge)", "Teilstring extrahieren"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadOperators()
|
||||||
|
' Arithmetische Operatoren
|
||||||
|
btnAdd.Tag = " + "
|
||||||
|
btnSubtract.Tag = " - "
|
||||||
|
btnMultiply.Tag = " * "
|
||||||
|
btnDivide.Tag = " / "
|
||||||
|
|
||||||
|
' Vergleichsoperatoren
|
||||||
|
btnEquals.Tag = " = "
|
||||||
|
btnNotEquals.Tag = " <> "
|
||||||
|
btnGreater.Tag = " > "
|
||||||
|
btnLess.Tag = " < "
|
||||||
|
|
||||||
|
' Logische Operatoren
|
||||||
|
btnAnd.Tag = " AND "
|
||||||
|
btnOr.Tag = " OR "
|
||||||
|
btnNot.Tag = " NOT "
|
||||||
|
|
||||||
|
' Klammern
|
||||||
|
btnOpenBracket.Tag = "("
|
||||||
|
btnCloseBracket.Tag = ")"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lstColumns_DoubleClick(sender As Object, e As EventArgs) Handles lstColumns.DoubleClick
|
||||||
|
If lstColumns.SelectedItem IsNot Nothing Then
|
||||||
|
Dim item As ListBoxItem = CType(lstColumns.SelectedItem, ListBoxItem)
|
||||||
|
InsertText($"[{item.ColumnName}]")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lstFunctions_DoubleClick(sender As Object, e As EventArgs) Handles lstFunctions.DoubleClick
|
||||||
|
If lstFunctions.SelectedItem IsNot Nothing Then
|
||||||
|
Dim item As FunctionItem = CType(lstFunctions.SelectedItem, FunctionItem)
|
||||||
|
InsertText(item.Template)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Operator_Click(sender As Object, e As EventArgs) Handles btnAdd.Click, btnSubtract.Click, btnMultiply.Click, btnDivide.Click,
|
||||||
|
btnEquals.Click, btnNotEquals.Click, btnGreater.Click, btnLess.Click,
|
||||||
|
btnAnd.Click, btnOr.Click, btnNot.Click,
|
||||||
|
btnOpenBracket.Click, btnCloseBracket.Click
|
||||||
|
Dim btn As SimpleButton = CType(sender, SimpleButton)
|
||||||
|
InsertText(btn.Tag.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub InsertText(text As String)
|
||||||
|
Dim selectionStart As Integer = txtExpression.SelectionStart
|
||||||
|
|
||||||
|
txtExpression.Text = txtExpression.Text.Insert(selectionStart, text)
|
||||||
|
txtExpression.SelectionStart = selectionStart + text.Length
|
||||||
|
txtExpression.Focus()
|
||||||
|
|
||||||
|
_currentExpression = txtExpression.Text
|
||||||
|
' UpdateSyntaxHighlighting() wird jetzt im Event-Handler aufgerufen
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnValidate_Click(sender As Object, e As EventArgs) Handles btnValidate.Click
|
||||||
|
ValidateExpression()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ValidateExpression()
|
||||||
|
Try
|
||||||
|
' Testdatatable erstellen
|
||||||
|
Dim testTable As New DataTable()
|
||||||
|
|
||||||
|
' Spalten hinzufügen
|
||||||
|
For Each row As DataRow In _availableColumns.Rows
|
||||||
|
Dim colName As String = row.Item("SPALTENNAME").ToString()
|
||||||
|
Dim colType As String = row.Item("TYPE_COLUMN").ToString()
|
||||||
|
|
||||||
|
Dim dataType As Type = GetType(String)
|
||||||
|
Select Case colType
|
||||||
|
Case "INTEGER"
|
||||||
|
dataType = GetType(Integer)
|
||||||
|
Case "DOUBLE", "CURRENCY"
|
||||||
|
dataType = GetType(Double)
|
||||||
|
Case "BOOLEAN"
|
||||||
|
dataType = GetType(Boolean)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
testTable.Columns.Add(colName, dataType)
|
||||||
|
Next
|
||||||
|
|
||||||
|
' Test-Spalte mit Expression erstellen
|
||||||
|
Dim testColumn As New DataColumn("TEST_EXPRESSION") With {
|
||||||
|
.Expression = txtExpression.Text
|
||||||
|
}
|
||||||
|
testTable.Columns.Add(testColumn)
|
||||||
|
|
||||||
|
' Erfolg!
|
||||||
|
lblValidation.Text = "✓ Expression ist gültig!"
|
||||||
|
lblValidation.ForeColor = Color.Green
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
lblValidation.Text = $"⚠️ Fehler: {ex.Message}"
|
||||||
|
lblValidation.ForeColor = Color.Red
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateSyntaxHighlighting()
|
||||||
|
' Optional: Einfaches Syntax-Highlighting
|
||||||
|
' Spalten-Referenzen markieren
|
||||||
|
Dim pattern As String = "\[([^\]]+)\]"
|
||||||
|
Dim matches = Regex.Matches(txtExpression.Text, pattern)
|
||||||
|
|
||||||
|
' Anzahl der referenzierten Spalten anzeigen
|
||||||
|
lblColumnCount.Text = $"Referenzierte Spalten: {matches.Count}"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||||
|
' Finale Validierung
|
||||||
|
ValidateExpression()
|
||||||
|
|
||||||
|
If lblValidation.ForeColor = Color.Green Then
|
||||||
|
_currentExpression = txtExpression.Text
|
||||||
|
Me.DialogResult = DialogResult.OK
|
||||||
|
Me.Close()
|
||||||
|
Else
|
||||||
|
MessageBox.Show("Bitte korrigieren Sie die Expression zuerst!", "Validierung fehlgeschlagen", MessageBoxButtons.OK, MessageBoxIcon.Warning)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
|
Me.DialogResult = DialogResult.Cancel
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click
|
||||||
|
txtExpression.EditValue = String.Empty
|
||||||
|
_currentExpression = ""
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Hilfeklassen
|
||||||
|
Private Class ListBoxItem
|
||||||
|
Public Property DisplayText As String
|
||||||
|
Public Property ColumnName As String
|
||||||
|
Public Property DataType As String
|
||||||
|
|
||||||
|
Public Overrides Function ToString() As String
|
||||||
|
Return DisplayText
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Private Class FunctionItem
|
||||||
|
Public Property Name As String
|
||||||
|
Public Property Template As String
|
||||||
|
Public Property Description As String
|
||||||
|
|
||||||
|
Public Sub New(name As String, template As String, description As String)
|
||||||
|
Me.Name = name
|
||||||
|
Me.Template = template
|
||||||
|
Me.Description = description
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Function ToString() As String
|
||||||
|
Return $"{Name} - {Description}"
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Class
|
||||||
@@ -291,20 +291,25 @@ Public Class frmFormDesigner
|
|||||||
SetMovementHandlers(dgv)
|
SetMovementHandlers(dgv)
|
||||||
|
|
||||||
Case "TABLE"
|
Case "TABLE"
|
||||||
|
Try
|
||||||
Dim oSQL = $"Select IIF(LANG.CAPTION Is NULL,T.SPALTEN_HEADER,LANG.CAPTION) SPALTEN_HEADER_LANG, T.* FROM TBPM_CONTROL_TABLE T
|
Dim oSQL = $"Select IIF(LANG.CAPTION Is NULL,T.SPALTEN_HEADER,LANG.CAPTION) SPALTEN_HEADER_LANG, T.* FROM TBPM_CONTROL_TABLE T
|
||||||
INNER JOIN TBPM_PROFILE_CONTROLS T1 ON T.CONTROL_ID = T1.GUID LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID
|
INNER JOIN TBPM_PROFILE_CONTROLS T1 ON T.CONTROL_ID = T1.GUID LEFT JOIN (SELECT * FROM TBPM_CONTOL_TABLE_LANG WHERE LANG_CODE = '{USER_LANGUAGE}') LANG ON T.GUID = LANG.COL_ID
|
||||||
WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T.CONTROL_ID = {guid} ORDER BY T.SEQUENCE"
|
WHERE T1.CONTROL_ACTIVE = 1 AND T.CONTROL_ID = T1.GUID AND T.CONTROL_ID = {guid} ORDER BY T.SEQUENCE"
|
||||||
Dim oDTColumnsPerDevExGrid As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "FDesignLaodControls")
|
Dim oDTColumnsPerDevExGrid As DataTable = DatabaseFallback.GetDatatableECM(oSQL) ', "FDesignLaodControls")
|
||||||
|
|
||||||
|
|
||||||
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True, "EUR")
|
Dim table = ControlCreator.CreateExistingGridControl(row, oDTColumnsPerDevExGrid, True, "EUR")
|
||||||
|
|
||||||
AddHandler table.MouseClick, AddressOf gridControl_MouseClick
|
AddHandler table.MouseClick, AddressOf gridControl_MouseClick
|
||||||
' AddHandler table.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick
|
' AddHandler table.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick
|
||||||
|
|
||||||
|
pnldesigner.Controls.Add(table)
|
||||||
|
SetMovementHandlers(table)
|
||||||
|
Catch ex As Exception
|
||||||
|
_Logger.Error(ex)
|
||||||
|
MsgBox("Error while loading Table Control with Id " & guid & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||||
|
End Try
|
||||||
|
|
||||||
pnldesigner.Controls.Add(table)
|
|
||||||
SetMovementHandlers(table)
|
|
||||||
|
|
||||||
Case "LOOKUP"
|
Case "LOOKUP"
|
||||||
Dim lookup = ControlCreator.CreateExistingLookupControl(row, True)
|
Dim lookup = ControlCreator.CreateExistingLookupControl(row, True)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
Public Class frmGhostMode
|
Public Class frmGhostMode
|
||||||
Private Sub frmGhostMode_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub frmGhostMode_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
Dim oSQL = "SELECT [SQL_COMMAND] FROM TBDD_SQL_COMMANDS where TITLE = 'GHOST_SELECT'"
|
Dim oSQL = "SELECT [SQL_COMMAND] FROM TBDD_SQL_COMMANDS WITH (NOLOCK) where TITLE = 'GHOST_SELECT'"
|
||||||
Dim DT_USER = DatabaseFallback.GetDatatableECM(oSQL)
|
Dim DT_USER = DatabaseFallback.GetDatatableECM(oSQL)
|
||||||
'
|
'
|
||||||
If IsNothing(DT_USER) Then
|
If IsNothing(DT_USER) Then
|
||||||
LOGGER.Info("GHOST Select 1 was nothing, now trying 2nd..")
|
LOGGER.Info("GHOST Select 1 was nothing, now trying 2nd..")
|
||||||
oSQL = "SELECT CONFIG_VALUE FROM TBIDB_BASE WHERE CONFIG_NAME = 'GHOST_SELECT'"
|
oSQL = "SELECT CONFIG_VALUE FROM TBIDB_BASE WITH (NOLOCK) WHERE CONFIG_NAME = 'GHOST_SELECT'"
|
||||||
If Not IsNothing(oSQL) Then
|
If Not IsNothing(oSQL) Then
|
||||||
oSQL = DatabaseFallback.GetScalarValueIDB(oSQL)
|
oSQL = DatabaseFallback.GetScalarValueIDB(oSQL)
|
||||||
DT_USER = DatabaseFallback.GetDatatableIDB(oSQL)
|
DT_USER = DatabaseFallback.GetDatatableIDB(oSQL)
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAbgBCwG4AQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAfABCwHwAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
@@ -2105,7 +2105,7 @@
|
|||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>147</value>
|
<value>123</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||||
<value>9, 19</value>
|
<value>9, 19</value>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -624,6 +624,12 @@
|
|||||||
<Compile Include="frmError.vb">
|
<Compile Include="frmError.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="frmExpression_Designer.Designer.vb">
|
||||||
|
<DependentUpon>frmExpression_Designer.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="frmExpression_Designer.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="frmFileInfo.Designer.vb">
|
<Compile Include="frmFileInfo.Designer.vb">
|
||||||
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -868,6 +874,9 @@
|
|||||||
<DependentUpon>frmError.vb</DependentUpon>
|
<DependentUpon>frmError.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="frmExpression_Designer.resx">
|
||||||
|
<DependentUpon>frmExpression_Designer.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmFileInfo.resx">
|
<EmbeddedResource Include="frmFileInfo.resx">
|
||||||
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
<DependentUpon>frmFileInfo.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -1272,6 +1281,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Changelog.md" />
|
<None Include="Changelog.md" />
|
||||||
|
<Content Include="DataColumnExpression.txt" />
|
||||||
<Content Include="DD_Icons_ICO_PMANAGER_48px.ico" />
|
<Content Include="DD_Icons_ICO_PMANAGER_48px.ico" />
|
||||||
<Content Include="DD_taskFLOW_ICON.ico" />
|
<Content Include="DD_taskFLOW_ICON.ico" />
|
||||||
<Content Include="MailLicense.xml">
|
<Content Include="MailLicense.xml">
|
||||||
|
|||||||
Reference in New Issue
Block a user