diff --git a/app/DD-Record-Organiser/ClassControlBuilder.vb b/app/DD-Record-Organiser/ClassControlBuilder.vb index 2d0bc2a..c5e0cb7 100644 --- a/app/DD-Record-Organiser/ClassControlBuilder.vb +++ b/app/DD-Record-Organiser/ClassControlBuilder.vb @@ -1021,7 +1021,7 @@ Public Class ClassControlBuilder Try Dim control As New DevExpress.XtraEditors.DateEdit 'Dim control As New DateTimePicker - Dim defaultSize As Size = New Size(120, 24) + Dim defaultSize As Size = New Size(90, 20) Dim metadata As New ClassControlMetadata() metadata.Id = id @@ -1105,9 +1105,9 @@ Public Class ClassControlBuilder - column.HeaderText = "" - column.Name = "column1" - control.Columns.Add(column) + 'column.HeaderText = "" + 'column.Name = "column1" + 'control.Columns.Add(column) If _new And IsNothing(parent) Then control.Location = Me.GetCursorPosition() diff --git a/app/DD-Record-Organiser/ClassControlCommands.vb b/app/DD-Record-Organiser/ClassControlCommands.vb index 3fa8719..d57ccb8 100644 --- a/app/DD-Record-Organiser/ClassControlCommands.vb +++ b/app/DD-Record-Organiser/ClassControlCommands.vb @@ -233,16 +233,20 @@ DEFAULTVALUE = properties.DefaultValue End If - If type = "TextBox" OrElse - type = "ComboBox" OrElse - type = "CheckBox" OrElse - type = "RadioButton" OrElse - type = "CheckedListBoxControl" OrElse - type = "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 propExists(properties, "ShowColumn") Then SHOW_COLUMN = BoolToInt(properties.ShowColumn) - Else - SHOW_COLUMN = BoolToInt(True) End If If type = "TextBox" AndAlso propExists(properties, "Format") Then diff --git a/app/DD-Record-Organiser/ClassControlCommandsUI.vb b/app/DD-Record-Organiser/ClassControlCommandsUI.vb index da94bd8..808fb7c 100644 --- a/app/DD-Record-Organiser/ClassControlCommandsUI.vb +++ b/app/DD-Record-Organiser/ClassControlCommandsUI.vb @@ -495,6 +495,12 @@ Public Class ClassControlCommandsUI Continue For End If + If TypeOf ctrl Is DevExpress.XtraEditors.CheckedListBoxControl Then + Dim id As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id + UpdateMultipleValues(id, RecordID, CONTROL_VALUE) + Continue For + End If + Dim ValueExists = ClassDatabase.Execute_Scalar(String.Format("SELECT RECORD_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0} AND CONTROL_ID = {1}", RecordID, CONTROL_ID)) If ValueExists Then ' Control Updaten @@ -510,6 +516,31 @@ Public Class ClassControlCommandsUI End Sub + Public Sub UpdateMultipleValues(ControlId As Integer, RecordId As Integer, value As String) + Try + Dim values As New List(Of String)(value.Split(";")) + Dim dt As DataTable = ClassDatabase.Return_Datatable(String.Format("SELECT VALUE FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", ControlId, RecordId)) + ' Konvertiere datatable zu liste + Dim oldValues = dt.AsEnumerable().Select(Of String)(Function(r) + Return r.Item("VALUE") + End Function).ToList() + + Dim AddValues = values.Except(oldValues) + Dim RemoveValues = oldValues.Except(values) + + For Each v As String In AddValues + ClassDatabase.Execute_non_Query(String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE) VALUES({0}, {1}, '{2}')", ControlId, RecordId, v)) + Next + + For Each v As String In RemoveValues + ClassDatabase.Execute_non_Query(String.Format("DELETE FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1} AND VALUE = '{2}'", ControlId, RecordId, v)) + Next + + Catch ex As Exception + MsgBox("Error in UpdateMultipleValues:" & vbNewLine & ex.Message) + End Try + End Sub + Function GetControlValue(ctrl As Control) As String Dim type = ctrl.GetType().Name @@ -547,7 +578,7 @@ Public Class ClassControlCommandsUI Dim result_string As String For Each item As DevExpress.XtraEditors.Controls.CheckedListBoxItem In chklbx.CheckedItems - result.Add(item.Value) + result.Add(item.Value.ToString.Trim) Next result_string = String.Join(";", result) @@ -598,7 +629,7 @@ Public Class ClassControlCommandsUI If LogErrorsOnly = False Then ClassLogger.Add(">> Checked ListBox record '" & rid.ToString & "' was linked successfully.", False) End If End If - + End If End If Catch ex As Exception diff --git a/app/DD-Record-Organiser/ClassControlLoader.vb b/app/DD-Record-Organiser/ClassControlLoader.vb index b6ab323..7a12432 100644 --- a/app/DD-Record-Organiser/ClassControlLoader.vb +++ b/app/DD-Record-Organiser/ClassControlLoader.vb @@ -66,7 +66,7 @@ If IsNothing(staticList) Or String.IsNullOrWhiteSpace(staticList) Then Return Nothing Else - Return New List(Of String)(staticList.Split(";")) + Return New List(Of String)(staticList.Split(";").ToArray()) End If Catch ex As Exception MsgBox("Error in CheckForStaticList: " & vbNewLine & ex.Message) @@ -74,7 +74,7 @@ End Try End Function - Private Shared Function GetSqlList(controlId As Integer, formId As Integer, connection_Id As Object, sqlCommand As String) + Public Shared Function GetSqlList(controlId As Integer, formId As Integer, connection_Id As Object, sqlCommand As String) As DataTable Try If sqlCommand Is Nothing Or sqlCommand = String.Empty Then Return Nothing @@ -178,6 +178,10 @@ control.DataSource = dt End Sub + Overloads Shared Sub SetDataSource(control As Windows.Forms.DataGridView, dt As DataTable) + control.DataSource = dt + End Sub + End Class Public Structure DynamicValue @@ -333,13 +337,11 @@ Public Class CheckedListBox : Inherits _ListControl - Public Shared Sub LoadValue(control As DevExpress.XtraEditors.CheckedListBoxControl, value As String) - If IsNothing(value) Then + Public Shared Sub LoadValue(control As DevExpress.XtraEditors.CheckedListBoxControl, values As List(Of Object)) + If IsNothing(values) Then Exit Sub End If - Dim values() As String = value.Split(";") - For Each v As String In values Dim pos = control.FindStringExact(v) If pos >= 0 Then @@ -353,7 +355,11 @@ Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, conn_Id, SQLCommand) If dynamic.StaticList IsNot Nothing Then - control.DataSource = dynamic.StaticList + control.Items.Clear() + For Each item In dynamic.StaticList + control.Items.Add(item) + Next + 'control.DataSource = dynamic.StaticList End If If dynamic.DataTable IsNot Nothing AndAlso dynamic.DataTable.Rows.Count > 0 Then @@ -391,4 +397,19 @@ End Class + Public Class DataGridView : Inherits _ListControl + + Public Shared Sub LoadList(control As Windows.Forms.DataGridView, formId As Integer, ConnId As Object, SQLCommand As String) + Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id + Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, ConnId, SQLCommand) + + ' SQLCommand ignorieren + If dynamic.StaticList IsNot Nothing Then + control.DataSource = dynamic.StaticList + End If + + End Sub + + End Class + End Namespace diff --git a/app/DD-Record-Organiser/ClassControlProperties.vb b/app/DD-Record-Organiser/ClassControlProperties.vb index 0fa1460..b8b2361 100644 --- a/app/DD-Record-Organiser/ClassControlProperties.vb +++ b/app/DD-Record-Organiser/ClassControlProperties.vb @@ -399,6 +399,31 @@ Module ClassControlProperties Public Class DataGridViewProperties Inherits CommonProperties + + Private _show_column As Boolean + Private _static_list As String + + + + Public Property ShowColumn() As Boolean + Get + Return _show_column + End Get + Set(value As Boolean) + _show_column = value + End Set + End Property + + + + Public Property StaticList() As String + Get + Return _static_list + End Get + Set(value As String) + _static_list = value + End Set + End Property End Class Public Class PictureBoxProperties Inherits CommonProperties diff --git a/app/DD-Record-Organiser/ClassControlValues.vb b/app/DD-Record-Organiser/ClassControlValues.vb index 77950b4..f02e932 100644 --- a/app/DD-Record-Organiser/ClassControlValues.vb +++ b/app/DD-Record-Organiser/ClassControlValues.vb @@ -159,15 +159,15 @@ Public Class ClassControlValues Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id ' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt - Dim value = (From row In DT_ControlValues.AsEnumerable() + Dim values As List(Of Object) = (From row In DT_ControlValues.AsEnumerable() Where row.Item("CONTROL_ID") = ControlId - Select row.Item("VALUE")).FirstOrDefault() + Select row.Item("VALUE")).ToList() If TypeOf control Is GroupBox Then Dim groupbox As GroupBox = DirectCast(control, GroupBox) LoadControlValues(RecordId, ParentRecordId, FormId, groupbox.Controls) Else - LoadControlValue(RecordId, ParentRecordId, ControlId, control, value) + LoadControlValue(RecordId, ParentRecordId, ControlId, control, values) End If Next @@ -178,8 +178,15 @@ Public Class ClassControlValues End Sub - Private Shared Sub LoadControlValue(recordId As Integer, parentRecordId As Integer, controlId As Integer, control As Control, value As Object) + Private Shared Sub LoadControlValue(recordId As Integer, parentRecordId As Integer, controlId As Integer, control As Control, values As List(Of Object)) Try + ' Für die meisten Controls wird nur das erste Element der Liste benötigt + Dim value As String = Nothing + + If values.Count > 0 Then + value = values.Item(0) + End If + Select Case control.GetType() Case GetType(TextBox) If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - GetType(TextBox) ", False) @@ -219,7 +226,7 @@ Public Class ClassControlValues Case GetType(DevExpress.XtraEditors.CheckedListBoxControl) If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - GetType(CheckedListBoxControl) ", False) Dim checkedlistbox As DevExpress.XtraEditors.CheckedListBoxControl = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl) - ControlLoader.CheckedListBox.LoadValue(checkedlistbox, value) + ControlLoader.CheckedListBox.LoadValue(checkedlistbox, values) Case GetType(PictureBox) If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - GetType(PictureBox) ", False) @@ -250,7 +257,7 @@ Public Class ClassControlValues ' Zuerst alle SQL Commands für FormID finden ' CONTROL_SQLCOMMAND_1 wird als SQL gealiast - Dim SQL As String = String.Format("SELECT CONTROL_ID, CONTROL_CONNID_1,CONTROL_SQLCOMMAND_1 AS SQL FROM VWPMO_CONTROL_SCREEN WHERE FORM_ID = {0} AND CONTROL_SQLCOMMAND_1 <> '' AND CONTROL_SQLCOMMAND_1 NOT LIKE '%@%'", FormID) + Dim SQL As String = String.Format("SELECT CONTROL_ID, CONTROL_CONNID_1,CONTROL_SQLCOMMAND_1 AS SQL FROM VWPMO_CONTROL_SCREEN WHERE FORM_ID = {0} AND CONTROL_SQLCOMMAND_1 NOT LIKE '%@%'", FormID) Dim dt As DataTable = ClassDatabase.Return_Datatable(SQL) swsql.Stop() @@ -290,6 +297,11 @@ Public Class ClassControlValues Dim chlistbox = DirectCast(Ctrl, DevExpress.XtraEditors.CheckedListBoxControl) ControlLoader.CheckedListBox.LoadList(chlistbox, FormID, ConnID, sqlcommand) + Case GetType(DataGridView) + Dim gridview = DirectCast(Ctrl, DataGridView) + Dim noSQL As String = "" + ControlLoader.DataGridView.LoadList(gridview, FormID, ConnID, noSQL) + End Select swcontrol.Stop() diff --git a/app/DD-Record-Organiser/frmTool_ControlDesigner.Designer.vb b/app/DD-Record-Organiser/frmTool_ControlDesigner.Designer.vb index 8146a53..c3808db 100644 --- a/app/DD-Record-Organiser/frmTool_ControlDesigner.Designer.vb +++ b/app/DD-Record-Organiser/frmTool_ControlDesigner.Designer.vb @@ -24,9 +24,6 @@ Partial Class frmTool_ControlDesigner Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmTool_ControlDesigner)) Me.GroupBox1 = New System.Windows.Forms.GroupBox() - Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.btn_addformdata = New System.Windows.Forms.Button() - Me.btn_addtocal = New System.Windows.Forms.Button() Me.btnListBox = New System.Windows.Forms.Button() Me.btnListBoxCheckable = New System.Windows.Forms.Button() Me.btnRadioButton = New System.Windows.Forms.Button() @@ -38,13 +35,15 @@ Partial Class frmTool_ControlDesigner Me.btncmb = New System.Windows.Forms.Button() Me.btntextbox = New System.Windows.Forms.Button() Me.btnlabel = New System.Windows.Forms.Button() + Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.btn_addformdata = New System.Windows.Forms.Button() + Me.btn_addtocal = New System.Windows.Forms.Button() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.SuspendLayout() ' 'GroupBox1 ' - resources.ApplyResources(Me.GroupBox1, "GroupBox1") Me.GroupBox1.Controls.Add(Me.btnListBox) Me.GroupBox1.Controls.Add(Me.btnListBoxCheckable) Me.GroupBox1.Controls.Add(Me.btnRadioButton) @@ -56,33 +55,10 @@ Partial Class frmTool_ControlDesigner Me.GroupBox1.Controls.Add(Me.btncmb) Me.GroupBox1.Controls.Add(Me.btntextbox) Me.GroupBox1.Controls.Add(Me.btnlabel) + resources.ApplyResources(Me.GroupBox1, "GroupBox1") Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.TabStop = False ' - 'GroupBox2 - ' - resources.ApplyResources(Me.GroupBox2, "GroupBox2") - Me.GroupBox2.Controls.Add(Me.btn_addformdata) - Me.GroupBox2.Controls.Add(Me.btn_addtocal) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.TabStop = False - ' - 'btn_addformdata - ' - resources.ApplyResources(Me.btn_addformdata, "btn_addformdata") - Me.btn_addformdata.Image = Global.DD_Record_Organiser.My.Resources.Resources.AddMark_10580 - Me.btn_addformdata.Name = "btn_addformdata" - Me.btn_addformdata.TabStop = False - Me.btn_addformdata.UseVisualStyleBackColor = True - ' - 'btn_addtocal - ' - resources.ApplyResources(Me.btn_addtocal, "btn_addtocal") - Me.btn_addtocal.Image = Global.DD_Record_Organiser.My.Resources.Resources.AddTable_5632 - Me.btn_addtocal.Name = "btn_addtocal" - Me.btn_addtocal.TabStop = False - Me.btn_addtocal.UseVisualStyleBackColor = True - ' 'btnListBox ' resources.ApplyResources(Me.btnListBox, "btnListBox") @@ -169,6 +145,30 @@ Partial Class frmTool_ControlDesigner Me.btnlabel.TabStop = False Me.btnlabel.UseVisualStyleBackColor = True ' + 'GroupBox2 + ' + Me.GroupBox2.Controls.Add(Me.btn_addformdata) + Me.GroupBox2.Controls.Add(Me.btn_addtocal) + resources.ApplyResources(Me.GroupBox2, "GroupBox2") + Me.GroupBox2.Name = "GroupBox2" + Me.GroupBox2.TabStop = False + ' + 'btn_addformdata + ' + resources.ApplyResources(Me.btn_addformdata, "btn_addformdata") + Me.btn_addformdata.Image = Global.DD_Record_Organiser.My.Resources.Resources.AddMark_10580 + Me.btn_addformdata.Name = "btn_addformdata" + Me.btn_addformdata.TabStop = False + Me.btn_addformdata.UseVisualStyleBackColor = True + ' + 'btn_addtocal + ' + resources.ApplyResources(Me.btn_addtocal, "btn_addtocal") + Me.btn_addtocal.Image = Global.DD_Record_Organiser.My.Resources.Resources.AddTable_5632 + Me.btn_addtocal.Name = "btn_addtocal" + Me.btn_addtocal.TabStop = False + Me.btn_addtocal.UseVisualStyleBackColor = True + ' 'frmTool_ControlDesigner ' resources.ApplyResources(Me, "$this") diff --git a/app/DD-Record-Organiser/frmTool_ControlDesigner.en-US.resx b/app/DD-Record-Organiser/frmTool_ControlDesigner.en-US.resx index d1988ff..de4467a 100644 --- a/app/DD-Record-Organiser/frmTool_ControlDesigner.en-US.resx +++ b/app/DD-Record-Organiser/frmTool_ControlDesigner.en-US.resx @@ -145,6 +145,9 @@ NoControl + + DatePicker + NoControl @@ -154,18 +157,15 @@ NoControl + + functions + NoControl NoControl - - functions - - - NoControl - Controls - Formdesigner diff --git a/app/DD-Record-Organiser/frmTool_ControlDesigner.resx b/app/DD-Record-Organiser/frmTool_ControlDesigner.resx index a39627e..faac4c0 100644 --- a/app/DD-Record-Organiser/frmTool_ControlDesigner.resx +++ b/app/DD-Record-Organiser/frmTool_ControlDesigner.resx @@ -117,262 +117,127 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GroupBox1 - - - PictureBox - - - 12, 127 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 134, 31 - - - GroupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Funktionen - - - MiddleLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 3 - - - MiddleRight - - - MiddleRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ListBox - - - 134, 27 - - - MiddleLeft - - - 12, 90 - - - MiddleRight - - - Add to Calendar - - - GroupBox - - - DateTimePicker - - - Tabelle - - - 5 - - - 8 - - + Segoe UI, 8.25pt, style=Bold - - 2 - - - 134, 31 - - - 12, 22 - - - Segoe UI, 8.25pt - - - btn_addformdata - - - Werkzeug-Formulardesigner - - - GroupBox1 - - - 10 - - - 13, 55 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MiddleRight - - - RadioButton - - - 132, 27 - - - 6, 13 - - - 12, 164 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - btncmb - MiddleLeft - + + 12, 200 + + + 134, 31 + + + + 10 + + + ListBox + + + MiddleRight + + + btnListBox + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - MiddleLeft - - + GroupBox1 - - MiddleLeft - - - btnlabel - - - 132, 31 - - - btn_addtocal - - + 0 - - 1 - - - MiddleRight - - - 152, 22 - - - Segoe UI, 8.25pt, style=Bold - - - Segoe UI, 8.25pt, style=Bold - - - $this - - - MiddleRight - - - 3 - - - btnRadioButton - - - 134, 31 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 2 - - - frmTool_ControlDesigner - - - MiddleRight - - - 1 - - - 134, 31 - Segoe UI, 8.25pt, style=Bold - - 3 - - - ListBox Checkable - - + MiddleLeft + + 12, 164 + + + 134, 31 + 9 - + + ListBox Checkable + + + MiddleRight + + + btnListBoxCheckable + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + GroupBox1 - - 0 + + 1 - - GroupBox1 + + Segoe UI, 8.25pt, style=Bold - - GroupBox2 + + MiddleLeft - - GroupBox1 + + 152, 92 + + + 132, 31 5 - - 12, 24 + + RadioButton - + + MiddleRight + + + btnRadioButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + GroupBox1 - - GroupBox2 + + 2 - + + Segoe UI, 8.25pt, style=Bold + + MiddleLeft - - GroupBox1 + + 152, 164 - - MiddleLeft + + 132, 31 + + + 8 + + + GroupBox + + + MiddleRight btngb @@ -380,250 +245,382 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + GroupBox1 - - 132, 31 + + 3 - + + Segoe UI, 8.25pt, style=Bold + + + MiddleLeft + + + 12, 127 + + 134, 31 - - GroupBox1 + + 6 + + + PictureBox MiddleRight - + + btnpb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 4 + + + Segoe UI, 8.25pt, style=Bold + + MiddleLeft + + 152, 127 + + + 132, 31 + 7 - - 4 + + Tabelle - - 152, 164 + + MiddleRight - + + btnTabelle + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - MiddleRight - - - Segoe UI, 8.25pt, style=Bold - - - MiddleRight - - + GroupBox1 - + + 5 + + Segoe UI, 8.25pt, style=Bold - - CheckBox - - - TextBox - - - 1 - - + MiddleLeft 152, 55 - - 12, 200 + + 132, 31 - - Segoe UI, 8.25pt, style=Bold + + 3 - - 133, 29 + + CheckBox - - Label - - - MiddleLeft - - - 6 - - - btnTabelle - - - btntextbox - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 9 - - - 152, 92 - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MiddleLeft - - + MiddleRight - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 12, 12 - - - Segoe UI, 8.25pt, style=Bold - - - 4 - - - 7 - - - 152, 127 - btnCheckbox - - 132, 31 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Segoe UI, 8.25pt, style=Bold + + GroupBox1 + + + 6 Segoe UI, 8.25pt, style=Bold - - 0 - - - 132, 31 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - + MiddleLeft - - GroupBox2 + + 152, 22 + + + 132, 27 1 - + + DatePicker + + + MiddleRight + + + btndtp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 7 + + + Segoe UI, 8.25pt, style=Bold + + + MiddleLeft + + + 12, 90 + + + 134, 31 + + + 4 + + + ComboBox + + + MiddleRight + + + btncmb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 8 + + + Segoe UI, 8.25pt, style=Bold + + + MiddleLeft + + + 13, 55 + + + 133, 29 + + + 2 + + + TextBox + + + MiddleRight + + + btntextbox + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 9 + + + Segoe UI, 8.25pt, style=Bold + + + MiddleLeft + + + 12, 22 + + + 134, 27 + + 0 - + + Label + + + MiddleRight + + + btnlabel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 10 + + + Segoe UI, 9.75pt, style=Bold + + + 12, 12 + + + 295, 237 + + + 3 + + + Control-Types (Drag and Drop) + + + GroupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Segoe UI, 8.25pt, style=Bold + + + MiddleLeft + + + 152, 24 + + 132, 31 1 - - 10 - - - 324, 337 - - - 152, 24 - - - 8 - - - Segoe UI, 8.25pt, style=Bold - - - btnpb - Add Form Data - - 295, 237 - - - btnListBoxCheckable - - + MiddleRight - - Segoe UI, 9.75pt, style=Bold + + btn_addformdata + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox2 + + + 0 Segoe UI, 8.25pt, style=Bold - - GroupBox1 + + MiddleLeft - - btndtp + + 12, 24 - - 4 + + 134, 31 - - btnListBox + + 0 - - 6 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ComboBox - - - Segoe UI, 8.25pt, style=Bold - - - 295, 71 - - - 12, 255 + + Add to Calendar MiddleRight - - Control-Types (Drag and Drop) + + btn_addtocal + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox2 + + + 1 Segoe UI, 9.75pt, style=Bold + + 12, 255 + + + 295, 71 + + + 4 + + + Funktionen + + + GroupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + True - - en-US - + + 6, 13 + + + 324, 337 + + + Segoe UI, 8.25pt + + + Werkzeug-Formulardesigner + + + frmTool_ControlDesigner + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/app/DD-Record-Organiser/frmTool_ControlProperties.vb b/app/DD-Record-Organiser/frmTool_ControlProperties.vb index d665120..fa265f8 100644 --- a/app/DD-Record-Organiser/frmTool_ControlProperties.vb +++ b/app/DD-Record-Organiser/frmTool_ControlProperties.vb @@ -150,6 +150,10 @@ CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle)) props.ColumnTitle = ClassConverter.ToStringOrDefault(r.Item("CONTROL_COL_NAME"), ctrl.Name) props.ShowColumn = ClassConverter.ToBooleanOrDefault(r.Item("CONTROL_SHOW_COLUMN"), True) + props.StaticList = NotNull(r.Item("CONTROL_STATIC_LIST"), "") + props.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), "")) + props.IsRequired = r.Item("CONTROL_REQUIRED") + props.IsReadOnly = r.Item("CONTROL_READ_ONLY") Case "Groupbox" props.Caption = r.Item("CTRLSCR_CAPTION")