jj_27_01_16
This commit is contained in:
parent
2887aea532
commit
91708d16d3
@ -218,6 +218,8 @@
|
||||
DEFAULTVALUE = properties.DefaultValue
|
||||
ElseIf type = "DateEdit" Then
|
||||
DEFAULTVALUE = ClassConverter.ToDateTimePickerOptionsOrDefault(properties.DefaultValue)
|
||||
ElseIf type = "TextBox" Then
|
||||
DEFAULTVALUE = properties.DefaultValue
|
||||
End If
|
||||
|
||||
If type = "TextBox" OrElse
|
||||
|
||||
@ -46,8 +46,8 @@ Public Class ClassControlValues
|
||||
End If
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
Dim checkedlistbox As DevExpress.XtraEditors.CheckedListBoxControl = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If checkedlistbox.SelectedItems.Count = 0 Then
|
||||
Dim checkedlistbox = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If checkedlistbox.CheckedItemsCount = 0 Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
@ -62,15 +62,54 @@ Public Class ClassControlValues
|
||||
End If
|
||||
|
||||
Case Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
||||
Return True
|
||||
End Select
|
||||
|
||||
End Function
|
||||
|
||||
' Überprüft, welche Controls "Required" sind
|
||||
Public Shared Function CheckRequiredControlValues(controls As Control.ControlCollection) As List(Of String)
|
||||
Public Shared Function CheckRequiredControlValues(controls As Control.ControlCollection, Optional isGroupbox As Boolean = False) As List(Of String)
|
||||
Dim missingValues As New List(Of String)
|
||||
|
||||
'If isGroupbox = True Then
|
||||
' Dim radiobuttons As New List(Of RadioButton)
|
||||
' Dim otherControls As New List(Of Control)
|
||||
|
||||
' ' Nach allen Radiobuttons suchen
|
||||
' For Each c As Control In controls
|
||||
' If TypeOf c Is RadioButton Then
|
||||
' radiobuttons.Add(DirectCast(c, RadioButton))
|
||||
' Else
|
||||
' otherControls.Add(c)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' ' Wenn mindestens 1 MussFeld-Radiobutton in der Groupbox
|
||||
' Dim atLeastOneRadioButtonHasRequired = False
|
||||
' For Each rb As RadioButton In radiobuttons
|
||||
' If DirectCast(rb.Tag, ClassControlMetadata).Required = True Then
|
||||
' atLeastOneRadioButtonHasRequired = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' If atLeastOneRadioButtonHasRequired Then
|
||||
' ' Alle RadioButtons die angeklickt wurden (ist meistens einer :o)
|
||||
' Dim radioButtonsWithValue = (From rb As RadioButton In radiobuttons
|
||||
' Where ControlHasValue(rb)
|
||||
' Select rb.Name).ToArray()
|
||||
|
||||
' ' Wenn kein RadioButton angeklickt wurde, nehmen wir alle in einen String,
|
||||
' ' da GENAU EINER angeklickt werden MUSS
|
||||
' If radioButtonsWithValue Is Nothing Then
|
||||
' Dim missingValue As String = String.Join(", ", radiobuttons)
|
||||
' missingValues.Add(missingValue)
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
For Each Control As Control In controls
|
||||
|
||||
Dim metadata = DirectCast(Control.Tag, ClassControlMetadata)
|
||||
@ -78,11 +117,17 @@ Public Class ClassControlValues
|
||||
' Groupbox muss rekursiv überprüft werden
|
||||
If TypeOf Control Is GroupBox Then
|
||||
Dim groupbox As GroupBox = DirectCast(Control, GroupBox)
|
||||
Dim gbfields As List(Of String) = CheckRequiredControlValues(groupbox.Controls)
|
||||
Dim gbfields As List(Of String) = CheckRequiredControlValues(groupbox.Controls, True)
|
||||
missingValues.AddRange(gbfields)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
'Radio Buttons müssen nicht überprüft werden, da eine RadioButton Group
|
||||
'immer ein Control mit Checked = true hat
|
||||
If TypeOf Control Is RadioButton Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If IsNothing(metadata.Required) OrElse metadata.Required = False Then
|
||||
Continue For
|
||||
End If
|
||||
@ -94,7 +139,7 @@ Public Class ClassControlValues
|
||||
|
||||
Next
|
||||
|
||||
Return missingValues
|
||||
Return missingValues.Distinct().ToList()
|
||||
End Function
|
||||
|
||||
Public Shared Sub LoadControlValues(RecordId As Integer, ParentRecordId As Integer, FormId As Integer, controls As Control.ControlCollection)
|
||||
|
||||
@ -11,6 +11,14 @@
|
||||
Empty = 1
|
||||
End Enum
|
||||
|
||||
Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
|
||||
If value Is Nothing OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function BoolToInt(bool As Boolean) As Integer
|
||||
' Wandelt einen Boolean Wert in einen Int um
|
||||
Return IIf(bool, 1, 0)
|
||||
|
||||
@ -289,7 +289,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="GridControlMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>795, 270</value>
|
||||
<value>788, 270</value>
|
||||
</data>
|
||||
<data name="GridControlMain.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -361,7 +361,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="pnlDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 316</value>
|
||||
<value>1069, 312</value>
|
||||
</data>
|
||||
<data name="pnlDetails.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -379,7 +379,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="TabDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 316</value>
|
||||
<value>1069, 312</value>
|
||||
</data>
|
||||
<data name="TabDetails.Text" xml:space="preserve">
|
||||
<value>Detailansicht</value>
|
||||
@ -397,7 +397,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="TCDetails.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1078, 347</value>
|
||||
<value>1071, 340</value>
|
||||
</data>
|
||||
<data name="TCDetails.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -420,7 +420,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="AxObjectListControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 291</value>
|
||||
<value>1069, 287</value>
|
||||
</data>
|
||||
<data name="AxObjectListControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
@ -481,7 +481,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="ToolStripDokumente.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 25</value>
|
||||
<value>1069, 25</value>
|
||||
</data>
|
||||
<data name="ToolStripDokumente.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@ -502,7 +502,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="TabWindream.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 316</value>
|
||||
<value>1069, 312</value>
|
||||
</data>
|
||||
<data name="TabWindream.Text" xml:space="preserve">
|
||||
<value>windream-Dateien</value>
|
||||
@ -916,7 +916,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="TabFollowUp.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 316</value>
|
||||
<value>1069, 312</value>
|
||||
</data>
|
||||
<data name="TabFollowUp.Text" xml:space="preserve">
|
||||
<value>Wiedervorlage</value>
|
||||
@ -943,7 +943,7 @@
|
||||
<value>Cyan</value>
|
||||
</data>
|
||||
<data name="GridControlPos.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 291</value>
|
||||
<value>1069, 287</value>
|
||||
</data>
|
||||
<data name="GridControlPos.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -967,7 +967,7 @@
|
||||
<value>0, 25</value>
|
||||
</data>
|
||||
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 291</value>
|
||||
<value>1069, 287</value>
|
||||
</data>
|
||||
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
@ -1142,7 +1142,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="BindingNavigatorPOS.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 25</value>
|
||||
<value>1069, 25</value>
|
||||
</data>
|
||||
<data name="BindingNavigatorPOS.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
@ -1171,7 +1171,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPos.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1072, 316</value>
|
||||
<value>1069, 312</value>
|
||||
</data>
|
||||
<data name="TabPos.Text" xml:space="preserve">
|
||||
<value>Positionen</value>
|
||||
@ -1342,7 +1342,7 @@
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="ToolStripEdit.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1078, 25</value>
|
||||
<value>1071, 25</value>
|
||||
</data>
|
||||
<data name="ToolStripEdit.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
@ -1447,7 +1447,7 @@
|
||||
<value>Panel2</value>
|
||||
</data>
|
||||
<data name="SplitContainerBottom.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1083, 372</value>
|
||||
<value>1083, 365</value>
|
||||
</data>
|
||||
<data name="SplitContainerBottom.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
|
||||
@ -1179,6 +1179,8 @@ Public Class frmForm_Constructor_Main_2
|
||||
Update_Status_Label(True, "Der Datensatz '" & SELECTED_RECORD_ID & "' wurde erfolgreich gelöscht - " & Now, EditState.Update)
|
||||
Update_Record_Label(SELECTED_RECORD_ID)
|
||||
Load_Tree_View_Data()
|
||||
' Nach dem löschen muss die aktuelle Ansicht neugeladen werden
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
DisableEditMode()
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -1807,13 +1807,13 @@ Konfiguration</value>
|
||||
<value>Administration</value>
|
||||
</data>
|
||||
<data name="ribbonMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1498, 150</value>
|
||||
<value>1506, 150</value>
|
||||
</data>
|
||||
<data name="RibbonStatusBar1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 655</value>
|
||||
<value>0, 659</value>
|
||||
</data>
|
||||
<data name="RibbonStatusBar1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1498, 23</value>
|
||||
<value>1506, 23</value>
|
||||
</data>
|
||||
<data name=">>RibbonStatusBar1.Name" xml:space="preserve">
|
||||
<value>RibbonStatusBar1</value>
|
||||
@ -1861,7 +1861,7 @@ Konfiguration</value>
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>1498, 678</value>
|
||||
<value>1506, 682</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 8.25pt</value>
|
||||
|
||||
@ -97,7 +97,8 @@
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datepicker"
|
||||
props = New DateTimePickerProperties()
|
||||
props.DefaultValue = ClassConverter.ToDateTimePickerOptionsOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
props.DefaultValue = NotNull(row.Item("CONTROL_DEF_VALUE"), EnumDateTimePickerDefaultValueOptions.Empty)
|
||||
'props.DefaultValue = ClassConverter.ToDateTimePickerOptionsOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
Case "Datagridview"
|
||||
props = New DataGridViewProperties()
|
||||
Case "Groupbox"
|
||||
@ -110,6 +111,7 @@
|
||||
props = New RadioButtonProperties()
|
||||
props.Caption = row.Item("CTRLSCR_CAPTION")
|
||||
props.DefaultValue = ClassConverter.ToBooleanOrDefault(row.Item("CONTROL_DEF_VALUE"))
|
||||
props.IsRequired = row.Item("CONTROL_REQUIRED")
|
||||
Case "F_AddAppointment"
|
||||
props = New FunctionAddAppointment()
|
||||
Case "F_AddFormData"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user