jj 18.05
This commit is contained in:
@@ -493,6 +493,10 @@ Public Class ClassControlCommandsUI
|
||||
|
||||
Private Sub UpdateAllControls(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
Dim sw As New SW("UpdateAllControls")
|
||||
|
||||
Dim VALUE_EXISTS_DT As DataTable = ClassDatabase.Return_Datatable(String.Format("SELECT RECORD_ID, CONTROL_ID FROM VWPMO_VALUES WHERE RECORD_ID = {0}", RecordID))
|
||||
|
||||
For Each ctrl As Control In controls
|
||||
Console.WriteLine("Updating Control " + ctrl.Name)
|
||||
|
||||
@@ -524,9 +528,15 @@ Public Class ClassControlCommandsUI
|
||||
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))
|
||||
Dim ValueExists = VALUE_EXISTS_DT.Select(String.Format("CONTROL_ID = {0}", CONTROL_ID))
|
||||
Dim ValueChanged As Boolean = CtrlBuilder.ControlsChanged.Contains(CONTROL_ID)
|
||||
|
||||
If IsNothing(ValueExists) Then ' Neues Control
|
||||
If Not ValueChanged Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If ValueExists.Length = 0 Then ' Neues Control
|
||||
'If CONTROL_ID = 995 Or CONTROL_ID = 996 Or CONTROL_ID = 997 Or CONTROL_ID = 810 Then
|
||||
' Console.WriteLine("sdasd")
|
||||
'End If
|
||||
@@ -540,10 +550,14 @@ Public Class ClassControlCommandsUI
|
||||
End If
|
||||
Else ' Update Control
|
||||
If Not IsNothing(CONTROL_VALUE) Then
|
||||
Dim sw2 As New SW("UpdateControlValue")
|
||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
sw2.Done()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
sw.Done()
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in UpdateAllControls: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user