MS 2.8.2 Fehlerhandling und Column-Formel Test bei Henning

This commit is contained in:
Developer01
2026-02-25 13:16:12 +01:00
parent 25dcfb2061
commit 743ef3fe22
16 changed files with 2392 additions and 1160 deletions

View File

@@ -397,7 +397,7 @@ Public Class ClassInit
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()
@@ -468,7 +468,7 @@ Public Class ClassInit
' DataASorDB = New ClassDataASorDB
'End If
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"
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")
End If
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))
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 = DatabaseFallback.GetDatatable("TBDD_GUI_LANGUAGE_PHRASE", New GetDatatableOptions(oSql, DatabaseType.ECM))
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 {
.SortByColumn = "PROFILE_ID,TAB_INDEX"
})
DT_FILTERED_PROFILE_SEARCHES_DOC = BASEDATA_DT_PROFILES_SEARCHES_DOC.Clone()
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))
@@ -524,11 +524,11 @@ Public Class ClassInit
BASEDATA_DT_CHARTS = DatabaseFallback.GetDatatable("TBPM_CHART", New GetDatatableOptions(oSql, DatabaseType.ECM))
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))
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))
@@ -556,7 +556,7 @@ Public Class ClassInit
End If
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 & "'"
Dim oDT_USER_KEY_VALUE_PAIR As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSql, DatabaseType.ECM))
@@ -608,7 +608,7 @@ Public Class ClassInit
<STAThread()>
Private Function Settings_LoadBasicConfig()
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
'oDTtbdd_Modules = DataASorDB.GetDatatable("DD_ECM", oSql, "tbdd_Modules", $" SHORT_NAME = 'PM'")
oDTtbdd_Modules = DatabaseFallback.GetDatatable("TBDD_MODULES", New GetDatatableOptions(oSql, DatabaseType.ECM) With {

View File

@@ -1,7 +1,7 @@
Imports DigitalData.Modules.Database
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 ...")
Dim oStopwatch As New RefreshHelper.SW("Refresh_Params")
FORCE_LAYOUT_OVERVIEW = False
@@ -221,14 +221,14 @@ Public Class ClassParamRefresh
Catch ex As Exception
TITLE_NOTIFICATIONS = ""
End Try
ElseIf oMode.StartsWith("TF.InheritanceMsgAmount") Then
ElseIf oMode.StartsWith("TF.InheritanceMsgAmount") And pMode = "Load" Then
Dim oParam = oMode.Replace("TF.InheritanceMsgAmount=", "")
Try
InheritanceMsgAmount = oParam
Catch ex As Exception
End Try
ElseIf oMode.StartsWith("TF.InheritanceCalcReset") Then
ElseIf oMode.StartsWith("TF.InheritanceCalcReset") And pMode = "Load" Then
Dim oParam = oMode.Replace("TF.InheritanceCalcReset=", "")
Try
If CBool(oParam) = True Then

View File

@@ -34,6 +34,7 @@ Namespace ControlCreator
Public Function CreateGridColumns(pColumnTable As DataTable) As DataTable
Dim oDataTable As New DataTable
Dim columnsWithExpressions As New List(Of Tuple(Of DataColumn, String))
For Each oRow As DataRow In pColumnTable.Rows
' Create Columns in Datatable
@@ -57,22 +58,65 @@ Namespace ControlCreator
Case Else
oColumn.DataType = GetType(String)
End Select
Dim oFormulaExpression = ObjectEx.NotNull(oRow.Item("FORMULA_EXPRESSION"), String.Empty)
If oFormulaExpression <> String.Empty Then
Try
oColumn.Expression = 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
' Expression merken, aber erst später setzen
columnsWithExpressions.Add(New Tuple(Of DataColumn, String)(oColumn, oFormulaExpression))
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
Return oDataTable
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))
For Each oRow As DataRow In pColumnTable.Rows
' Fetch and cache Combobox results

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.8.1.0")>
<Assembly: AssemblyVersion("2.8.2.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: NeutralResourcesLanguage("")>

View File

@@ -624,6 +624,12 @@
<Compile Include="frmError.vb">
<SubType>Form</SubType>
</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">
<DependentUpon>frmFileInfo.vb</DependentUpon>
</Compile>
@@ -868,6 +874,9 @@
<DependentUpon>frmError.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmExpression_Designer.resx">
<DependentUpon>frmExpression_Designer.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmFileInfo.resx">
<DependentUpon>frmFileInfo.vb</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -37,7 +37,7 @@ Partial Class frmColumn_Detail
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
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.LU_CAPTIONTextBox = New System.Windows.Forms.TextBox()
Me.GUIDTextBox = New DevExpress.XtraEditors.TextEdit()
@@ -88,7 +88,7 @@ Partial Class frmColumn_Detail
Me.LayoutControlItem23 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem21 = 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.DD_DMSLiteDataSet, 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.LayoutControlItem21, 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()
'
'TBPM_CONTROL_TABLEBindingSource
@@ -237,7 +237,7 @@ Partial Class frmColumn_Detail
'
'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.LU_CAPTIONTextBox)
Me.LayoutControl1.Controls.Add(Me.GUIDTextBox)
@@ -266,15 +266,11 @@ Partial Class frmColumn_Detail
Me.LayoutControl1.Name = "LayoutControl1"
Me.LayoutControl1.Root = Me.Root
'
'LabelControl1
'SimpleButton3
'
Me.LabelControl1.Appearance.Font = CType(resources.GetObject("LabelControl1.Appearance.Font"), System.Drawing.Font)
Me.LabelControl1.Appearance.Options.UseFont = True
Me.LabelControl1.Appearance.Options.UseTextOptions = True
Me.LabelControl1.Appearance.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap
resources.ApplyResources(Me.LabelControl1, "LabelControl1")
Me.LabelControl1.Name = "LabelControl1"
Me.LabelControl1.StyleController = Me.LayoutControl1
resources.ApplyResources(Me.SimpleButton3, "SimpleButton3")
Me.SimpleButton3.Name = "SimpleButton3"
Me.SimpleButton3.StyleController = Me.LayoutControl1
'
'FORMULA_EXPRESSIONTextBox
'
@@ -482,7 +478,7 @@ Partial Class frmColumn_Detail
'
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.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.Size = New System.Drawing.Size(593, 816)
Me.Root.TextVisible = False
@@ -578,7 +574,7 @@ Partial Class frmColumn_Detail
'LayoutControlItem10
'
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.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem10.Size = New System.Drawing.Size(286, 40)
@@ -588,7 +584,7 @@ Partial Class frmColumn_Detail
'LayoutControlItem12
'
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.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem12.Size = New System.Drawing.Size(286, 40)
@@ -598,7 +594,7 @@ Partial Class frmColumn_Detail
'LayoutControlItem11
'
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.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem11.Size = New System.Drawing.Size(287, 40)
@@ -608,7 +604,7 @@ Partial Class frmColumn_Detail
'LayoutControlItem13
'
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.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem13.Size = New System.Drawing.Size(287, 40)
@@ -618,9 +614,9 @@ Partial Class frmColumn_Detail
'LayoutControlGroup1
'
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.Size = New System.Drawing.Size(573, 169)
Me.LayoutControlGroup1.Size = New System.Drawing.Size(573, 258)
resources.ApplyResources(Me.LayoutControlGroup1, "LayoutControlGroup1")
'
'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.Location = New System.Drawing.Point(0, 90)
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.TextVisible = False
'
@@ -724,18 +720,18 @@ Partial Class frmColumn_Detail
Me.LayoutControlItem24.Location = New System.Drawing.Point(0, 412)
Me.LayoutControlItem24.Name = "LayoutControlItem24"
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")
Me.LayoutControlItem24.TextSize = New System.Drawing.Size(110, 13)
'
'LayoutControlItem15
'LayoutControlItem26
'
Me.LayoutControlItem15.Control = Me.LabelControl1
Me.LayoutControlItem15.Location = New System.Drawing.Point(0, 452)
Me.LayoutControlItem15.Name = "LayoutControlItem15"
Me.LayoutControlItem15.Size = New System.Drawing.Size(573, 95)
Me.LayoutControlItem15.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem15.TextVisible = False
Me.LayoutControlItem26.Control = Me.SimpleButton3
Me.LayoutControlItem26.Location = New System.Drawing.Point(488, 412)
Me.LayoutControlItem26.Name = "LayoutControlItem26"
Me.LayoutControlItem26.Size = New System.Drawing.Size(85, 46)
Me.LayoutControlItem26.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem26.TextVisible = False
'
'frmColumn_Detail
'
@@ -802,7 +798,7 @@ Partial Class frmColumn_Detail
CType(Me.LayoutControlItem23, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem21, 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.PerformLayout
@@ -870,6 +866,6 @@ End Sub
Friend WithEvents FORMULA_EXPRESSIONTextBox As TextBox
Friend WithEvents LayoutControlItem24 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LayoutControlItem25 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
Friend WithEvents LayoutControlItem15 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents SimpleButton3 As DevExpress.XtraEditors.SimpleButton
Friend WithEvents LayoutControlItem26 As DevExpress.XtraLayout.LayoutControlItem
End Class

View File

@@ -184,50 +184,40 @@
<data name="RibbonPage2.Text" xml:space="preserve">
<value>RibbonPage2</value>
</data>
<data name="LabelControl1.Appearance.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt</value>
<data name="SimpleButton3.Location" type="System.Drawing.Point, System.Drawing">
<value>500, 424</value>
</data>
<assembly alias="DevExpress.XtraEditors.v21.2" name="DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="LabelControl1.AutoSizeMode" type="DevExpress.XtraEditors.LabelAutoSizeMode, DevExpress.XtraEditors.v21.2">
<value>None</value>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="SimpleButton3.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>10, 10, 10, 10</value>
</data>
<data name="LabelControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 464</value>
</data>
<data name="LabelControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>569, 91</value>
<data name="SimpleButton3.Size" type="System.Drawing.Size, System.Drawing">
<value>81, 42</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="LabelControl1.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
<data name="SimpleButton3.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="LabelControl1.Text" xml:space="preserve">
<value>In der Formel nutzen wir die DataColumn.ExpressionAusdruckssprache von ADO.NET
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 name="SimpleButton3.Text" xml:space="preserve">
<value>...</value>
</data>
<data name="&gt;&gt;LabelControl1.Name" xml:space="preserve">
<value>LabelControl1</value>
<data name="&gt;&gt;SimpleButton3.Name" xml:space="preserve">
<value>SimpleButton3</value>
</data>
<data name="&gt;&gt;LabelControl1.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
<data name="&gt;&gt;SimpleButton3.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;LabelControl1.Parent" xml:space="preserve">
<data name="&gt;&gt;SimpleButton3.Parent" xml:space="preserve">
<value>LayoutControl1</value>
</data>
<data name="&gt;&gt;LabelControl1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;SimpleButton3.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="FORMULA_EXPRESSIONTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>142, 432</value>
</data>
<data name="FORMULA_EXPRESSIONTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>431, 20</value>
<value>346, 20</value>
</data>
<data name="FORMULA_EXPRESSIONTextBox.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
@@ -380,7 +370,6 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<data name="SimpleButton1.Location" type="System.Drawing.Point, System.Drawing">
<value>500, 212</value>
</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">
<value>10, 10, 10, 10</value>
</data>
@@ -478,7 +467,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>15</value>
</data>
<data name="TextEdit7.Location" type="System.Drawing.Point, System.Drawing">
<value>142, 567</value>
<value>142, 478</value>
</data>
<data name="TextEdit7.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 20</value>
@@ -499,7 +488,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>16</value>
</data>
<data name="TextEdit8.Location" type="System.Drawing.Point, System.Drawing">
<value>428, 567</value>
<value>428, 478</value>
</data>
<data name="TextEdit8.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 20</value>
@@ -520,7 +509,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>17</value>
</data>
<data name="CHANGED_WHOTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>142, 607</value>
<value>142, 518</value>
</data>
<data name="CHANGED_WHOTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 20</value>
@@ -541,7 +530,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>18</value>
</data>
<data name="TextEdit10.Location" type="System.Drawing.Point, System.Drawing">
<value>428, 607</value>
<value>428, 518</value>
</data>
<data name="TextEdit10.Size" type="System.Drawing.Size, System.Drawing">
<value>145, 20</value>
@@ -562,7 +551,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>19</value>
</data>
<data name="READ_ONLYCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 696</value>
<value>24, 607</value>
</data>
<data name="READ_ONLYCheckBox.Properties.Caption" xml:space="preserve">
<value>Read Only</value>
@@ -586,7 +575,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>20</value>
</data>
<data name="LOAD_IDX_VALUECheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 740</value>
<value>24, 651</value>
</data>
<data name="LOAD_IDX_VALUECheckBox.Properties.Caption" xml:space="preserve">
<value>Lade Indexdaten</value>
@@ -610,7 +599,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>21</value>
</data>
<data name="VALIDATIONCheckbox.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 672</value>
<value>24, 583</value>
</data>
<data name="VALIDATIONCheckbox.Properties.Caption" xml:space="preserve">
<value>Muss ausgefüllt werden</value>
@@ -634,7 +623,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>22</value>
</data>
<data name="ADVANCED_LOOKUPCheckbox.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 718</value>
<value>24, 629</value>
</data>
<data name="ADVANCED_LOOKUPCheckbox.Properties.Caption" xml:space="preserve">
<value>Erweitertes Auswahl Control (für lange Listen)</value>
@@ -706,7 +695,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>25</value>
</data>
<data name="SUMMARY_FUNCTIONCombobox.Location" type="System.Drawing.Point, System.Drawing">
<value>420, 672</value>
<value>420, 583</value>
</data>
<data name="SUMMARY_FUNCTIONCombobox.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value>
@@ -760,7 +749,7 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<value>27</value>
</data>
<data name="CheckEditInheritValue.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 762</value>
<value>24, 673</value>
</data>
<data name="CheckEditInheritValue.Properties.Caption" xml:space="preserve">
<value>Inherit Value (Vererbt den Wert der aktuellen Zelle auf alle nachfolgenden)</value>
@@ -1098,10 +1087,10 @@ IIF([colSTATUS] = 'X', 'OK', 'NOK')
<data name="&gt;&gt;LayoutControlItem24.Type" xml:space="preserve">
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;LayoutControlItem15.Name" xml:space="preserve">
<value>LayoutControlItem15</value>
<data name="&gt;&gt;LayoutControlItem26.Name" xml:space="preserve">
<value>LayoutControlItem26</value>
</data>
<data name="&gt;&gt;LayoutControlItem15.Type" xml:space="preserve">
<data name="&gt;&gt;LayoutControlItem26.Type" xml:space="preserve">
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">

View File

@@ -206,4 +206,22 @@ Public Class frmColumn_Detail
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
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

View 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

View 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>

View 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

View File

@@ -291,20 +291,25 @@ Public Class frmFormDesigner
SetMovementHandlers(dgv)
Case "TABLE"
Dim oSQL = $"Select IIF(LANG.CAPTION Is NULL,T.SPALTEN_HEADER,LANG.CAPTION) SPALTEN_HEADER_LANG, T.* FROM TBPM_CONTROL_TABLE T
Try
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
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.ColumnHeaderMouseClick, AddressOf table_ColumnHeaderMouseClick
AddHandler table.MouseClick, AddressOf gridControl_MouseClick
' 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"
Dim lookup = ControlCreator.CreateExistingLookupControl(row, True)

View File

@@ -1,11 +1,11 @@
Public Class frmGhostMode
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)
'
If IsNothing(DT_USER) Then
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
oSQL = DatabaseFallback.GetScalarValueIDB(oSQL)
DT_USER = DatabaseFallback.GetDatatableIDB(oSQL)

View File

@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
CAAAAk1TRnQBSQFMAgEBAgEAAbgBCwG4AQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAcABCwHAAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -21,6 +21,7 @@ Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
Imports DigitalData.Modules.Windream
Imports DigitalData.Modules.ZooFlow
Imports GdPicture.Internal.CAD.DWG.Entities
Public Class frmMain
Private Property FormHelper As FormHelper
@@ -36,7 +37,7 @@ Public Class frmMain
Private YellowDocuments As Integer = 0
Private GreenDocuments As Integer = 0
Private GridViewItem_Clicked = Nothing
Private GridCursorLocation As Point
Private GridCursorLocation As System.Drawing.Point
Private GRID_LOAD_TYPE As String = "OVERVIEW"
Private GRID_INV_COL_REMOVED As Boolean = False
Private NO_WORKFLOWITEMS As Boolean = False
@@ -454,7 +455,7 @@ Public Class frmMain
Timer_Inactivity_Reset_Disable("FormLoad")
'Restore_Form_Position()
Dim oSavedPosition As Point = My.Settings.frmMainPosition
Dim oSavedPosition As System.Drawing.Point = My.Settings.frmMainPosition
' Prüfen, ob die Position sichtbar ist
If IsPositionVisible(oSavedPosition) Then
@@ -539,10 +540,10 @@ Public Class frmMain
FormOpenClose = False
End Sub
Private Function IsPositionVisible(position As Point) As Boolean
Private Function IsPositionVisible(position As System.Drawing.Point) As Boolean
For Each scr As Screen In Screen.AllScreens
If scr.WorkingArea.Contains(position) Then
Return True ' Punkt ist sichtbar
Return True ' Punkt ist auf diesem Bildschirm sichtbar
End If
Next
Return False ' Punkt ist außerhalb aller sichtbaren Bereiche
@@ -1430,7 +1431,6 @@ Public Class frmMain
' ========== UI VORBEREITEN (NUR BEI OVERVIEW) ==========
Dim loadSuccess As Boolean = False
If GRID_LOAD_TYPE = "OVERVIEW" Then
If LOG_HOTSPOTS Then
LOGGER.Info("[PERF Decide_Load] ruft LoadOverviewData auf...")
@@ -1441,6 +1441,8 @@ Public Class frmMain
Exit Function
End If
Await Task.Yield()
' Daten laden
loadSuccess = Await LoadOverviewData(pIsFormLoad, ForceReload)
@@ -1454,6 +1456,8 @@ Public Class frmMain
Exit Function
End If
Await Task.Yield()
' Daten laden
loadSuccess = Await LoadProfileData(ForceReload)
End If
@@ -1518,9 +1522,17 @@ Public Class frmMain
' OVERVIEW DATEN LADEN - Spezialisiert auf Overview
' ========================================
Private Async Function LoadOverviewData(pFormLoad As Boolean, pForceReload As Boolean) As Task(Of Boolean)
Dim perfStart As DateTime = DateTime.MinValue
Dim perfStep As DateTime = DateTime.MinValue
Dim gridUpdateStarted As Boolean = False
Dim viewUpdateStarted As Boolean = False
If LOG_HOTSPOTS Then
perfStart = DateTime.Now
perfStep = perfStart
LOGGER.Info($"[PERF LoadOverviewData] START - pFormLoad:[{pFormLoad}] pForceReload:[{pForceReload}]")
End If
Try
' ========== GRID UPDATES VORBEREITEN ==========
If GridControlWorkflows.Visible Then
@@ -1541,8 +1553,22 @@ Public Class frmMain
Return False
End If
If LOG_HOTSPOTS Then
LOGGER.Info($"[PERF LoadOverviewData] Load_Profiles_for_User wird aufgerufen...")
End If
Load_Profiles_for_User()
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
If elapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ Load_Profiles_for_User LANGSAM: {elapsed}ms (Schwellwert: 4000ms)")
Else
LOGGER.Info($"[PERF LoadOverviewData] Load_Profiles_for_User: {elapsed}ms")
End If
perfStep = DateTime.Now
End If
' ========== SQL VORBEREITEN ==========
Dim oSQLOverview = BASEDATA_DT_CONFIG.Rows(0).Item("SQL_PROFILE_MAIN_VIEW")
@@ -1557,9 +1583,25 @@ Public Class frmMain
' SQL-Platzhalter ersetzen
oSQLOverview = PrepareSQLWithReplacements(oSQLOverview)
If LOG_HOTSPOTS Then
Dim rowCount = If(DT_CURR_WF_ITEMS IsNot Nothing, DT_CURR_WF_ITEMS.Rows.Count, 0)
LOGGER.Info($"[PERF LoadOverviewData] SQL-Abfrage für Workflows startet (aktuelle Rows: {rowCount})...")
End If
' ========== DATEN ABRUFEN ==========
DT_CURR_WF_ITEMS = Await DatabaseFallback.GetDatatableECMAsync(oSQLOverview)
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
Dim rowCount = If(DT_CURR_WF_ITEMS IsNot Nothing, DT_CURR_WF_ITEMS.Rows.Count, 0)
If elapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ Datenbank-Abfrage für Workflows LANGSAM: {elapsed}ms ({rowCount} Zeilen) (Schwellwert: 4000ms) - SQL prüfen!")
Else
LOGGER.Info($"[PERF LoadOverviewData] Datenbank-Abfrage für Workflows: {elapsed}ms ({rowCount} Zeilen)")
End If
perfStep = DateTime.Now
End If
If IsNothing(DT_CURR_WF_ITEMS) Then
NO_WORKFLOWITEMS = True
GridControlWorkflows.Visible = False
@@ -1580,7 +1622,21 @@ Public Class frmMain
End If
' ========== ICON-SPALTE VORBEREITEN ==========
PrepareIconColumn()
If LOG_HOTSPOTS Then
LOGGER.Info($"[PERF LoadOverviewData] Icon-Verarbeitung startet ({DT_CURR_WF_ITEMS.Rows.Count} Zeilen)...")
End If
Await Task.Run(Sub() PrepareIconColumn())
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
If elapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ Icon-Verarbeitung LANGSAM: {elapsed}ms ({DT_CURR_WF_ITEMS.Rows.Count} Zeilen) (Schwellwert: 4000ms)")
Else
LOGGER.Info($"[PERF LoadOverviewData] Icon-Verarbeitung: {elapsed}ms")
End If
perfStep = DateTime.Now
End If
' ========== GRID MIT DATEN FÜLLEN ==========
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
@@ -1589,9 +1645,32 @@ Public Class frmMain
Create_View_Caption()
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
If elapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ Grid-DataSource-Zuweisung LANGSAM: {elapsed}ms (Schwellwert: 4000ms)")
Else
LOGGER.Info($"[PERF LoadOverviewData] Grid-DataSource-Zuweisung: {elapsed}ms")
End If
perfStep = DateTime.Now
End If
' ========== LAYOUT ANWENDEN ==========
If LOG_HOTSPOTS Then
LOGGER.Info($"[PERF LoadOverviewData] Layout-Anwendung startet...")
End If
Await ApplyGridLayout(pForceReload)
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
If elapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ Layout-Wiederherstellung LANGSAM: {elapsed}ms (Schwellwert: 4000ms)")
Else
LOGGER.Info($"[PERF LoadOverviewData] Layout-Wiederherstellung: {elapsed}ms")
End If
End If
Return True
Catch ex As Exception
@@ -1609,9 +1688,17 @@ Public Class frmMain
' LoadingPanel verstecken (NUR HIER!)
GridViewWorkflows.HideLoadingPanel()
If LOG_HOTSPOTS Then
Dim totalElapsed = (DateTime.Now - perfStart).TotalMilliseconds
If totalElapsed > 4000 Then
LOGGER.Warn($"[PERF LoadOverviewData] ⚠️ GESAMT LANGSAM: {totalElapsed}ms (Schwellwert: 4000ms)")
Else
LOGGER.Info($"[PERF LoadOverviewData] GESAMT: {totalElapsed}ms")
End If
End If
End Try
End Function
' ========================================
' PROFILE DATEN LADEN - Spezialisiert auf einzelnes Profil
' ========================================
@@ -1657,7 +1744,7 @@ Public Class frmMain
End If
' ========== BASIC VIEW ERSTELLEN ==========
CreateBasicViewForProfile()
Await CreateBasicViewForProfile()
Return True
@@ -1793,7 +1880,7 @@ Public Class frmMain
End Try
End Sub
Private Sub CreateBasicViewForProfile()
Private Async Function CreateBasicViewForProfile() As Task
GridControlWorkflows.DataSource = Nothing
Try
GridViewWorkflows.Columns.Clear()
@@ -1802,7 +1889,7 @@ Public Class frmMain
LOGGER.Warn("⚠️ Could not clear GridViewWorkflows.Columns")
End Try
PrepareIconColumn()
Await Task.Run(Sub() PrepareIconColumn())
bindsourcegrid.DataSource = DT_CURR_WF_ITEMS
GridControlWorkflows.DataSource = bindsourcegrid
@@ -1820,7 +1907,7 @@ Public Class frmMain
Catch ex As Exception
End Try
End If
End Sub
End Function
Private Sub ApplyPostLoadSettings()
If SHOW_MASS_VALIDATOR = False Then
@@ -2099,45 +2186,100 @@ Public Class frmMain
CURRENT_CLICKED_PROFILE_ID = oHitProfilID
End If
End If
' ========== GRUPPE VERARBEITEN (OPTIMIERT) ==========
' ========== GRUPPE VERARBEITEN (MIT KORREKTER GRUPPEN-ERMITTLUNG) ==========
If startedFrom = "CMGROUP" Then
LOGGER.Debug("Loading Child DocIds..")
LOGGER.Debug("Loading Child DocIds from focused expanded group..")
Dim oIds As New List(Of Integer)
Dim oGroupRowHandle = hitInfo.RowHandle
Dim oChildRowCount = GridViewWorkflows.GetChildRowCount(oGroupRowHandle)
Dim oGroupRowHandle As Integer
' OPTIMIERUNG: Kapazität vorbelegen
oIds.Capacity = oChildRowCount
' OPTIMIERUNG: Direkte Schleife statt verschachtelter Logik
If oChildRowCount > 0 Then
For index = 0 To oChildRowCount - 1
Dim oChildRowHandle = GridViewWorkflows.GetChildRowHandle(oGroupRowHandle, index)
Dim oRow = GridViewWorkflows.GetRow(oChildRowHandle)
If oRow IsNot Nothing Then
Dim oDocId = oRow.Item("DocId")
If oDocId IsNot Nothing Then
oIds.Add(oDocId)
End If
End If
Next
' KRITISCH: Den RICHTIGEN Gruppen-Handle ermitteln
If GridViewWorkflows.IsGroupRow(hitInfo.RowHandle) Then
' User hat direkt auf die Gruppen-Zeile geklickt
oGroupRowHandle = hitInfo.RowHandle
LOGGER.Debug($"User clicked directly on group row, handle: {oGroupRowHandle}")
Else
' Fallback nur bei Bedarf
For index = 0 To GridViewWorkflows.RowCount - 1
Dim oRow = GridViewWorkflows.GetRow(index)
If oRow Is Nothing Then Continue For
' User hat auf eine Daten-Zeile INNERHALB einer Gruppe geklickt
' → Parent-Gruppe ermitteln
oGroupRowHandle = GridViewWorkflows.GetParentRowHandle(hitInfo.RowHandle)
LOGGER.Debug($"User clicked on data row {hitInfo.RowHandle}, parent group handle: {oGroupRowHandle}")
Dim oProfileId = oRow.row.item("PROFILE_ID")
If oProfileId Is Nothing Then Continue For
If CInt(oProfileId) = CURRENT_CLICKED_PROFILE_ID Then
oIds.Add(oRow.item("DocId"))
End If
Next
If Not GridViewWorkflows.IsGroupRow(oGroupRowHandle) Then
LOGGER.Warn($"⚠️ Parent handle {oGroupRowHandle} is not a group row!")
FormHelper.ShowWarningMessage("Bitte klicken Sie direkt auf die Gruppenzeile!", omsgTitleAttention)
Exit Function
End If
End If
LOGGER.Debug("[{0}] DocIds loaded", oIds.Count)
' Spalten-Objekt VOR der Schleife holen
Dim docIdColumn As GridColumn = GridViewWorkflows.Columns.ColumnByFieldName("DocID")
If docIdColumn Is Nothing Then
docIdColumn = GridViewWorkflows.Columns.ColumnByFieldName("DOCID")
End If
If docIdColumn Is Nothing Then
LOGGER.Error("⚠️ Column 'DocID' not found in GridView!")
' DEBUG: Alle verfügbaren Spalten ausgeben
LOGGER.Debug("=== Available Columns ===")
For Each col As GridColumn In GridViewWorkflows.Columns
LOGGER.Debug($" {col.FieldName} (Caption: {col.Caption})")
Next
LOGGER.Debug("=== END Available Columns ===")
FormHelper.ShowInfoMessage("Column 'DocID' not found!", omsgTitleWarning)
Exit Function
End If
' JETZT GetChildRowCount auf der RICHTIGEN Gruppe
Dim oChildRowCount = GridViewWorkflows.GetChildRowCount(oGroupRowHandle)
LOGGER.Debug($"Group handle {oGroupRowHandle} has {oChildRowCount} total child rows")
' WICHTIG: Wenn 0 Kinder → Gruppe ist zugeklappt oder leer
If oChildRowCount = 0 Then
' Versuche die Gruppe aufzuklappen
LOGGER.Debug($"Expanding group at handle {oGroupRowHandle}...")
GridViewWorkflows.ExpandGroupRow(oGroupRowHandle)
' UI-Thread Zeit geben
Application.DoEvents()
' Erneut prüfen
oChildRowCount = GridViewWorkflows.GetChildRowCount(oGroupRowHandle)
LOGGER.Debug($"After expanding: {oChildRowCount} child rows")
If oChildRowCount = 0 Then
LOGGER.Warn($"⚠️ Group has 0 children even after expanding")
Dim omsg = "Die Gruppe ist leer!"
FormHelper.ShowWarningMessage(omsg, omsgTitleAttention)
Exit Function
End If
End If
' JETZT sollten Kinder vorhanden sein
For childIndex = 0 To oChildRowCount - 1
Dim oChildRowHandle = GridViewWorkflows.GetChildRowHandle(oGroupRowHandle, childIndex)
' WICHTIG: Nur Daten-Rows verarbeiten, KEINE Gruppen
If Not GridViewWorkflows.IsDataRow(oChildRowHandle) Then
LOGGER.Debug($"Skipping non-data row at child index {childIndex} (Handle: {oChildRowHandle})")
Continue For
End If
' DocId auslesen - MIT COLUMN-OBJEKT
Try
Dim oDocId = GridViewWorkflows.GetRowCellValue(oChildRowHandle, docIdColumn)
If oDocId IsNot Nothing AndAlso IsNumeric(oDocId) Then
oIds.Add(CInt(oDocId))
LOGGER.Debug($"Added DocId: {oDocId} from child index {childIndex} (Handle: {oChildRowHandle})")
Else
LOGGER.Warn($"⚠️ DocId is Nothing/Invalid at child index {childIndex}, Handle: {oChildRowHandle}")
End If
Catch ex As Exception
LOGGER.Error($"Error reading DocId at child index {childIndex}: {ex.Message}")
End Try
Next
LOGGER.Debug($"[{oIds.Count}] DocIds collected from focused group")
If oIds.Count = 0 Then
Dim omsg = String.Format(S.System_konnte_die_Profilworkflows_nicht_auswerten_, vbNewLine)
@@ -2145,14 +2287,13 @@ Public Class frmMain
Exit Function
End If
' ========== DB-OPERATIONEN OPTIMIERT ==========
' ========== DB-OPERATIONEN ==========
LOGGER.Debug("Cleaning up queued DocIds..")
Dim oDelete = $"DELETE FROM TBPM_VALIDATION_PROFILE_GROUP_USER WHERE UserID = {USER_ID}"
If DatabaseFallback.ExecuteNonQueryECM(oDelete) = True Then
LOGGER.Debug("Adding [{0}] queued DocIds..", oIds.Count)
LOGGER.Debug("Adding {0} queued DocIds..", oIds.Count)
' OPTIMIERUNG: Batch-Insert statt einzelner Inserts
Dim oInsertBatch As New System.Text.StringBuilder()
oInsertBatch.AppendLine("INSERT INTO TBPM_VALIDATION_PROFILE_GROUP_USER ([PROFIL_ID],[DocID],[UserID],[ADDED_WHO]) VALUES")
@@ -2161,6 +2302,9 @@ Public Class frmMain
oInsertBatch.AppendLine($"({CURRENT_CLICKED_PROFILE_ID},{oIds(i)},{USER_ID},'{USER_USERNAME}')")
Next
' WICHTIG: Debug-Logging des Batch-Inserts
LOGGER.Debug(String.Format("Batch-Insert {0}", oInsertBatch.ToString))
DatabaseFallback.ExecuteNonQueryECM(oInsertBatch.ToString())
End If
End If
@@ -2999,7 +3143,7 @@ Public Class frmMain
})
End Sub
Sub LoadVWPM_CONTROL_INDEX()
Dim oSQL = $"SELECT * FROM VWPM_CONTROL_INDEX WITH (NOLOCK) ORDER BY PROFIL_ID,Y_LOC, X_LOC"
Dim oSQL = $"SELECT * FROM VWPM_CONTROL_INDEX ORDER BY PROFIL_ID,Y_LOC, X_LOC"
'DTVWCONTROLS_INDEX = DataASorDB.GetDatatable("DD_ECM", oSQL, "VWPM_CONTROL_INDEX", "")
DTVWCONTROLS_INDEX = DatabaseFallback.GetDatatable("VWPM_CONTROL_INDEX", New GetDatatableOptions(oSQL, DatabaseType.ECM))
End Sub
@@ -3014,7 +3158,7 @@ Public Class frmMain
If pMode = "bwBasicData" Then bwBasicData.ReportProgress(10)
If pMode <> "Load" Then
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE)
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE, pMode)
End If
If pMode = "bwBasicData" Then bwBasicData.ReportProgress(20)
@@ -3023,7 +3167,7 @@ Public Class frmMain
LOGGER.Debug($"VWPM_PROFILE_ACTIVE-SELECT used from DD-SQL-Config..")
Else
oSQL = $"SELECT [dbo].[FNDD_LANGUAGE_PHRASE] ('PROFILE_TITLE' + CONVERT(VARCHAR(4),T.GUID),'{USER_LANGUAGE}','PM') as GROUP_TEXT_LANG, T.*
FROM VWPM_PROFILE_ACTIVE T WITH (NOLOCK) WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({USER_ID}))"
FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({USER_ID}))"
End If
@@ -3350,7 +3494,7 @@ FROM VWPM_PROFILE_ACTIVE T WITH (NOLOCK) WHERE T.GUID IN (SELECT PROFILE_ID FROM
End Sub
Private Sub OutOfRangePMFixierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OutOfRangePMFixierenToolStripMenuItem.Click
Dim myPoint As Point = New Point(50, 50)
Dim myPoint As System.Drawing.Point = New System.Drawing.Point(50, 50)
Me.Location = Screen.AllScreens(UBound(Screen.AllScreens)).Bounds.Location + myPoint
BringMonitor2Front()
End Sub

File diff suppressed because it is too large Load Diff