jj
This commit is contained in:
@@ -35,6 +35,7 @@ Public Class ClassControlCreator
|
||||
Public Const PREFIX_LINE = "LINE"
|
||||
Public Const PREFIX_BUTTON = "BTN"
|
||||
|
||||
Public Shared GridTables As New Dictionary(Of String, DataTable)
|
||||
|
||||
''' <summary>
|
||||
''' Standard Eigenschaften für alle Controls
|
||||
@@ -425,7 +426,7 @@ Public Class ClassControlCreator
|
||||
|
||||
End With
|
||||
|
||||
Dim oTables As New Dictionary(Of String, DataTable)
|
||||
GridTables.Clear()
|
||||
|
||||
For Each oRow As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In columns
|
||||
' Create Columns in Datatable
|
||||
@@ -443,15 +444,19 @@ Public Class ClassControlCreator
|
||||
Dim oConnectionId As Integer = NotNull(oRow.Item("CONNECTION_ID"), 0)
|
||||
Dim oSqlCommand As String = NotNull(oRow.Item("SQL_COMMAND"), "")
|
||||
|
||||
If oConnectionId > 0 And oSqlCommand <> "" Then
|
||||
Try
|
||||
Dim oComboboxDataTable As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId)
|
||||
oTables.Add(oRow.SPALTENNAME, oComboboxDataTable)
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Could not load data for column {0} in control {1}", oRow.SPALTENNAME, oControl.Name)
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
If Not clsPatterns.HasComplexPatterns(oSqlCommand) Then
|
||||
If oConnectionId > 0 And oSqlCommand <> "" Then
|
||||
Try
|
||||
Dim oComboboxDataTable As DataTable = ClassDatabase.Return_Datatable_ConId(oSqlCommand, oConnectionId)
|
||||
GridTables.Add(oRow.SPALTENNAME, oComboboxDataTable)
|
||||
Catch ex As Exception
|
||||
LOGGER.Warn("Could not load data for column {0} in control {1}", oRow.SPALTENNAME, oControl.Name)
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
oControl.DataSource = oDatatable
|
||||
@@ -463,8 +468,8 @@ Public Class ClassControlCreator
|
||||
For Each oRow As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In columns
|
||||
If oRow.SPALTENNAME = e.Column.FieldName Then
|
||||
|
||||
If oTables.ContainsKey(e.Column.FieldName) Then
|
||||
Dim oComboboxDataTable As DataTable = oTables.Item(e.Column.FieldName)
|
||||
If GridTables.ContainsKey(e.Column.FieldName) Then
|
||||
Dim oComboboxDataTable As DataTable = GridTables.Item(e.Column.FieldName)
|
||||
Dim oEditor As New RepositoryItemComboBox()
|
||||
Dim oItems As New List(Of String)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user