jj 20_01_16

This commit is contained in:
JenneJ
2016-01-20 11:59:00 +01:00
parent 48fe3a4845
commit fb5990948e
8 changed files with 193 additions and 105 deletions

View File

@@ -165,7 +165,7 @@
Public Shared Function UpdateControl(control As Control, properties As Object)
Try
' Nach Typ den Update Befehl anpassen
Dim CurrentType As String = control.GetType.Name
Dim type As String = control.GetType.Name
Dim SQL As String
Dim NAME As String
@@ -181,6 +181,21 @@
Dim SHOW_COLUMN As Integer
Dim STATIC_LIST As String
' So sollte diese Funktion später mal aussehen :(
'Select Case type
' Case "TextBox"
' NAME = properties.Name
' MULTILINE = ClassConverter.BoolToInt(properties.Multiline)
' COL_NAME = ClassConverter.ToStringOrDefault(properties.ColumnTitle)
' DEFAULTVALUE = ClassConverter.ToStringOrDefault(properties.DefaultValue)
' SHOW_COLUMN = ClassConverter.BoolToInt(properties.ShowColumn)
' FORMAT_TYPE = properties.Format.ToString()
' REQUIRED = ClassConverter.BoolToInt(properties.IsRequired)
' READ_ONLY = ClassConverter.BoolToInt(properties.IsReadOnly)
' SQLCommand = ClassConverter.SQLValueToString(properties.SQLCommand)
'End Select
NAME = properties.Name
If propExists(properties, "Multiline") Then
@@ -195,34 +210,36 @@
COL_NAME = String.Empty
End If
If CurrentType = "RadioButton" AndAlso propExistsWithType(properties, "DefaultValue", GetType(Boolean)) Then
If type = "RadioButton" Then
DEFAULTVALUE = properties.DefaultValue
ElseIf CurrentType = "CheckBox" AndAlso propExistsWithType(properties, "DefaultValue", GetType(Boolean)) Then
ElseIf type = "CheckBox" Then
DEFAULTVALUE = properties.DefaultValue
ElseIf propExists(properties, "DefaultValue") Then
ElseIf type = "CheckBox" Then
DEFAULTVALUE = properties.DefaultValue
Else
DEFAULTVALUE = ""
ElseIf type = "ComboBox" Then
DEFAULTVALUE = properties.DefaultValue
ElseIf type = "DateEdit" Then
DEFAULTVALUE = ClassConverter.ToDateTimePickerOptionsOrDefault(properties.DefaultValue)
End If
If CurrentType = "TextBox" OrElse
CurrentType = "ComboBox" OrElse
CurrentType = "CheckBox" OrElse
CurrentType = "RadioButton" OrElse
CurrentType = "CheckedListBoxControl" OrElse
CurrentType = "ListBoxControl" Then
If type = "TextBox" OrElse
type = "ComboBox" OrElse
type = "CheckBox" OrElse
type = "RadioButton" OrElse
type = "CheckedListBoxControl" OrElse
type = "ListBoxControl" Then
SHOW_COLUMN = BoolToInt(properties.ShowColumn)
Else
SHOW_COLUMN = BoolToInt(True)
End If
If CurrentType = "TextBox" AndAlso propExists(properties, "Format") Then
If type = "TextBox" AndAlso propExists(properties, "Format") Then
FORMAT_TYPE = properties.Format.ToString
ElseIf CurrentType = "ComboBox" AndAlso propExists(properties, "Format") Then
ElseIf type = "ComboBox" AndAlso propExists(properties, "Format") Then
FORMAT_TYPE = properties.Format.ToString
Else
FORMAT_TYPE = EnumFormat.String.ToString
FORMAT_TYPE = EnumFormatOptions.String.ToString
End If
If propExists(properties, "IsRequired") Then