10.01.2016

This commit is contained in:
SchreiberM
2017-01-11 10:53:58 +01:00
parent 26812ffeb7
commit 03ae19ae3e
25 changed files with 666 additions and 390 deletions

View File

@@ -38,11 +38,11 @@
If result = MsgBoxResult.Yes Then
Dim val = txtNewValue.Text
Dim SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL WHERE COL_NAME = '{0}' AND FORM_ID = {1}", cmbColumn.Text, CURRENT_ENTITY_ID)
Dim control_Id = ClassDatabase.Execute_Scalar(SQL)
Dim control_Id = ClassDatabase.Execute_Scalar(SQL, True)
If Not IsNothing(control_Id) Then
If control_Id > 0 Then
SQL = String.Format("SELECT CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = {0}", control_Id)
Dim control_type_ID = ClassDatabase.Execute_Scalar(SQL)
Dim control_type_ID = ClassDatabase.Execute_Scalar(SQL, True)
If control_type_ID = 4 Then
Try
@@ -66,6 +66,7 @@
For Each Record As String In MASS_RECORD_IDs2CHANGE
Dim del = String.Format("DELETE FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", control_Id, CInt(Record))
ClassDatabase.Execute_non_Query(del, False)
ClassProxy.PRPROXY_CONTROL_DEL(CInt(Record), CURRENT_ENTITY_ID, control_Id)
Next
End If
@@ -74,18 +75,22 @@
Dim err As Boolean = False
For Each Record As String In MASS_RECORD_IDs2CHANGE
SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", control_Id, CInt(Record))
Dim ex_GUID = ClassDatabase.Execute_Scalar(SQL)
Dim ex_GUID = ClassDatabase.Execute_Scalar(SQL, True)
If Not IsNothing(ex_GUID) Then
SQL = String.Format("UPDATE TBPMO_CONTROL_VALUE SET VALUE = '{0}',CHANGED_WHO = '{1}' WHERE GUID = {2}", val, USER_USERNAME, ex_GUID)
If ClassDatabase.Execute_non_Query(SQL, False) = False Then
MsgBox("Error in updating the value for Record: " & Record & vbNewLine & "Please check the logfile.", MsgBoxStyle.Exclamation)
Else
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, control_Id, CInt(Record), val)
End If
Else
SQL = String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES ({0},{1},'{2}','{3}')", control_Id, CInt(Record), val, USER_USERNAME)
If ClassDatabase.Execute_non_Query(SQL, False) = False Then
MsgBox("Error in inserting the value for Record: " & Record & vbNewLine & "Please check the logfile.", MsgBoxStyle.Exclamation)
Else
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, control_Id, CInt(Record), val)
End If
End If
Next