JJ 21.04.16
This commit is contained in:
@@ -148,16 +148,22 @@ Public Class ClassControlBuilder
|
||||
Dim SQL As String = String.Format("SELECT GUID, SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE SQL_COMMAND_1 LIKE '%@{0}@%'", controlId)
|
||||
Dim value
|
||||
|
||||
Select Case control.GetType()
|
||||
Case GetType(CustomComboBox)
|
||||
If IsNothing(DirectCast(control, CustomComboBox).ValueMember) Then
|
||||
value = DirectCast(control, CustomComboBox).Text
|
||||
Else
|
||||
value = DirectCast(control, CustomComboBox).SelectedValue
|
||||
End If
|
||||
Case Else
|
||||
Exit Sub
|
||||
End Select
|
||||
' Diese Befehle führen dazu, dass auch der ValueMember als Wert ausgelesen wird
|
||||
' Das kann zu unerwarteten Ergebnissen führen, da der Benutzer nur den DisplayMember sieht.
|
||||
'Select Case control.GetType()
|
||||
' Case GetType(CustomComboBox)
|
||||
' If IsNothing(DirectCast(control, CustomComboBox).ValueMember) Then
|
||||
' value = DirectCast(control, CustomComboBox).Text
|
||||
' Else
|
||||
' value = DirectCast(control, CustomComboBox).SelectedValue
|
||||
' End If
|
||||
' Case Else
|
||||
' Exit Sub
|
||||
'End Select
|
||||
' Die bessere Lösung ist für jetzt, einfach den angezeigten Wert auszulesen:
|
||||
value = DirectCast(control, CustomComboBox).Text
|
||||
|
||||
|
||||
|
||||
If String.IsNullOrEmpty(value) Then
|
||||
Exit Sub
|
||||
@@ -191,9 +197,8 @@ Public Class ClassControlBuilder
|
||||
sqlcommand = sqlcommand.Replace(match.Groups(1).Value, value)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> " & String.Format("Executing SQL_COMMAND: '{0}' for controlID '{1}'", sqlcommand, dependingControlId))
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sqlcommand)
|
||||
Dim obj
|
||||
obj = dependingControl.GetType.ToString
|
||||
Select Case dependingControl.GetType().Name
|
||||
Dim type = dependingControl.GetType().Name
|
||||
Select Case type
|
||||
|
||||
Case "CustomComboBox"
|
||||
ControlLoader.Combobox.SetDataSource(DirectCast(dependingControl, CustomComboBox), dt)
|
||||
|
||||
Reference in New Issue
Block a user