Positionsanpassung update/insert
This commit is contained in:
@@ -368,7 +368,7 @@ Public Class ClassControlCommandsUI
|
||||
InsertAllControls(FormID, RecordID, DirectCast(ctrl, GroupBox).Controls)
|
||||
End If
|
||||
Else
|
||||
InsertControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
InsertControlValue(CONTROL_ID, RecordID, CONTROL_VALUE, CURRENT_ENTITY_ID)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -538,13 +538,13 @@ Public Class ClassControlCommandsUI
|
||||
Continue For
|
||||
End If
|
||||
If CONTROL_VALUE <> "" Then
|
||||
InsertControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
InsertControlValue(CONTROL_ID, RecordID, CONTROL_VALUE, CURRENT_ENTITY_ID)
|
||||
End If
|
||||
End If
|
||||
Else ' Update Control
|
||||
If Not IsNothing(CONTROL_VALUE) Then
|
||||
Dim sw2 As New SW("UpdateControlValue")
|
||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE)
|
||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE, CURRENT_ENTITY_ID)
|
||||
sw2.Done()
|
||||
End If
|
||||
End If
|
||||
@@ -817,13 +817,13 @@ Public Class ClassControlCommandsUI
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String)
|
||||
Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String, ENTITY_ID As Integer)
|
||||
Try
|
||||
Dim AddedWho = USER_USERNAME
|
||||
Dim converted_value = Check_and_Format_Value(ControlID, RecordID, Value)
|
||||
If Not IsNothing(converted_value) Then
|
||||
Dim ins As String = String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES ({0}, {1}, '{2}', '{3}')", ControlID, RecordID, converted_value, AddedWho)
|
||||
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, ControlID, RecordID, converted_value)
|
||||
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(ENTITY_ID, ControlID, RecordID, converted_value)
|
||||
Return ClassDatabase.Execute_non_Query(ins)
|
||||
Else
|
||||
Return False
|
||||
@@ -835,16 +835,16 @@ Public Class ClassControlCommandsUI
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function UpdateControlValue(ControlID As Integer, RecordID As Integer, Value As String)
|
||||
Public Shared Function UpdateControlValue(ControlID As Integer, RecordID As Integer, Value As String, ENTITY_ID As Integer)
|
||||
Try
|
||||
Dim CHANGED_WHO = USER_USERNAME
|
||||
Dim converted_value = Check_and_Format_Value(ControlID, RecordID, Value)
|
||||
|
||||
Dim def = "SELECT FORMAT_TYPE,CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
|
||||
Dim upd = String.Format("UPDATE TBPMO_CONTROL_VALUE SET VALUE = '{0}', CHANGED_WHO = '{1}', CHANGE_STEP = {2} WHERE CONTROL_ID = {3} AND RECORD_ID = {4}", _
|
||||
Dim upd = String.Format("UPDATE TBPMO_CONTROL_VALUE SET VALUE = '{0}', CHANGED_WHO = '{1}', CHANGE_STEP = {2} WHERE CONTROL_ID = {3} AND RECORD_ID = {4}",
|
||||
converted_value, CHANGED_WHO, CURRENT_CHANGE_STEP, ControlID, RecordID)
|
||||
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, ControlID, RecordID, converted_value)
|
||||
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(ENTITY_ID, ControlID, RecordID, converted_value)
|
||||
Return ClassDatabase.Execute_non_Query(upd)
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user