DAtabase integriert

This commit is contained in:
2023-05-22 16:55:44 +02:00
parent 2db575d944
commit c2deb54f11
114 changed files with 8526 additions and 14722 deletions

View File

@@ -46,7 +46,7 @@ Public Class frmMass_Change
ClassHelper.InsertEssential_Log(USER_GUID, "User-ID", String.Format("### Starting MassChange of column '{0}' with value '{1}'....###", cmbColumn.Text, txtNewValue.Text))
Me.Cursor = Cursors.WaitCursor
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, True)
Dim control_Id = MYDB_ECM.GetScalarValue(SQL)
If Not IsNothing(control_Id) Then
_CONTROLID = control_Id
@@ -76,8 +76,8 @@ Public Class frmMass_Change
If _CONTROLID <> 0 Then
SQL = String.Format("SELECT CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = {0}", _CONTROLID)
Dim control_type_ID = ClassDatabase.Execute_Scalar(SQL, True)
If control_type_ID = 4 Then
Dim control_type_ID = MYDB_ECM.GetScalarValue(SQL)
If control_type_ID = 4 Then
Try
val = CDate(val)
Catch ex As Exception
@@ -97,7 +97,7 @@ Public Class frmMass_Change
'result1 = MessageBox.Show(msg, CAPTION_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
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}", _CONTROLID, CInt(Record))
ClassDatabase.Execute_non_Query(del, False)
MYDB_ECM.ExecuteNonQuery(del)
ClassProxy.PRPROXY_CONTROL_DEL(CInt(Record), CURRENT_ENTITY_ID, _CONTROLID)
Next
End If
@@ -111,11 +111,11 @@ Public Class frmMass_Change
End If
If RIGHT_ONLY_READ_RECORD_FILE = False Then
SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", _CONTROLID, CInt(Record))
Dim ex_GUID = ClassDatabase.Execute_Scalar(SQL, True)
If Not IsNothing(ex_GUID) Then
Dim ex_GUID = MYDB_ECM.GetScalarValue(SQL)
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
_Error = True
If MYDB_ECM.ExecuteNonQuery(SQL) = False Then
_Error = True
LOGGER.Warn("Error in updating the value for Record: " & Record)
Else
@@ -123,8 +123,8 @@ Public Class frmMass_Change
End If
Else
SQL = String.Format("INSERT INTO TBPMO_CONTROL_VALUE (CONTROL_ID, RECORD_ID, VALUE, ADDED_WHO) VALUES ({0},{1},'{2}','{3}')", _CONTROLID, CInt(Record), val, USER_USERNAME)
If ClassDatabase.Execute_non_Query(SQL, False) = False Then
_Error = True
If MYDB_ECM.ExecuteNonQuery(SQL) = False Then
_Error = True
LOGGER.Warn("Error in inserting the value for Record: " & Record)
Else
ClassProxy.PRPROXY_CONTROL_VALUE_UPD_INS(CURRENT_ENTITY_ID, _CONTROLID, CInt(Record), val)