Merge branch 'master' of http://scmadmin@172.24.11.74:90/scm/git/RecordOrganizer
This commit is contained in:
@@ -220,9 +220,54 @@ Public Class ClassControlBuilder
|
|||||||
Case "CheckedListBoxControl"
|
Case "CheckedListBoxControl"
|
||||||
Dim chklistbox As DevExpress.XtraEditors.CheckedListBoxControl = CType(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
Dim chklistbox As DevExpress.XtraEditors.CheckedListBoxControl = CType(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||||
AddHandler chklistbox.ItemCheck, AddressOf RecordChanged
|
AddHandler chklistbox.ItemCheck, AddressOf RecordChanged
|
||||||
|
'Case "DataGridView"
|
||||||
|
' Dim gridview As DataGridView = CType(control, DataGridView)
|
||||||
|
' AddHandler gridview.UserDeletingRow, AddressOf UserDeletingRow
|
||||||
|
' AddHandler gridview.CellEndEdit, AddressOf CellEndEdit
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Private Function GetAllItems(dgv As DataGridView) As List(Of String)
|
||||||
|
' Dim list As New List(Of String)
|
||||||
|
|
||||||
|
' For Each row As DataGridViewRow In dgv.Rows
|
||||||
|
' Dim cell As DataGridViewCell = row.Cells(0)
|
||||||
|
' If Not IsNothing(cell.Value) Then
|
||||||
|
' list.Add(cell.Value)
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' Return list
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Private Sub SaveAllItems(controlId As Integer, items As String)
|
||||||
|
' Try
|
||||||
|
' Dim SQL As String = String.Format("UPDATE TBPMO_CONTROL SET STATIC_LIST='{0}' WHERE GUID = {1}", items, controlId)
|
||||||
|
' ClassDatabase.Execute_non_Query(SQL)
|
||||||
|
' Catch ex As Exception
|
||||||
|
' MsgBox("Error in SaveAllItems:" & vbNewLine & ex.Message)
|
||||||
|
' End Try
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub UserDeletingRow(ByVal sender As Object, ByVal e As DataGridViewRowCancelEventArgs)
|
||||||
|
' Dim dgv As DataGridView = DirectCast(sender, DataGridView)
|
||||||
|
' Dim id As Integer = DirectCast(dgv.Tag, ClassControlMetadata).Id
|
||||||
|
' Dim list As List(Of String) = GetAllItems(dgv)
|
||||||
|
' list.RemoveAt(e.Row.Index)
|
||||||
|
' Dim items As String = String.Join(";", list.ToArray())
|
||||||
|
|
||||||
|
' SaveAllItems(id, items)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub CellEndEdit(ByVal sender As Object, e As DataGridViewCellEventArgs)
|
||||||
|
' Dim dgv As DataGridView = DirectCast(sender, DataGridView)
|
||||||
|
' Dim id As Integer = DirectCast(dgv.Tag, ClassControlMetadata).Id
|
||||||
|
' Dim list As List(Of String) = GetAllItems(dgv)
|
||||||
|
' Dim items As String = String.Join(";", list.ToArray())
|
||||||
|
|
||||||
|
' SaveAllItems(id, items)
|
||||||
|
'End Sub
|
||||||
|
|
||||||
Private Sub SetDragDropHandler(groupbox As GroupBox)
|
Private Sub SetDragDropHandler(groupbox As GroupBox)
|
||||||
If Not IsNothing(_group_box_drag_drop_handler) Then
|
If Not IsNothing(_group_box_drag_drop_handler) Then
|
||||||
AddHandler groupbox.DragDrop, Me._group_box_drag_drop_handler
|
AddHandler groupbox.DragDrop, Me._group_box_drag_drop_handler
|
||||||
@@ -1096,18 +1141,16 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
control.Name = name
|
control.Name = name
|
||||||
control.BackgroundColor = SystemColors.ControlDark
|
control.BackgroundColor = SystemColors.ControlDark
|
||||||
control.AllowUserToAddRows = False
|
control.AllowUserToAddRows = True
|
||||||
control.AllowUserToDeleteRows = False
|
control.AllowUserToDeleteRows = True
|
||||||
control.AllowUserToResizeColumns = False
|
control.AllowUserToResizeColumns = False
|
||||||
control.AllowUserToResizeRows = False
|
control.AllowUserToResizeRows = False
|
||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
control.ReadOnly = read_only
|
control.ReadOnly = read_only
|
||||||
|
|
||||||
|
column.HeaderText = "Data"
|
||||||
|
column.Name = "column1"
|
||||||
'column.HeaderText = ""
|
control.Columns.Add(column)
|
||||||
'column.Name = "column1"
|
|
||||||
'control.Columns.Add(column)
|
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
control.Location = Me.GetCursorPosition()
|
control.Location = Me.GetCursorPosition()
|
||||||
@@ -1237,7 +1280,7 @@ Public Class ClassControlBuilder
|
|||||||
control.Name = name
|
control.Name = name
|
||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
control.Text = Caption
|
control.Text = Caption
|
||||||
control.Font = New Font(fontfamily, fontsize, CType(fontstyle, FontStyle))
|
'control.Font = New Font(fontfamily, fontsize, CType(fontstyle, FontStyle))
|
||||||
control.ForeColor = IntToColor(fontcolor)
|
control.ForeColor = IntToColor(fontcolor)
|
||||||
control.BackColor = IntToColor(backcolor)
|
control.BackColor = IntToColor(backcolor)
|
||||||
|
|
||||||
|
|||||||
@@ -233,18 +233,6 @@
|
|||||||
DEFAULTVALUE = properties.DefaultValue
|
DEFAULTVALUE = properties.DefaultValue
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'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
|
If propExists(properties, "ShowColumn") Then
|
||||||
SHOW_COLUMN = BoolToInt(properties.ShowColumn)
|
SHOW_COLUMN = BoolToInt(properties.ShowColumn)
|
||||||
End If
|
End If
|
||||||
@@ -333,7 +321,7 @@
|
|||||||
HEIGHT = properties.Size.Height
|
HEIGHT = properties.Size.Height
|
||||||
WIDTH = properties.Size.Width
|
WIDTH = properties.Size.Width
|
||||||
|
|
||||||
If propExists(properties, "Font") Then
|
If propExists(properties, "Font") AndAlso Not IsNothing(properties.Font) Then
|
||||||
Dim f As Font = properties.Font
|
Dim f As Font = properties.Font
|
||||||
FONT_FAMILY = f.FontFamily.Name
|
FONT_FAMILY = f.FontFamily.Name
|
||||||
FONT_SIZE = CType(f.Size, Integer)
|
FONT_SIZE = CType(f.Size, Integer)
|
||||||
|
|||||||
@@ -501,6 +501,12 @@ Public Class ClassControlCommandsUI
|
|||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TypeOf ctrl Is Windows.Forms.DataGridView 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))
|
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
|
If ValueExists Then ' Control Updaten
|
||||||
@@ -654,6 +660,20 @@ Public Class ClassControlCommandsUI
|
|||||||
Case "ListBoxControl"
|
Case "ListBoxControl"
|
||||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
||||||
Return listbox.SelectedValue
|
Return listbox.SelectedValue
|
||||||
|
|
||||||
|
Case "DataGridView"
|
||||||
|
Dim list As New List(Of String)
|
||||||
|
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
|
||||||
|
|
||||||
|
For Each row As DataGridViewRow In dgv.Rows
|
||||||
|
Dim cell As DataGridViewCell = row.Cells(0)
|
||||||
|
If Not IsNothing(cell.Value) Then
|
||||||
|
list.Add(cell.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return String.Join(";", list)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Select
|
End Select
|
||||||
|
|||||||
@@ -399,15 +399,11 @@
|
|||||||
|
|
||||||
Public Class DataGridView : Inherits _ListControl
|
Public Class DataGridView : Inherits _ListControl
|
||||||
|
|
||||||
Public Shared Sub LoadList(control As Windows.Forms.DataGridView, formId As Integer, ConnId As Object, SQLCommand As String)
|
Public Shared Sub LoadValue(control As Windows.Forms.DataGridView, values As List(Of Object))
|
||||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
control.Rows.Clear()
|
||||||
Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, ConnId, SQLCommand)
|
For Each item In values
|
||||||
|
control.Rows.Add(item.ToString)
|
||||||
' SQLCommand ignorieren
|
Next
|
||||||
If dynamic.StaticList IsNot Nothing Then
|
|
||||||
control.DataSource = dynamic.StaticList
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -401,7 +401,6 @@ Module ClassControlProperties
|
|||||||
Inherits CommonProperties
|
Inherits CommonProperties
|
||||||
|
|
||||||
Private _show_column As Boolean
|
Private _show_column As Boolean
|
||||||
Private _static_list As String
|
|
||||||
|
|
||||||
<LocalizedCategoryAttribute("category_view")>
|
<LocalizedCategoryAttribute("category_view")>
|
||||||
<LocalizedDescriptionAttribute("desc_showcolumn")>
|
<LocalizedDescriptionAttribute("desc_showcolumn")>
|
||||||
@@ -413,17 +412,6 @@ Module ClassControlProperties
|
|||||||
_show_column = value
|
_show_column = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
<LocalizedCategoryAttribute("category_data")>
|
|
||||||
<LocalizedDescriptionAttribute("desc_staticlist")>
|
|
||||||
Public Property StaticList() As String
|
|
||||||
Get
|
|
||||||
Return _static_list
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
_static_list = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
End Class
|
End Class
|
||||||
Public Class PictureBoxProperties
|
Public Class PictureBoxProperties
|
||||||
Inherits CommonProperties
|
Inherits CommonProperties
|
||||||
|
|||||||
@@ -233,6 +233,11 @@ Public Class ClassControlValues
|
|||||||
Dim picturebox = DirectCast(control, PictureBox)
|
Dim picturebox = DirectCast(control, PictureBox)
|
||||||
LoadImage(recordId, controlId, picturebox)
|
LoadImage(recordId, controlId, picturebox)
|
||||||
|
|
||||||
|
Case GetType(DataGridView)
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - GetType(DataGridView) ", False)
|
||||||
|
Dim gridview = DirectCast(control, DataGridView)
|
||||||
|
ControlLoader.DataGridView.LoadValue(gridview, values)
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
||||||
End Select
|
End Select
|
||||||
@@ -297,11 +302,6 @@ Public Class ClassControlValues
|
|||||||
Dim chlistbox = DirectCast(Ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
|
Dim chlistbox = DirectCast(Ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||||
ControlLoader.CheckedListBox.LoadList(chlistbox, FormID, ConnID, sqlcommand)
|
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
|
End Select
|
||||||
|
|
||||||
swcontrol.Stop()
|
swcontrol.Stop()
|
||||||
@@ -449,6 +449,11 @@ Public Class ClassControlValues
|
|||||||
Dim lb As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
Dim lb As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||||
lb.SelectedIndex = -1
|
lb.SelectedIndex = -1
|
||||||
|
|
||||||
|
|
||||||
|
Case GetType(DataGridView)
|
||||||
|
Dim dgv As DataGridView = DirectCast(control, DataGridView)
|
||||||
|
dgv.Rows.Clear()
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -459,6 +459,7 @@ Public Class frmFormInput
|
|||||||
|
|
||||||
Private Sub tsButtonAdd_Click(sender As Object, e As EventArgs) Handles tsButtonAdd.Click
|
Private Sub tsButtonAdd_Click(sender As Object, e As EventArgs) Handles tsButtonAdd.Click
|
||||||
'CtrlCommandUI.LoadControls(thisformid)
|
'CtrlCommandUI.LoadControls(thisformid)
|
||||||
|
ClassControlValues.ClearControlValues(pnlView.Controls)
|
||||||
ClassControlValues.UnloadControlValuesList(SelectedRecordID, thisformid, pnlView.Controls)
|
ClassControlValues.UnloadControlValuesList(SelectedRecordID, thisformid, pnlView.Controls)
|
||||||
ClassControlValues.LoadControlValuesList(thisformid, pnlView.Controls)
|
ClassControlValues.LoadControlValuesList(thisformid, pnlView.Controls)
|
||||||
ClassControlValues.LoadDefaultValues(thisformid, SelectedRecordID, pnlView.Controls)
|
ClassControlValues.LoadDefaultValues(thisformid, SelectedRecordID, pnlView.Controls)
|
||||||
|
|||||||
@@ -123,6 +123,10 @@
|
|||||||
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
props.TabIndex = r.Item("CTRLSCR_TAB_INDEX")
|
||||||
|
|
||||||
Case "RadioButton"
|
Case "RadioButton"
|
||||||
|
props.ColumnTitle = r.Item("CONTROL_COL_NAME")
|
||||||
|
props.Caption = r.Item("CTRLSCR_CAPTION")
|
||||||
|
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||||
|
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||||
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
props.FontColor = IntToColor(r.Item("CTRLSCR_FONT_COLOR"))
|
||||||
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
props.Font = New Font(r.Item("CTRLSCR_FONT_FAMILY").ToString(),
|
||||||
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
CType(r.Item("CTRLSCR_FONT_SIZE"), Single),
|
||||||
@@ -150,7 +154,6 @@
|
|||||||
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
CType(r.Item("CTRLSCR_FONT_STYLE"), FontStyle))
|
||||||
props.ColumnTitle = ClassConverter.ToStringOrDefault(r.Item("CONTROL_COL_NAME"), ctrl.Name)
|
props.ColumnTitle = ClassConverter.ToStringOrDefault(r.Item("CONTROL_COL_NAME"), ctrl.Name)
|
||||||
props.ShowColumn = ClassConverter.ToBooleanOrDefault(r.Item("CONTROL_SHOW_COLUMN"), True)
|
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.SQLCommand = New SQLValue(NotNull(r.Item("CONTROL_SQLCOMMAND_1"), ""))
|
||||||
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
props.IsRequired = r.Item("CONTROL_REQUIRED")
|
||||||
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
props.IsReadOnly = r.Item("CONTROL_READ_ONLY")
|
||||||
@@ -538,7 +541,6 @@
|
|||||||
lblStatus.Visible = True
|
lblStatus.Visible = True
|
||||||
Else
|
Else
|
||||||
lblStatus.Visible = False
|
lblStatus.Visible = False
|
||||||
' MsgBox("Änderungen gespeichert!", MsgBoxStyle.Information)
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -574,7 +576,6 @@
|
|||||||
ctrl.BackColor = newValue
|
ctrl.BackColor = newValue
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
|
|
||||||
lblStatus.Text = "Ausstehende Änderungen"
|
lblStatus.Text = "Ausstehende Änderungen"
|
||||||
lblStatus.Visible = True
|
lblStatus.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user