MS11.01(2)

This commit is contained in:
SchreiberM
2017-01-12 11:47:43 +01:00
parent 03ae19ae3e
commit 2af5a0bc0d
18 changed files with 59308 additions and 1606 deletions

View File

@@ -73,26 +73,32 @@
End If
Try
Dim err As Boolean = False
Dim RIGHT_ONLY_READ_RECORD = 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, 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)
If SQL_RECORD_READ_ONLY <> "" Then
RIGHT_ONLY_READ_RECORD = ClassHelper.Check_Record_Read_only(CInt(Record), CURRENT_ENTITY_ID)
End If
If RIGHT_ONLY_READ_RECORD = False Then
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, 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
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)
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
End If
Next
SUCCESSFULL = True
msg = "Alle Änderungen wurden ausgeführt!"