jj_05_01_16
This commit is contained in:
parent
245a276082
commit
37f75d3656
@ -103,6 +103,7 @@ Public Class ClassControlBuilder
|
||||
Case "ComboBox"
|
||||
Dim combo As ComboBox = CType(control, ComboBox)
|
||||
AddHandler combo.SelectedValueChanged, AddressOf RecordChanged
|
||||
AddHandler combo.TextChanged, AddressOf RecordChanged
|
||||
AddHandler combo.GotFocus, AddressOf OnComboBoxFocus
|
||||
AddHandler combo.LostFocus, AddressOf OnComboBoxLostFocus
|
||||
Case "RadioButton"
|
||||
|
||||
@ -466,7 +466,7 @@ Public Class ClassControlCommandsUI
|
||||
For Each ctrl As Control In controls
|
||||
Dim CONTROL_ID As Integer = ctrl.Tag 'GetControlID_for_RecordID(ctrl.Name, RecordID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> CONTROL_ID: " & CONTROL_ID, False)
|
||||
Dim CONTROL_VALUE As String = Nothing
|
||||
Dim CONTROL_VALUE As String = GetControlValue(ctrl)
|
||||
|
||||
If TypeOf ctrl Is PictureBox Then
|
||||
Dim id As Integer = ctrl.Tag 'GetControlID_for_Name(ctrl.Name, FormID)
|
||||
@ -474,36 +474,19 @@ Public Class ClassControlCommandsUI
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' Neues Control
|
||||
If CONTROL_ID = -1 Then
|
||||
CONTROL_VALUE = GetControlValue(ctrl)
|
||||
If TypeOf ctrl Is GroupBox Then
|
||||
Dim ctrls As Control.ControlCollection = DirectCast(ctrl, GroupBox).Controls
|
||||
UpdateAllControls(FormID, RecordID, ctrls)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' Kein Bekanntes Control oder Groupbox
|
||||
If IsNothing(CONTROL_VALUE) Then
|
||||
If TypeOf ctrl Is GroupBox Then
|
||||
Dim ctrls As Control.ControlCollection = DirectCast(ctrl, GroupBox).Controls
|
||||
Dim ValueExists = ClassDatabase.Execute_Scalar(String.Format("SELECT RECORD_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0} AND CONTROL_ID = {1}", RecordID, CONTROL_ID))
|
||||
|
||||
UpdateAllControls(FormID, RecordID, ctrls)
|
||||
End If
|
||||
Else
|
||||
Dim ctrlid As Integer = GetControlID_for_Name(ctrl.Name, FormID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> InsertControlValue: " & CONTROL_ID & "|" & RecordID & "|" & CONTROL_VALUE, False)
|
||||
InsertControlValue(ctrlid, RecordID, CONTROL_VALUE)
|
||||
End If
|
||||
Else ' Control Updaten
|
||||
If ctrl.Tag = 556 Then
|
||||
Console.WriteLine("CheckedLB")
|
||||
End If
|
||||
CONTROL_VALUE = GetControlValue(ctrl)
|
||||
' Kein Bekanntes Control oder Groupbox
|
||||
If IsNothing(CONTROL_VALUE) Then
|
||||
If TypeOf ctrl Is GroupBox Then
|
||||
Dim ctrls As Control.ControlCollection = DirectCast(ctrl, GroupBox).Controls
|
||||
UpdateAllControls(FormID, RecordID, ctrls)
|
||||
End If
|
||||
Else
|
||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
End If
|
||||
If ValueExists Then ' Control Updaten
|
||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
Else ' Neues Control
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> InsertControlValue: " & CONTROL_ID & "|" & RecordID & "|" & CONTROL_VALUE, False)
|
||||
InsertControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
@ -640,8 +623,20 @@ Public Class ClassControlCommandsUI
|
||||
ClassLogger.Add("Unerwarteter Fehler in Insert ConvertValue to Format'" & FORMAT_TYPE & "': " & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Dim SQL = "INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES (" & ControlID & ", " & RecordID & ", '" & Value & "', '" & AddedWho & "')"
|
||||
Return ClassDatabase.Execute_non_Query(SQL, True)
|
||||
Using conn As New SqlClient.SqlConnection(MyConnectionString)
|
||||
Dim cmd As New SqlClient.SqlCommand("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES (@CONTROL_ID, @RECORD_ID, @VALUE, @ADDED_WHO)", conn)
|
||||
cmd.Parameters.Add("@VALUE", SqlDbType.NVarChar).Value = Value
|
||||
cmd.Parameters.Add("@ADDED_WHO", SqlDbType.VarChar).Value = AddedWho
|
||||
cmd.Parameters.Add("@CONTROL_ID", SqlDbType.Int).Value = ControlID
|
||||
cmd.Parameters.Add("@RECORD_ID", SqlDbType.Int).Value = RecordID
|
||||
|
||||
conn.Open()
|
||||
cmd.ExecuteNonQuery()
|
||||
Return True
|
||||
End Using
|
||||
|
||||
'Dim SQL = "INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES (" & ControlID & ", " & RecordID & ", '" & Value & "', '" & AddedWho & "')"
|
||||
'Return ClassDatabase.Execute_non_Query(SQL, True)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unerwarteter Fehler in InsertControlValue: " & ex.Message, True)
|
||||
Return False
|
||||
@ -666,8 +661,20 @@ Public Class ClassControlCommandsUI
|
||||
ClassLogger.Add("Unerwarteter Fehler in Update ConvertValue to Format'" & FORMAT_TYPE & "': " & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Dim SQL As String = "UPDATE TBPMO_CONTROL_VALUE SET VALUE = '" & Value & "', CHANGED_WHO = '" & CHANGED_WHO & "' WHERE CONTROL_ID = " & ControlID & " AND RECORD_ID = " & RecordID
|
||||
Return ClassDatabase.Execute_non_Query(SQL, True)
|
||||
Using conn As New SqlClient.SqlConnection(MyConnectionString)
|
||||
Dim cmd As New SqlClient.SqlCommand("UPDATE TBPMO_CONTROL_VALUE SET VALUE = @VALUE, CHANGED_WHO = @CHANGED_WHO WHERE CONTROL_ID = @CONTROL_ID AND RECORD_ID = @RECORD_ID", conn)
|
||||
cmd.Parameters.Add("@VALUE", SqlDbType.NVarChar).Value = Value
|
||||
cmd.Parameters.Add("@CHANGED_WHO", SqlDbType.VarChar).Value = CHANGED_WHO
|
||||
cmd.Parameters.Add("@CONTROL_ID", SqlDbType.Int).Value = ControlID
|
||||
cmd.Parameters.Add("@RECORD_ID", SqlDbType.Int).Value = RecordID
|
||||
|
||||
conn.Open()
|
||||
cmd.ExecuteNonQuery()
|
||||
Return True
|
||||
End Using
|
||||
|
||||
'Dim SQL As String = "UPDATE TBPMO_CONTROL_VALUE SET VALUE = '" & Value & "', CHANGED_WHO = '" & CHANGED_WHO & "' WHERE CONTROL_ID = " & ControlID & " AND RECORD_ID = " & RecordID
|
||||
'Return ClassDatabase.Execute_non_Query(Sql, True)
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unerwarteter Fehler in UpdateControlValue: " & ex.Message, True)
|
||||
|
||||
@ -1,6 +1,38 @@
|
||||
Namespace ControlLoader
|
||||
|
||||
Public Class _BaseControl
|
||||
|
||||
Public Shared Function ReplaceSqlCommandPlaceholders(sqlCommand As String, recordId As Integer, parentRecordId As Integer)
|
||||
sqlCommand = sqlCommand.Replace("@RECORD_ID", recordId)
|
||||
sqlCommand = sqlCommand.Replace("@RECORDID", recordId)
|
||||
sqlCommand = sqlCommand.Replace("@PARENTRECORD_ID", parentRecordId)
|
||||
sqlCommand = sqlCommand.Replace("@PARENTRECORDID", parentRecordId)
|
||||
|
||||
Return sqlCommand
|
||||
End Function
|
||||
|
||||
Public Shared Function LoadAutoValue(control As Windows.Forms.Label, RecordId As Integer, ParentRecordId As Integer)
|
||||
Dim AutoValue As String = String.Empty
|
||||
Dim ControlId As Integer = control.Tag
|
||||
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
||||
SQL = ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId)
|
||||
|
||||
If SQL = "" Or IsDBNull(SQL) Then
|
||||
Return control.Text
|
||||
End If
|
||||
|
||||
AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If String.IsNullOrEmpty(AutoValue) Or IsDBNull(AutoValue) Then
|
||||
SQL = String.Format("SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", ControlId)
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return AutoValue
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class _ListControl : Inherits _BaseControl
|
||||
@ -58,14 +90,7 @@
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Shared Function ReplaceSqlCommandPlaceholders(sqlCommand As String, recordId As Integer, parentRecordId As Integer)
|
||||
sqlCommand = sqlCommand.Replace("@RECORD_ID", recordId)
|
||||
sqlCommand = sqlCommand.Replace("@RECORDID", recordId)
|
||||
sqlCommand = sqlCommand.Replace("@PARENTRECORD_ID", parentRecordId)
|
||||
sqlCommand = sqlCommand.Replace("@PARENTRECORDID", parentRecordId)
|
||||
|
||||
Return sqlCommand
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Structure DynamicValue
|
||||
@ -75,9 +100,14 @@
|
||||
|
||||
Public Class Label : Inherits _BaseControl
|
||||
|
||||
Public Shared Sub LoadValue(control As Windows.Forms.Label, value As String)
|
||||
' TODO: LoadControlAutoValue aufrufen
|
||||
control.Text = value
|
||||
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String)
|
||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId)
|
||||
|
||||
If IsNothing(autoValue) Then
|
||||
control.Text = value
|
||||
Else
|
||||
control.Text = autoValue
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@ -179,14 +209,18 @@
|
||||
Public Class CheckedListBox : Inherits _ListControl
|
||||
|
||||
Public Shared Sub LoadValue(control As DevExpress.XtraEditors.CheckedListBoxControl, value As String)
|
||||
If IsNothing(value) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each item As String In control.Items
|
||||
|
||||
Dim pos = control.FindStringExact(value)
|
||||
control.SetItemCheckState(pos, CheckState.Checked)
|
||||
Dim values() As String = value.Split(";")
|
||||
|
||||
For Each v As String In values
|
||||
Dim pos = control.FindStringExact(v)
|
||||
If pos >= 0 Then
|
||||
control.SetItemCheckState(pos, CheckState.Checked)
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub LoadList(control As DevExpress.XtraEditors.CheckedListBoxControl, formId As Integer, recordId As Integer, parentRecordId As Integer)
|
||||
@ -195,11 +229,6 @@
|
||||
|
||||
If dynamic.StaticList IsNot Nothing Then
|
||||
control.DataSource = dynamic.StaticList
|
||||
|
||||
'For Each item As String In dynamic.StaticList
|
||||
' Dim pos = control.FindStringExact(item)
|
||||
' control.SetItemCheckState(pos, CheckState.Checked)
|
||||
'Next
|
||||
End If
|
||||
|
||||
If dynamic.DataTable IsNot Nothing AndAlso dynamic.DataTable.Rows.Count > 0 Then
|
||||
|
||||
@ -1,157 +1,152 @@
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
|
||||
Public Class ClassControlValues
|
||||
Private Shared Function LoadControlAutoValue(ControlID As Integer, RecordID As Integer, control As Control) As String
|
||||
'Private Shared Function LoadControlAutoValue(ControlID As Integer, RecordID As Integer, control As Control) As String
|
||||
|
||||
If TypeOf control Is Label Then
|
||||
'If ControlID = 320 Then
|
||||
' MsgBox("")
|
||||
'End If
|
||||
' Dim SQL As String = "SELECT CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
' Dim type As Integer = ClassDatabase.Execute_Scalar(SQL)
|
||||
Dim SQL
|
||||
' Wenn kein/leerer Wert gefunden, suche nach einem SQL Command für Automatischen Wert
|
||||
'If type = 1 Then
|
||||
Dim autoValue
|
||||
SQL = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
Dim result = ClassDatabase.Execute_Scalar(SQL)
|
||||
result = result.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
result = result.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' Wenn das SQL Command leer ist, hat dieses Control kein SQL Command
|
||||
' Gib den ursprünlichen Text zurück
|
||||
If result = "" Then
|
||||
Return control.Text
|
||||
Else
|
||||
autoValue = ClassDatabase.Execute_Scalar(result)
|
||||
' If TypeOf control Is Label Then
|
||||
' Dim SQL = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
' Dim autoValue
|
||||
' Dim result = ClassDatabase.Execute_Scalar(SQL)
|
||||
' result = result.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
' result = result.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' result = result.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' result = result.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' ' Wenn das SQL Command leer ist, hat dieses Control kein SQL Command
|
||||
' ' Gib den ursprünlichen Text zurück
|
||||
' If result = "" Then
|
||||
' Return control.Text
|
||||
' Else
|
||||
' autoValue = ClassDatabase.Execute_Scalar(result)
|
||||
|
||||
' Wenn das SQL Command DBNull zurück gibt,
|
||||
' Überschreibe den alten Wert mit " " (Leerzeichen)
|
||||
If IsDBNull(autoValue) Then
|
||||
SQL = "SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return autoValue
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
' ' Wenn das SQL Command DBNull zurück gibt,
|
||||
' ' Überschreibe den alten Wert mit " " (Leerzeichen)
|
||||
' If IsDBNull(autoValue) Then
|
||||
' SQL = "SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
' Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
' Return value
|
||||
' Else
|
||||
' Return autoValue
|
||||
' End If
|
||||
' End If
|
||||
' 'End If
|
||||
|
||||
'Return Nothing
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
' 'Return Nothing
|
||||
' Else
|
||||
' Return Nothing
|
||||
' End If
|
||||
|
||||
End Function
|
||||
'End Function
|
||||
|
||||
Public Shared Sub LoadControlValue(RecordID As Integer, ControlID As Integer, control As Control)
|
||||
Try
|
||||
' Dim DT1 As DataTable = ClassDatabase.Return_Datatable()
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_VALUES WHERE RECORD_ID = " & RecordID & " and CONTROL_ID = " & ControlID, "LaodControlValue: ReturnValues")
|
||||
If DT.Rows.Count = 0 Then
|
||||
Dim autoValue = LoadControlAutoValue(ControlID, RecordID, control)
|
||||
'Public Shared Sub LoadControlValue(RecordID As Integer, ControlID As Integer, control As Control)
|
||||
' Try
|
||||
' ' Dim DT1 As DataTable = ClassDatabase.Return_Datatable()
|
||||
' Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_VALUES WHERE RECORD_ID = " & RecordID & " and CONTROL_ID = " & ControlID, "LaodControlValue: ReturnValues")
|
||||
' If DT.Rows.Count = 0 Then
|
||||
' Dim autoValue = LoadControlAutoValue(ControlID, RecordID, control)
|
||||
|
||||
If Not String.IsNullOrEmpty(autoValue) Then
|
||||
control.Text = autoValue
|
||||
End If
|
||||
' If Not String.IsNullOrEmpty(autoValue) Then
|
||||
' control.Text = autoValue
|
||||
' End If
|
||||
|
||||
Exit Sub
|
||||
End If
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
Dim result = DT.Rows(0).Item("VALUE")
|
||||
'22.06.2015
|
||||
If Not IsDBNull(result) Then
|
||||
Select Case DT.Rows(0).Item("CONTROL_TYPE_ID")
|
||||
Case 1 'Label
|
||||
Dim label As Label = DirectCast(control, Label)
|
||||
Dim autoValue As String = LoadControlAutoValue(ControlID, RecordID, control)
|
||||
If Not IsNothing(autoValue) Then
|
||||
label.Text = autoValue
|
||||
End If
|
||||
Case 2 ' TextBox
|
||||
Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||
textbox.Text = result
|
||||
Case 10 ' CheckBox
|
||||
Dim checkbox As CheckBox = DirectCast(control, CheckBox)
|
||||
checkbox.Checked = CBool(result)
|
||||
Case 11 'RadioButton
|
||||
Dim radio As RadioButton = DirectCast(control, RadioButton)
|
||||
radio.Checked = CBool(result)
|
||||
Case 3 ' ComboBox
|
||||
Dim cmbbox As ComboBox = DirectCast(control, System.Windows.Forms.ComboBox)
|
||||
cmbbox.Text = result
|
||||
'If LogErrorsOnly = False Then ClassLogger.Add(">> control ComboBox", False)
|
||||
'Dim cmbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
'cmbSql = ClassDatabase.Execute_Scalar(cmbSql)
|
||||
'If Not (cmbSql Is Nothing Or cmbSql = String.Empty) Then
|
||||
' If cmbSql.ToString.Contains("@") Then
|
||||
' cmbSql = cmbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' cmbSql = cmbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' cmbSql = cmbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
' End If
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
' Dim result = DT.Rows(0).Item("VALUE")
|
||||
' '22.06.2015
|
||||
' If Not IsDBNull(result) Then
|
||||
' Select Case DT.Rows(0).Item("CONTROL_TYPE_ID")
|
||||
' Case 1 'Label
|
||||
' Dim label As Label = DirectCast(control, Label)
|
||||
' Dim autoValue As String = LoadControlAutoValue(ControlID, RecordID, control)
|
||||
' If Not IsNothing(autoValue) Then
|
||||
' label.Text = autoValue
|
||||
' End If
|
||||
' Case 2 ' TextBox
|
||||
' Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||
' textbox.Text = result
|
||||
' Case 10 ' CheckBox
|
||||
' Dim checkbox As CheckBox = DirectCast(control, CheckBox)
|
||||
' checkbox.Checked = CBool(result)
|
||||
' Case 11 'RadioButton
|
||||
' Dim radio As RadioButton = DirectCast(control, RadioButton)
|
||||
' radio.Checked = CBool(result)
|
||||
' Case 3 ' ComboBox
|
||||
' Dim cmbbox As ComboBox = DirectCast(control, System.Windows.Forms.ComboBox)
|
||||
' cmbbox.Text = result
|
||||
' 'If LogErrorsOnly = False Then ClassLogger.Add(">> control ComboBox", False)
|
||||
' 'Dim cmbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
' 'cmbSql = ClassDatabase.Execute_Scalar(cmbSql)
|
||||
' 'If Not (cmbSql Is Nothing Or cmbSql = String.Empty) Then
|
||||
' ' If cmbSql.ToString.Contains("@") Then
|
||||
' ' cmbSql = cmbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' ' cmbSql = cmbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' ' cmbSql = cmbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
' ' End If
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ComboBox As DataTable = ClassDatabase.Return_Datatable(cmbSql, "LoadControlValues: Combobox")
|
||||
' If DT_ComboBox Is Nothing = False Then
|
||||
' cmbbox.DataSource = DT_ComboBox
|
||||
' Select Case DT_ComboBox.Columns.Count
|
||||
' Case 2
|
||||
' cmbbox.DisplayMember = DT_ComboBox.Columns(1).ColumnName
|
||||
' cmbbox.ValueMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' cmbbox.DisplayMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' cmbbox.ValueMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ComboBox As DataTable = ClassDatabase.Return_Datatable(cmbSql, "LoadControlValues: Combobox")
|
||||
' ' If DT_ComboBox Is Nothing = False Then
|
||||
' ' cmbbox.DataSource = DT_ComboBox
|
||||
' ' Select Case DT_ComboBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' cmbbox.DisplayMember = DT_ComboBox.Columns(1).ColumnName
|
||||
' ' cmbbox.ValueMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' cmbbox.DisplayMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' ' cmbbox.ValueMember = DT_ComboBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
|
||||
' End If
|
||||
'End If
|
||||
''combobox.DataSource = Nothing
|
||||
'If cmbbox.SelectedIndex = -1 Then
|
||||
' cmbbox.DataSource = Nothing
|
||||
' cmbbox.Text = result
|
||||
'Else
|
||||
' cmbbox.SelectedIndex = cmbbox.FindStringExact(result)
|
||||
'End If
|
||||
Case 4 'DateTimePicker
|
||||
Dim datepicker As DevExpress.XtraEditors.DateEdit = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||
' ' End If
|
||||
' 'End If
|
||||
' ''combobox.DataSource = Nothing
|
||||
' 'If cmbbox.SelectedIndex = -1 Then
|
||||
' ' cmbbox.DataSource = Nothing
|
||||
' ' cmbbox.Text = result
|
||||
' 'Else
|
||||
' ' cmbbox.SelectedIndex = cmbbox.FindStringExact(result)
|
||||
' 'End If
|
||||
' Case 4 'DateTimePicker
|
||||
' Dim datepicker As DevExpress.XtraEditors.DateEdit = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||
|
||||
If result = "" Or result = "00:00:00" Then
|
||||
datepicker.DateTime = DateTime.MinValue
|
||||
Else
|
||||
datepicker.DateTime = Date.Parse(result)
|
||||
End If
|
||||
Case 13 ' Listbox
|
||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
listbox.SelectedIndex = listbox.FindStringExact(result)
|
||||
Case Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & DT.Rows(0).Item("CONTROL_TYPE_ID"), False)
|
||||
'MsgBox(DT.Rows(0).Item("CONTROL_TYPE_ID"))
|
||||
End Select
|
||||
Else
|
||||
ClassLogger.Add(" >> Achtung, der Value für Control-ID: " & ControlID & " ist DBNull", False)
|
||||
End If
|
||||
' If result = "" Or result = "00:00:00" Then
|
||||
' datepicker.DateTime = DateTime.MinValue
|
||||
' Else
|
||||
' datepicker.DateTime = Date.Parse(result)
|
||||
' End If
|
||||
' Case 13 ' Listbox
|
||||
' Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' listbox.SelectedIndex = listbox.FindStringExact(result)
|
||||
' Case Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & DT.Rows(0).Item("CONTROL_TYPE_ID"), False)
|
||||
' 'MsgBox(DT.Rows(0).Item("CONTROL_TYPE_ID"))
|
||||
' End Select
|
||||
' Else
|
||||
' ClassLogger.Add(" >> Achtung, der Value für Control-ID: " & ControlID & " ist DBNull", False)
|
||||
' End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
#Region "#### ClassControlValues REWRITE ####"
|
||||
Public Shared Sub LoadControlValuesNeu(RecordId As Integer, FormId As Integer, controls As Control.ControlCollection)
|
||||
Public Shared Sub LoadControlValuesNeu(RecordId As Integer, ParentRecordId As Integer, FormId As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE VALUE <> '' AND RECORD_ID = {0}", RecordId)
|
||||
Dim DT_ControlValues As DataTable = ClassDatabase.Return_Datatable(SQL, "LoadControlValues")
|
||||
|
||||
If controls.Count = 0 Then
|
||||
ClassLogger.Add("the control-Collection in LoadControlValuesNeu is empty!", True)
|
||||
End If
|
||||
|
||||
' Zuerst alle Controls leeren
|
||||
ClearControlValues(controls)
|
||||
|
||||
For Each control As Control In controls
|
||||
Dim ControlId As Integer = CInt(control.Tag)
|
||||
'Dim SQL1 As String = String.Format("SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND VALUE <> '' AND RECORD_ID = {1}", ControlId, RecordId)
|
||||
'Dim value = ClassDatabase.Execute_Scalar(SQL1)
|
||||
|
||||
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
||||
Dim value = (From row In DT_ControlValues.AsEnumerable()
|
||||
@ -160,92 +155,19 @@ Public Class ClassControlValues
|
||||
|
||||
If TypeOf control Is GroupBox Then
|
||||
Dim groupbox As GroupBox = DirectCast(control, GroupBox)
|
||||
LoadControlValuesNeu(RecordId, FormId, groupbox.Controls)
|
||||
LoadControlValuesNeu(RecordId, ParentRecordId, FormId, groupbox.Controls)
|
||||
Else
|
||||
LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
LoadControlValueNeu(RecordId, ParentRecordId, ControlId, control, value)
|
||||
End If
|
||||
|
||||
'If Not IsNothing(value) Then
|
||||
' ' Continue For
|
||||
' If TypeOf control Is GroupBox Then
|
||||
' Dim groupbox As GroupBox = DirectCast(control, GroupBox)
|
||||
' LoadControlValuesNeu(RecordId, FormId, groupbox.Controls)
|
||||
' Else
|
||||
' LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
' End If
|
||||
'Else
|
||||
' If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlId
|
||||
' ' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' ' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' ' If chklbSql.ToString.Contains("@") Then
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValues: CheckedListBox")
|
||||
' ' If DT_ListBox Is Nothing = False Then
|
||||
' ' chklbx.DataSource = DT_ListBox
|
||||
' ' Select Case DT_ListBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
' ' End If
|
||||
' ' End If
|
||||
' ' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' ' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' ' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' ' If Not IsNothing(result) Then
|
||||
' ' If result.ToString <> String.Empty Then
|
||||
' ' Dim entries() As String = result.Split(";")
|
||||
' ' For Each entry As String In entries
|
||||
' ' Dim position = chklbx.FindStringExact(entry)
|
||||
' ' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' ' Next
|
||||
' ' End If
|
||||
' ' End If
|
||||
' ' Continue For
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' ' End If
|
||||
' ' chklbx.UnCheckAll()
|
||||
' ' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' ' Dim index As Integer = 0
|
||||
' ' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' ' Dim item = chklbx.GetItem(i)
|
||||
' ' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' ' If CInt(row(0)) > 0 Then
|
||||
' ' 'Überprüfen ob es den Record gibt
|
||||
' ' Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||
' ' If ClassDatabase.Execute_Scalar(SQL) = 1 Then
|
||||
' ' chklbx.SetItemChecked(i, True)
|
||||
' ' End If
|
||||
' ' End If
|
||||
' ' Next
|
||||
' ElseIf TypeOf control Is Label Then
|
||||
' LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlValuesNeu:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Shared Sub LoadControlValueNeu(recordId As Integer, controlId As Integer, control As Control, value As Object)
|
||||
Private Shared Sub LoadControlValueNeu(recordId As Integer, parentRecordId As Integer, controlId As Integer, control As Control, value As Object)
|
||||
Try
|
||||
Select Case control.GetType()
|
||||
Case GetType(TextBox)
|
||||
@ -254,7 +176,7 @@ Public Class ClassControlValues
|
||||
|
||||
Case GetType(Label)
|
||||
Dim label As Label = DirectCast(control, Label)
|
||||
ControlLoader.Label.LoadValue(label, value)
|
||||
ControlLoader.Label.LoadValue(label, recordId, parentRecordId, value)
|
||||
|
||||
Case GetType(ComboBox)
|
||||
Dim combobox As ComboBox = DirectCast(control, ComboBox)
|
||||
@ -291,368 +213,12 @@ Public Class ClassControlValues
|
||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
|
||||
'Try
|
||||
' Select Case control.GetType()
|
||||
' Case GetType(TextBox)
|
||||
' Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||
' textbox.Text = value
|
||||
' Case GetType(Label)
|
||||
' Dim label As Label = DirectCast(control, Label)
|
||||
' Dim autoValue As String = LoadControlAutoValue(controlId, recordId, control)
|
||||
|
||||
' If IsNothing(autoValue) Then
|
||||
' label.Text = value
|
||||
' Else
|
||||
' label.Text = autoValue
|
||||
' End If
|
||||
' Case GetType(ComboBox)
|
||||
' Dim combobox As ComboBox = DirectCast(control, ComboBox)
|
||||
' combobox.Text = value
|
||||
' Case GetType(CheckBox)
|
||||
' Dim checkbox As CheckBox = DirectCast(control, CheckBox)
|
||||
' checkbox.Checked = Boolean.Parse(value)
|
||||
' Case GetType(RadioButton)
|
||||
' Dim radiobutton As RadioButton = DirectCast(control, RadioButton)
|
||||
' radiobutton.Checked = Boolean.Parse(value)
|
||||
' Case GetType(DevExpress.XtraEditors.DateEdit)
|
||||
' Dim datepicker As DevExpress.XtraEditors.DateEdit = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||
' If value = String.Empty Or value = "00:00:00" Then
|
||||
' datepicker.DateTime = DateTime.MinValue
|
||||
' Else
|
||||
' datepicker.DateTime = DateTime.Parse(value)
|
||||
' End If
|
||||
' Case GetType(DevExpress.XtraEditors.ListBoxControl)
|
||||
' Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' listbox.SelectedIndex = listbox.FindStringExact(value)
|
||||
' Case GetType(PictureBox)
|
||||
' LoadImage(recordId, controlId, control)
|
||||
' Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
' If Not IsNothing(value) Then
|
||||
' If value.ToString <> String.Empty Then
|
||||
' Dim entries() As String = value.Split(";")
|
||||
' For Each entry As String In entries
|
||||
' Dim position = chklbx.FindStringExact(entry)
|
||||
' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' Case Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - Control-Type is not being worked: " & GetType(Control).ToString(), False)
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Error in LoadControlValueNeu:" & vbNewLine & ex.Message)
|
||||
'End Try
|
||||
End Sub
|
||||
|
||||
'Private Shared Function CheckForStaticList(controlId As Integer, recordId As Integer)
|
||||
' Try
|
||||
' Dim SQL As String = String.Format("SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", controlId, recordId)
|
||||
' Dim staticList As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
' If IsNothing(staticList) Then
|
||||
' Return Nothing
|
||||
' Else
|
||||
' Return staticList
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in CheckForStaticList: " & vbNewLine & ex.Message)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Private Shared Function CheckForSqlCommand(controlId As Integer) As DataTable
|
||||
' Try
|
||||
' Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", controlId)
|
||||
' Dim SqlCommand As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
' If SqlCommand Is Nothing Or SqlCommand = String.Empty Then
|
||||
' Return Nothing
|
||||
' End If
|
||||
|
||||
' If SqlCommand.Contains("@") Then
|
||||
' SqlCommand = ReplaceSqlCommandPlaceholders(SqlCommand)
|
||||
' End If
|
||||
|
||||
' Return ClassDatabase.Return_Datatable(SqlCommand)
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in CheckForSqlCommand: " & vbNewLine & ex.Message)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
'Private Shared Function ReplaceSqlCommandPlaceholders(sqlCommand As String)
|
||||
' sqlCommand = sqlCommand.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' sqlCommand = sqlCommand.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' sqlCommand = sqlCommand.Replace("PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' sqlCommand = sqlCommand.Replace("PARENTRECORDID", CURRENT_PARENTID)
|
||||
|
||||
' Return sqlCommand
|
||||
'End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
'Public Shared Sub LoadControlValues(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
' Try
|
||||
' Dim CONTROL_ID As Integer
|
||||
|
||||
' ClearControlValues(controls)
|
||||
|
||||
' For Each control As Control In controls
|
||||
' 'Überhaupt Columns in Grid?
|
||||
' CONTROL_ID = GetControlID_for_RecordID(control.Name, RecordID)
|
||||
' If CONTROL_ID = -1 Then
|
||||
' CONTROL_ID = GetControlID_for_Name(control.Name, FormID)
|
||||
' End If
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> CONTROL_ID:" & CONTROL_ID, False)
|
||||
' ClearControlValue(control)
|
||||
' If TypeOf control Is ComboBox Then
|
||||
' LoadControlValue_forControl(RecordID, FormID, DirectCast(control, ComboBox), CONTROL_ID)
|
||||
' 'LoadControlValues(RecordID, FormID, DirectCast(control, ComboBox).Controls)
|
||||
' ElseIf TypeOf control Is GroupBox Then
|
||||
' 'LoadControlValue_forControl(RecordID, FormID, DirectCast(control, GroupBox), CONTROL_ID)
|
||||
' LoadControlValues(RecordID, FormID, DirectCast(control, GroupBox).Controls)
|
||||
' ElseIf TypeOf control Is PictureBox Then
|
||||
' LoadImage(RecordID, CONTROL_ID, control)
|
||||
' Else
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' End If
|
||||
' ''EINE CheckedListBoxControl
|
||||
' 'If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' ' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' ' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
' ' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' ' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' ' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' ' If chklbSql.ToString.Contains("@") Then
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValues: CheckedListBox")
|
||||
' ' If DT_ListBox Is Nothing = False Then
|
||||
' ' chklbx.DataSource = DT_ListBox
|
||||
' ' Select Case DT_ListBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' ' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' ' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' ' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
|
||||
' ' If Not IsNothing(result) Then
|
||||
' ' If result.ToString <> String.Empty Then
|
||||
' ' Dim entries() As String = result.Split(";")
|
||||
' ' For Each entry As String In entries
|
||||
' ' Dim position = chklbx.FindStringExact(entry)
|
||||
' ' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' ' Next
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' ' Continue For
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' ' End If
|
||||
|
||||
' ' chklbx.UnCheckAll()
|
||||
' ' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' ' Dim index As Integer = 0
|
||||
' ' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' ' Dim item = chklbx.GetItem(i)
|
||||
' ' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' ' If CInt(row(0)) > 0 Then
|
||||
' ' 'Überprüfen ob es den Record gibt
|
||||
' ' Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||
' ' If ClassDatabase.Execute_Scalar(SQL) = 1 Then
|
||||
' ' chklbx.SetItemChecked(i, True)
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' ' Next
|
||||
' 'ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
' ' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' ' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' ' Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' ' lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
' ' If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
' ' If lbSql.ToString.Contains("@") Then
|
||||
' ' lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
' ' lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
' ' lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValues: ListBoxControl")
|
||||
' ' If DT_ListBox Is Nothing = False Then
|
||||
' ' lbx.DataSource = DT_ListBox
|
||||
' ' Select Case DT_ListBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' ' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
' ' If DT_ListBox.Columns.Count > 1 Then
|
||||
|
||||
' ' End If
|
||||
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
' ' End If
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
' ' End If
|
||||
' ' ElseIf (lbSql = String.Empty) Then
|
||||
' ' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' ' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' ' Continue For
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
' ' End If
|
||||
' 'ElseIf CONTROL_ID <> -1 Then
|
||||
' ' 'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValues CONTROL_ID: " & CONTROL_ID, False)
|
||||
' ' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' 'End If
|
||||
' Next
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in LoadControlValues:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
'End Sub
|
||||
'Public Shared Sub LoadControlValue_forControl(RecordID As Integer, FormID As Integer, control As System.Windows.Forms.Control, CONTROL_ID As Integer)
|
||||
' Try
|
||||
' 'EINE CheckedListBoxControl
|
||||
' If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' If chklbSql.ToString.Contains("@") Then
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValue_forControl: CheckedListBox")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' chklbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
|
||||
' If Not IsNothing(result) Then
|
||||
' If result.ToString <> String.Empty Then
|
||||
' Dim entries() As String = result.Split(";")
|
||||
' For Each entry As String In entries
|
||||
' Dim position = chklbx.FindStringExact(entry)
|
||||
' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' End If
|
||||
|
||||
' chklbx.UnCheckAll()
|
||||
' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' Dim index As Integer = 0
|
||||
' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' Dim item = chklbx.GetItem(i)
|
||||
' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' If CInt(row(0)) > 0 Then
|
||||
' 'Überprüfen ob es den Record gibt
|
||||
' Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||
' If ClassDatabase.Execute_Scalar(SQL) = 1 Then
|
||||
' chklbx.SetItemChecked(i, True)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next
|
||||
' ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
' If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
' If lbSql.ToString.Contains("@") Then
|
||||
' lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValue_forControl: ListBoxControl")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' lbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
' If DT_ListBox.Columns.Count > 1 Then
|
||||
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
' End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
' End If
|
||||
' ElseIf (lbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
' End If
|
||||
' ElseIf CONTROL_ID <> -1 Then
|
||||
' 'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValue_forControl CONTROL_ID: " & CONTROL_ID, False)
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' End If
|
||||
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in LoadControlValue_forControl:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
'End Sub
|
||||
|
||||
Public Shared Sub LoadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
Public Shared Sub LoadControlValuesList(RecordID As Integer, ParentRecordId As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
If controls.Count = 0 Then
|
||||
MsgBox("Control.ControlCollection is unexpected empty!", MsgBoxStyle.Exclamation)
|
||||
@ -683,7 +249,7 @@ Public Class ClassControlValues
|
||||
'Dim DT_Combobox As DataTable = ClassDatabase.Return_Datatable(SQL2)
|
||||
|
||||
' Zuerst versuchen, DataTable aus dem Cache zu laden
|
||||
Dim DT_Combobox As DataTable = ClassControlValueCache.LoadFromCache(FormID, controlId)
|
||||
Dim DT_Combobox As DataTable = ClassControlValueCache.LoadFromCache(FormID, ControlId)
|
||||
' Wenn DataTable nicht im Cache vorhanden, aus der Datenbank laden
|
||||
If IsNothing(DT_Combobox) Then
|
||||
DT_Combobox = ClassDatabase.Return_Datatable(SQL2)
|
||||
@ -695,7 +261,7 @@ Public Class ClassControlValues
|
||||
Combobox.DisplayMember = DT_Combobox.Columns(1).ColumnName
|
||||
Combobox.ValueMember = DT_Combobox.Columns(0).ColumnName
|
||||
|
||||
ClassControlValueCache.SaveToCache(FormID, controlId, DT_Combobox)
|
||||
ClassControlValueCache.SaveToCache(FormID, ControlId, DT_Combobox)
|
||||
End If
|
||||
|
||||
Dim iWidestWidth As Integer = 300
|
||||
@ -714,8 +280,8 @@ Public Class ClassControlValues
|
||||
Combobox.DropDownWidth = Math.Max(iWidestWidth, Combobox.Width)
|
||||
End If
|
||||
|
||||
LoadControlValue(RecordID, ControlId, Ctrl)
|
||||
'LoadControlValueNeu(RecordID, ControlId, Ctrl, "")
|
||||
'LoadControlValue(RecordID, ControlId, Ctrl)
|
||||
LoadControlValueNeu(RecordID, ParentRecordId, ControlId, Ctrl, "")
|
||||
End If
|
||||
|
||||
swInner.Stop()
|
||||
@ -759,6 +325,7 @@ Public Class ClassControlValues
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "ClearControlValue"
|
||||
Public Shared Sub ClearControlValues(controls As Control.ControlCollection)
|
||||
For Each control In controls
|
||||
If control.GetType().Name = "GroupBox" Then
|
||||
@ -771,60 +338,58 @@ Public Class ClassControlValues
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ClearControlValue(control As Control)
|
||||
Dim type = control.GetType().Name
|
||||
|
||||
Select Case type
|
||||
Case "TextBox"
|
||||
Select Case control.GetType()
|
||||
Case GetType(TextBox)
|
||||
DirectCast(control, TextBox).Text = String.Empty
|
||||
Case "ComboBox"
|
||||
|
||||
Case GetType(ComboBox)
|
||||
Dim combo As ComboBox = DirectCast(control, ComboBox)
|
||||
combo.SelectedIndex = -1
|
||||
combo.Text = String.Empty
|
||||
Case "CheckBox"
|
||||
|
||||
Case GetType(CheckBox)
|
||||
DirectCast(control, CheckBox).Checked = False
|
||||
Case "RadioButton"
|
||||
|
||||
Case GetType(RadioButton)
|
||||
DirectCast(control, RadioButton).Checked = False
|
||||
Case "DateEdit"
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.DateEdit)
|
||||
DirectCast(control, DevExpress.XtraEditors.DateEdit).DateTime = Now
|
||||
Case "PictureBox"
|
||||
|
||||
Case GetType(PictureBox)
|
||||
DirectCast(control, PictureBox).BackgroundImage = Nothing
|
||||
Case "CheckedListBoxControl"
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
'If IsNothing(chklbx.DataSource) Then
|
||||
chklbx.UnCheckAll()
|
||||
'End If
|
||||
'Case "ListBoxControl"
|
||||
' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' lbx.DataSource = Nothing
|
||||
Case Else
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.ListBoxControl)
|
||||
Dim lb As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
lb.SelectedIndex = -1
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "LoadDefaultValue"
|
||||
Public Shared Sub LoadDefaultValues(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection)
|
||||
Dim CONTROL_ID As Integer
|
||||
'' Zuerst alle Controls leeren
|
||||
'ClearControlValues(controls)
|
||||
|
||||
' Zuerst alle Controls leeren
|
||||
ClearControlValues(controls)
|
||||
Dim i = 0
|
||||
For Each control As Control In controls
|
||||
|
||||
CONTROL_ID = control.Tag ' GetControlID_for_Name(control.Name, FormID)
|
||||
Dim CONTROL_ID = control.Tag ' GetControlID_for_Name(control.Name, FormID)
|
||||
If Not (TypeOf control Is Label) Then
|
||||
i += 1
|
||||
End If
|
||||
|
||||
If TypeOf control Is GroupBox Then
|
||||
LoadDefaultValues(FormID, RecordID, DirectCast(control, GroupBox).Controls)
|
||||
ElseIf TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
chklbx.UnCheckAll()
|
||||
End If
|
||||
|
||||
If CONTROL_ID <> -1 Then
|
||||
LoadDefaultValue(CONTROL_ID, RecordID, control)
|
||||
End If
|
||||
LoadDefaultValue(CONTROL_ID, RecordID, control)
|
||||
|
||||
'Den Focus auf das erste Steuerelement setzen
|
||||
If i = 1 Then
|
||||
control.Focus()
|
||||
@ -835,57 +400,64 @@ Public Class ClassControlValues
|
||||
|
||||
Public Shared Sub LoadDefaultValue(ControlID As Integer, RecordID As Integer, control As Control)
|
||||
Try
|
||||
Dim SQL = "SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
Dim result = DT.Rows(0).Item("CONTROL_DEF_VALUE")
|
||||
Dim SQL = String.Format("SELECT CONTROL_DEF_VALUE FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", ControlID)
|
||||
Dim autoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
Select Case DT.Rows(0).Item("CTRLTYPE_ID")
|
||||
Case 2 ' TextBox
|
||||
'Dim SQL = "SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
'Dim DT As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
'Dim result = DT.Rows(0).Item("CONTROL_DEF_VALUE")
|
||||
|
||||
Select Case control.GetType()
|
||||
Case GetType(TextBox)
|
||||
Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||
If IsDBNull(result) Then
|
||||
If IsDBNull(autoValue) Then
|
||||
textbox.Text = ""
|
||||
Else
|
||||
Dim vorgabe = result
|
||||
Dim vorgabe = autoValue
|
||||
'Wenn der Default Wert über einen Select kommt
|
||||
If vorgabe.ToString.ToLower.StartsWith("select") Then
|
||||
vorgabe = result.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
vorgabe = autoValue.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
vorgabe = vorgabe.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
vorgabe = vorgabe.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
vorgabe = vorgabe.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
result = ClassDatabase.Execute_Scalar(vorgabe.ToString, True)
|
||||
autoValue = ClassDatabase.Execute_Scalar(vorgabe.ToString, True)
|
||||
If IsNothing(vorgabe) Then
|
||||
textbox.Text = ""
|
||||
End If
|
||||
End If
|
||||
textbox.Text = result
|
||||
|
||||
textbox.Text = autoValue
|
||||
End If
|
||||
Case 10 ' CheckBox
|
||||
|
||||
Case GetType(CheckBox)
|
||||
Dim checkbox As CheckBox = DirectCast(control, CheckBox)
|
||||
checkbox.Checked = StrToBool(result)
|
||||
Case 11 'RadioButton
|
||||
checkbox.Checked = StrToBool(autoValue)
|
||||
|
||||
Case GetType(RadioButton)
|
||||
Dim radio As RadioButton = DirectCast(control, RadioButton)
|
||||
radio.Checked = StrToBool(result)
|
||||
Case 3 ' ComboBox
|
||||
radio.Checked = StrToBool(autoValue)
|
||||
|
||||
Case GetType(ComboBox)
|
||||
Dim combobox As ComboBox = DirectCast(control, ComboBox)
|
||||
If IsDBNull(result) Then
|
||||
If IsDBNull(autoValue) Then
|
||||
combobox.SelectedIndex = -1
|
||||
Else
|
||||
combobox.SelectedIndex = combobox.FindStringExact(result)
|
||||
combobox.SelectedIndex = combobox.FindStringExact(autoValue)
|
||||
End If
|
||||
Case 4 'DateTimePicker
|
||||
Case GetType(DevExpress.XtraEditors.DateEdit)
|
||||
Dim datepicker As DevExpress.XtraEditors.DateEdit = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||
If IsDBNull(result) OrElse result = "" OrElse result = "False" Then
|
||||
result = Now
|
||||
If IsDBNull(autoValue) OrElse autoValue = "" OrElse autoValue = "False" Then
|
||||
autoValue = Now
|
||||
End If
|
||||
|
||||
datepicker.DateTime = result
|
||||
datepicker.DateTime = autoValue
|
||||
End Select
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in LoadDefaultValue:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Public Shared Function Get_Control_Value_for_ID(Control_ID As Integer, Record_ID As Integer)
|
||||
Try
|
||||
Return ClassDatabase.Execute_Scalar("SELECT VALUE FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = " & Control_ID & " AND RECORD_ID = " & Record_ID, True)
|
||||
|
||||
@ -28,6 +28,8 @@ Public Class ClassInit
|
||||
If dbResult = False Then
|
||||
Throw New Exception("Find more information in the logfile.")
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Init Database:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
|
||||
@ -1119,8 +1119,8 @@ Public Class frmForm_Constructor
|
||||
Load_Entity_Data_Only()
|
||||
Search_RowHandle(CURRENT_RECORD_ID)
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_PARENTID,CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(CURRENT_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
pnlDetails.Enabled = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@ -1645,8 +1645,8 @@ Public Class frmForm_Constructor
|
||||
If EDIT_STATE = "none" Then
|
||||
'TabPageDetails.Text = "Detaileingabe zu '" & ACT_EBENE_STRING & "' - Record(" & SelectedRecordID & ")"
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'Load_Control_Values(CtrlBuilder.AllControls)
|
||||
'Refresh_Treeview_SelectedData()
|
||||
RECORD_CHANGED = False
|
||||
@ -2361,8 +2361,8 @@ Public Class frmForm_Constructor
|
||||
Select Case TCDetails.SelectedTabPageIndex
|
||||
Case 0
|
||||
If RECORD_NEEDS_REFRESH = True Then
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
UpdRECORD_NEEDS_REFRESH(False)
|
||||
End If
|
||||
|
||||
|
||||
@ -822,7 +822,7 @@ Public Class frmForm_Constructor_Main
|
||||
Load_Entity_Data_Only()
|
||||
Get_Grid_Row_Handle(CURRENT_RECORD_ID)
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
pnlDetails.Enabled = True
|
||||
End If
|
||||
|
||||
@ -859,7 +859,7 @@ Public Class frmForm_Constructor_Main
|
||||
Me.tsButtonEditMode.Text = "Bearbeiten beenden"
|
||||
'Funktion zum Vollständigen load der Inhalte
|
||||
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
Else
|
||||
RECORD_ENABLED = False
|
||||
Me.pnlDetails.Enabled = False
|
||||
@ -1521,7 +1521,7 @@ Public Class frmForm_Constructor_Main
|
||||
If EDIT_STATE = EditState.None Then
|
||||
'TabPageDetails.Text = "Detaileingabe zu '" & ACT_EBENE_STRING & "' - Record(" & SelectedRecordID & ")"
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'Load_Control_Values(CtrlBuilder.AllControls)
|
||||
'Refresh_Treeview_SelectedData()
|
||||
RECORD_CHANGED = False
|
||||
|
||||
@ -23,9 +23,9 @@ Partial Class frmForm_Constructor_Main_2
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode3 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode4 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode5 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode6 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmForm_Constructor_Main_2))
|
||||
Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
|
||||
@ -185,6 +185,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.grvwGrid.OptionsBehavior.CopyToClipboardWithColumnHeaders = False
|
||||
Me.grvwGrid.OptionsBehavior.Editable = False
|
||||
Me.grvwGrid.OptionsBehavior.ReadOnly = True
|
||||
Me.grvwGrid.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.grvwGrid.OptionsView.ColumnAutoWidth = False
|
||||
Me.grvwGrid.OptionsView.EnableAppearanceEvenRow = True
|
||||
Me.grvwGrid.OptionsView.EnableAppearanceOddRow = True
|
||||
@ -196,12 +197,12 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.GridControlMain.ContextMenuStrip = Me.ContextMenuGrid
|
||||
Me.GridControlMain.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GridControlMain.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
GridLevelNode1.LevelTemplate = Me.grvwGrid
|
||||
GridLevelNode1.RelationName = "Level1"
|
||||
GridLevelNode2.LevelTemplate = Me.grvwCarousel
|
||||
GridLevelNode2.RelationName = "Level2"
|
||||
GridLevelNode3.RelationName = "Level3"
|
||||
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode1, GridLevelNode2, GridLevelNode3})
|
||||
GridLevelNode4.LevelTemplate = Me.grvwGrid
|
||||
GridLevelNode4.RelationName = "Level1"
|
||||
GridLevelNode5.LevelTemplate = Me.grvwCarousel
|
||||
GridLevelNode5.RelationName = "Level2"
|
||||
GridLevelNode6.RelationName = "Level3"
|
||||
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode4, GridLevelNode5, GridLevelNode6})
|
||||
Me.GridControlMain.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GridControlMain.MainView = Me.grvwTiles
|
||||
Me.GridControlMain.Name = "GridControlMain"
|
||||
|
||||
@ -154,6 +154,23 @@
|
||||
<metadata name="CMSEntity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 93</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStripDokumente.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1157, 15</value>
|
||||
</metadata>
|
||||
<metadata name="BindingNavigatorPOS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>124, 93</value>
|
||||
</metadata>
|
||||
<data name="TabPos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASdEVYdFRpdGxlAExpc3Q7QnVsbGV0O1FzfzkAAABa
|
||||
SURBVDhPY/j//z9FGEPAxsaGEYhBNF4MUw/TVADED0A0kkHMQMyCBbOCaHQDQJr/g2gkA0B8nBimDqYY
|
||||
wwXEYqyCpGCsgqRgMEGxF6CaQYEzGogjMRD/MwAARTWKOO3Nn7MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ToolStripEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>773, 15</value>
|
||||
</metadata>
|
||||
<data name="AxObjectListControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
@ -245,17 +262,6 @@
|
||||
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASdEVYdFRpdGxlAExpc3Q7QnVsbGV0O1FzfzkAAABa
|
||||
SURBVDhPY/j//z9FGEPAxsaGEYhBNF4MUw/TVADED0A0kkHMQMyCBbOCaHQDQJr/g2gkA0B8nBimDqYY
|
||||
wwXEYqyCpGCsgqRgMEGxF6CaQYEzGogjMRD/MwAARTWKOO3Nn7MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ToolStripEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>773, 15</value>
|
||||
</metadata>
|
||||
<metadata name="BindingSource_Entity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>162, 11</value>
|
||||
</metadata>
|
||||
|
||||
@ -999,7 +999,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Lock_RecordControls(False)
|
||||
tsButtonShowWorkflowTasks.Enabled = True
|
||||
ClassControlValues.LoadDefaultValues(CURRENT_FORM_ID, SELECTED_RECORD_ID, pnlDetails.Controls)
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
|
||||
' Im gegensatz zu EnableEditMode muss hier nur der save button enabled werden
|
||||
tsButtonSave.Enabled = True
|
||||
@ -1197,7 +1197,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Me.tsButtonSave.Enabled = True
|
||||
Me.tsButtonEditMode.Text = "Bearbeiten beenden"
|
||||
'Funktion zum Vollständigen load der Inhalte
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
RECORD_ENABLED = True
|
||||
pnlDetails.Focus()
|
||||
'If RECORD_ENABLED = False Then
|
||||
@ -1524,9 +1524,12 @@ Public Class frmForm_Constructor_Main_2
|
||||
' column.MinWidth = 100
|
||||
'Next
|
||||
|
||||
' Wenn rows existieren, erste row laden und recordid auslesen
|
||||
Dim firstRow As System.Data.DataRowView = GridControlMain.MainView.GetRow(0)
|
||||
Dim firstRecordId As Integer = firstRow.Row.Item("Record-ID")
|
||||
ClassControlValues.LoadControlValuesList(firstRecordId, CURRENT_FORM_ID, CtrlBuilder.MasterPanel.Controls)
|
||||
If Not IsNothing(firstRow) Then
|
||||
Dim firstRecordId As Integer = firstRow.Row.Item("Record-ID")
|
||||
ClassControlValues.LoadControlValuesList(firstRecordId, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.MasterPanel.Controls)
|
||||
End If
|
||||
|
||||
'Zurücksetzen
|
||||
ENTITY_LOADED = True
|
||||
@ -1556,7 +1559,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
CURRENT_RECORD_ID = Grid_RecordID
|
||||
'Daten zu Record in jedem Fall laden
|
||||
'ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
' Laden der Daten bedeutet nicht dass Daten vom Benutzer geändert wurden!
|
||||
RECORD_CHANGED = False
|
||||
Update_Record_Label(Grid_RecordID)
|
||||
@ -1683,48 +1686,80 @@ Public Class frmForm_Constructor_Main_2
|
||||
|
||||
End Sub
|
||||
Sub Lock_RecordControls(state As Boolean)
|
||||
For Each Control As System.Windows.Forms.Control In pnlDetails.Controls
|
||||
If (Control.GetType() Is GetType(TextBox)) Then
|
||||
Dim txt As TextBox = CType(Control, TextBox)
|
||||
txt.ReadOnly = state
|
||||
End If
|
||||
If (Control.GetType() Is GetType(System.Windows.Forms.ComboBox)) Then
|
||||
Dim cbobx As System.Windows.Forms.ComboBox = CType(Control, System.Windows.Forms.ComboBox)
|
||||
If state = True Then
|
||||
cbobx.Enabled = False
|
||||
Else
|
||||
cbobx.Enabled = True
|
||||
End If
|
||||
End If
|
||||
If (Control.GetType() Is GetType(DevExpress.XtraEditors.DateEdit)) Then
|
||||
Dim dtp As DevExpress.XtraEditors.DateEdit = CType(Control, DevExpress.XtraEditors.DateEdit)
|
||||
If state = True Then
|
||||
dtp.Enabled = False
|
||||
Else
|
||||
dtp.Enabled = True
|
||||
End If
|
||||
Lock_Record_Controls_Recursive(state, pnlDetails.Controls)
|
||||
End Sub
|
||||
|
||||
End If
|
||||
If (Control.GetType() Is GetType(DevExpress.XtraEditors.CheckedListBoxControl)) Then
|
||||
Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If state = True Then
|
||||
chlb.Enabled = False
|
||||
Else
|
||||
chlb.Enabled = True
|
||||
End If
|
||||
Sub Lock_Record_Controls_Recursive(state As Boolean, controls As System.Windows.Forms.Control.ControlCollection)
|
||||
For Each Control As System.Windows.Forms.Control In controls
|
||||
|
||||
End If
|
||||
If (Control.GetType() Is GetType(Button)) Then
|
||||
Dim btn As Button = CType(Control, Button)
|
||||
If state = True Then
|
||||
btn.Enabled = False
|
||||
Else
|
||||
btn.Enabled = True
|
||||
End If
|
||||
End If
|
||||
Select Case Control.GetType()
|
||||
Case GetType(Windows.Forms.GroupBox)
|
||||
Lock_Record_Controls_Recursive(state, DirectCast(Control, GroupBox).Controls)
|
||||
|
||||
Case GetType(Windows.Forms.TextBox)
|
||||
Dim txt As TextBox = CType(Control, TextBox)
|
||||
txt.ReadOnly = state
|
||||
|
||||
Case GetType(Windows.Forms.CheckBox)
|
||||
Dim chk As CheckBox = CType(Control, CheckBox)
|
||||
If state = True Then
|
||||
chk.Enabled = False
|
||||
Else
|
||||
chk.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(Windows.Forms.RadioButton)
|
||||
Dim rb As RadioButton = CType(Control, RadioButton)
|
||||
If state = True Then
|
||||
rb.Enabled = False
|
||||
Else
|
||||
rb.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(Windows.Forms.ComboBox)
|
||||
Dim cbobx As System.Windows.Forms.ComboBox = CType(Control, System.Windows.Forms.ComboBox)
|
||||
If state = True Then
|
||||
cbobx.Enabled = False
|
||||
Else
|
||||
cbobx.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.DateEdit)
|
||||
Dim dtp As DevExpress.XtraEditors.DateEdit = CType(Control, DevExpress.XtraEditors.DateEdit)
|
||||
If state = True Then
|
||||
dtp.Enabled = False
|
||||
Else
|
||||
dtp.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If state = True Then
|
||||
chlb.Enabled = False
|
||||
Else
|
||||
chlb.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.ListBoxControl)
|
||||
Dim lb As DevExpress.XtraEditors.ListBoxControl = CType(Control, DevExpress.XtraEditors.ListBoxControl)
|
||||
If state = True Then
|
||||
lb.Enabled = False
|
||||
Else
|
||||
lb.Enabled = True
|
||||
End If
|
||||
|
||||
Case GetType(Windows.Forms.Button)
|
||||
Dim btn As Button = CType(Control, Button)
|
||||
If state = True Then
|
||||
btn.Enabled = False
|
||||
Else
|
||||
btn.Enabled = True
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Check_Record_Changed()
|
||||
If EDIT_STATE <> EditState.None Then
|
||||
Update_Status_Label(False, "")
|
||||
@ -2034,7 +2069,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
If TCDetails.SelectedTabPage.Text.StartsWith("Detail") Or TCDetails.SelectedTabPage.Text.StartsWith("Kopf") Then
|
||||
'Daten zu Record in jedem Fall laden
|
||||
'ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
End If
|
||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Then
|
||||
tsButtonEditMode.Enabled = False
|
||||
|
||||
@ -409,7 +409,7 @@ Public Class frmFormInput
|
||||
' SelectedFormID = RowView.Item(1)
|
||||
RefreshRecordByID(SelectedRecordID)
|
||||
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, thisformid, pnlView.Controls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_PARENTID, thisformid, pnlView.Controls)
|
||||
End If
|
||||
load_Documents()
|
||||
End If
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user