MS_10052016
This commit is contained in:
@@ -274,11 +274,11 @@ Public Class ClassControlBuilder
|
||||
Dim ctrlvalID = ClassDatabase.Execute_Scalar(sqlguid)
|
||||
If Not IsNothing(ctrlvalID) Then
|
||||
Dim upd1 = String.Format("UPDATE TBPMO_CONTROL_VALUE SET VALUE = '{0}' WHERE CONTROL_ID = {1} AND RECORD_ID = {2}", value.ToString, CONTROL_ID, CURRENT_RECORD_ID)
|
||||
' ClassDatabase.Execute_non_Query(upd1)
|
||||
ClassDatabase.Execute_non_Query(upd1)
|
||||
Else
|
||||
If CURRENT_RECORD_ID <> 0 Then
|
||||
Dim ins = String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID,RECORD_ID,VALUE,ADDED_WHO) VALUES ({0},{1},'{2}','{3}')", CONTROL_ID, CURRENT_RECORD_ID, value, Environment.UserName)
|
||||
'If ClassDatabase.Execute_non_Query(ins) = True Then
|
||||
ClassDatabase.Execute_non_Query(ins)
|
||||
End If
|
||||
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> Value was nothing - Inserted the ControlValue '" & ins & "'")
|
||||
@@ -389,6 +389,43 @@ Public Class ClassControlBuilder
|
||||
MsgBox("Error in DependingControls - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub OnDateTimeValueChanged(sender As Object, ByVal e As EventArgs)
|
||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||
|
||||
Try
|
||||
Dim control As Control = DirectCast(sender, Control)
|
||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||
CONTROL_ID = controlId
|
||||
'SQL für abhängige Auswahllisten
|
||||
Dim SQL As String = String.Format("SELECT GUID, SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE SQL_COMMAND_1 LIKE '%@{0}@%'", controlId)
|
||||
Dim value
|
||||
'SQL für enable control
|
||||
Dim SQLenable As String = String.Format("SELECT GUID, SQL_COMMAND_2 FROM TBPMO_CONTROL WHERE SQL_COMMAND_2 LIKE '%@{0}@%'", controlId)
|
||||
|
||||
|
||||
value = DirectCast(control, DevExpress.XtraEditors.DateEdit).DateTime
|
||||
|
||||
If String.IsNullOrEmpty(value) Then
|
||||
Exit Sub
|
||||
End If
|
||||
If CURRENT_RECORD_ID = 0 And CtrlCommandUI.IsInsert = True Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim datatable As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
Dim datatable1 As DataTable = ClassDatabase.Return_Datatable(SQLenable)
|
||||
Depending_Controls(control, datatable, value)
|
||||
Enable_Controls(control, datatable1, value)
|
||||
|
||||
Console.WriteLine("value changed")
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Objektverweis") Or ex.Message.Contains("reference not set") Then
|
||||
|
||||
Else
|
||||
MsgBox("Error in OnComboBoxValueChanged - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub OnComboBoxValueChanged(sender As Object, ByVal e As EventArgs)
|
||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||
|
||||
@@ -431,7 +468,7 @@ Public Class ClassControlBuilder
|
||||
Dim datatable1 As DataTable = ClassDatabase.Return_Datatable(SQLenable)
|
||||
Depending_Controls(control, datatable, value)
|
||||
Enable_Controls(control, datatable1, value)
|
||||
|
||||
|
||||
Console.WriteLine("value changed")
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Objektverweis") Or ex.Message.Contains("reference not set") Then
|
||||
@@ -618,6 +655,7 @@ Public Class ClassControlBuilder
|
||||
Case "DateEdit"
|
||||
Dim datetimepick As DevExpress.XtraEditors.DateEdit = CType(control, DevExpress.XtraEditors.DateEdit)
|
||||
AddHandler datetimepick.DateTimeChanged, AddressOf RecordChanged
|
||||
AddHandler datetimepick.DateTimeChanged, AddressOf OnDateTimeValueChanged
|
||||
AddHandler datetimepick.EnabledChanged, AddressOf OnEnabledChanged
|
||||
|
||||
Case "ListBoxControl"
|
||||
|
||||
Reference in New Issue
Block a user