This commit is contained in:
JenneJ
2015-12-01 15:34:19 +01:00
parent 2720196564
commit 6580796ef6
4 changed files with 101 additions and 67 deletions

View File

@@ -330,7 +330,7 @@ Public Class ClassControlCommandsUI
InsertAllControls(FormID, RecordID, DirectCast(ctrl, GroupBox).Controls)
End If
Else
InsertControlValue(ctrl.Name, FormID, RecordID, CONTROL_VALUE)
InsertControlValue(ctrl.Name, RecordID, CONTROL_VALUE)
End If
Next
End Sub
@@ -466,7 +466,7 @@ Public Class ClassControlCommandsUI
UpdateAllControls(FormID, RecordID, ctrls)
End If
Else
InsertControlValue(ctrl.Name, FormID, RecordID, CONTROL_VALUE)
InsertControlValue(ctrl.Name, RecordID, CONTROL_VALUE)
End If
Else ' Control Updaten
CONTROL_VALUE = GetControlValue(ctrl)
@@ -574,9 +574,8 @@ Public Class ClassControlCommandsUI
End Select
End Function
Function InsertControlValue(ControlName As String, FormID As Integer, RecordID As Integer, Value As String)
Public Shared Function InsertControlValue(ControlID As String, RecordID As Integer, Value As String)
Try
Dim ControlID = GetControlID_for_Name(ControlName, FormID)
Dim AddedWho = Environment.UserName
Dim FORMAT_TYPE As String = ClassDatabase.Execute_Scalar("SELECT FORMAT_TYPE FROM TBPMO_CONTROL WHERE GUID = " & ControlID)
Try
@@ -595,7 +594,7 @@ Public Class ClassControlCommandsUI
Catch ex As Exception
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)
Catch ex As Exception