Merge branch 'master' of http://172.24.11.74:90/scm/git/RecordOrganizer
This commit is contained in:
@@ -3131,83 +3131,6 @@ Public Class frmConstructor_Main
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Create_Grid_Editor(formId As Integer)
|
||||
Try
|
||||
Dim SQL As String = "SELECT CONTROL_COL_NAME,CONTROL_SQLCOMMAND_1,CONTROL_STATIC_LIST FROM VWPMO_CONTROL_SCREEN WHERE CTRLTYPE_ID = 3 AND FORM_ID = " & formId
|
||||
Dim ComboColumns As DataTable = ClassDatabase.Return_Datatable(SQL, True)
|
||||
|
||||
' Alle Checkboxen für aktuelle Ansicht heraussuchen
|
||||
Dim sqlcheck As String = "SELECT COL_NAME FROM TBPMO_CONTROL WHERE CONTROL_TYPE_ID in (10,11) AND FORM_ID = " & formId
|
||||
Dim dtcheck As DataTable = ClassDatabase.Return_Datatable(sqlcheck, True)
|
||||
Dim listcheck As New List(Of String)
|
||||
|
||||
'Liste von allen Spaltentiteln mit Checkbox erstellen
|
||||
If dtcheck.Rows.Count > 0 Then
|
||||
For Each row As DataRow In dtcheck.Rows
|
||||
listcheck.Add(row.Item(0))
|
||||
Next
|
||||
End If
|
||||
' Den Editor Initialisieren und Optionen setzen
|
||||
Dim CheckBoxEditorForDisplay = New RepositoryItemCheckEdit()
|
||||
CheckBoxEditorForDisplay.ValueChecked = 1
|
||||
CheckBoxEditorForDisplay.ValueUnchecked = 0
|
||||
' Alle Checkbox Spalten durchgehen und CheckBoxEditor zuweisen
|
||||
For Each col As String In listcheck
|
||||
grvwGridPos.GridControl.RepositoryItems.Add(CheckBoxEditorForDisplay)
|
||||
|
||||
If Not IsNothing(grvwGridPos.Columns(col)) Then
|
||||
grvwGridPos.Columns(col).ColumnEdit = CheckBoxEditorForDisplay
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
For Each col As DataRow In ComboColumns.Rows
|
||||
Dim colName As String = col.Item(0)
|
||||
|
||||
Dim hasSqlCommand = col.Item(1).ToString() <> ""
|
||||
Dim hasStaticList = col.Item(2).ToString() <> ""
|
||||
|
||||
If hasStaticList = True Then
|
||||
Dim comboEdit1 As New RepositoryItemComboBox()
|
||||
Dim comboItems1 As ComboBoxItemCollection = comboEdit1.Items
|
||||
Dim staticListItems = col.Item(2).ToString.Split(";")
|
||||
comboItems1.BeginUpdate()
|
||||
Try
|
||||
For Each item In staticListItems
|
||||
comboItems1.Add(item)
|
||||
Next
|
||||
Finally
|
||||
comboItems1.EndUpdate()
|
||||
End Try
|
||||
GridControlPos.RepositoryItems.Add(comboEdit1)
|
||||
If Not IsNothing(grvwGridPos.Columns(colName)) Then
|
||||
grvwGridPos.Columns(colName).ColumnEdit = comboEdit1
|
||||
End If
|
||||
ElseIf hasSqlCommand = True Then
|
||||
SQL = col.Item(1).ToString()
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
Dim comboEdit2 As New RepositoryItemComboBox()
|
||||
Dim comboItems2 As ComboBoxItemCollection = comboEdit2.Items
|
||||
For Each row As DataRow In dt.Rows
|
||||
Dim value = row.Item(0)
|
||||
comboItems2.BeginUpdate()
|
||||
Try
|
||||
comboItems2.Add(value)
|
||||
Finally
|
||||
comboItems2.EndUpdate()
|
||||
End Try
|
||||
Next
|
||||
GridControlPos.RepositoryItems.Add(comboEdit2)
|
||||
If Not IsNothing(grvwGridPos.Columns(colName)) Then
|
||||
grvwGridPos.Columns(colName).ColumnEdit = comboEdit2
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in Create_Grid_Editor: ", ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Load_Pos_Data()
|
||||
@@ -3223,9 +3146,10 @@ Public Class frmConstructor_Main
|
||||
Dim bs As New BindingSource
|
||||
bs.DataSource = DT_POS
|
||||
BindingNavigatorPOS.BindingSource = bs
|
||||
' --- Editoren laden für Combobox ---
|
||||
Create_Grid_Editor(POS_ENTITY)
|
||||
HideColumns_Pos(PARENT_RECORDID)
|
||||
' --- Editoren laden ---
|
||||
ClassPosGrid.FormatColumns(grvwGridPos, POS_ENTITY)
|
||||
'ClassPosGrid.CreateComboEditor(grvwGridPos, POS_ENTITY)
|
||||
'HideColumns_Pos(PARENT_RECORDID)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user