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

@@ -2,7 +2,7 @@
'Public Shared Function InsertFunction(ControlId As Integer)
' Try
' Dim SQL As String = "INSERT INTO TBPMO_FUNCTION_ADD_APPOINTMENT(CONTROL_ID) VALUES (" & ControlId & ")"
' ClassDatabase.Execute_non_Query(SQL)
' MYDB_ECM.ExecuteNonQuery(Sql)
' Return True
' Catch ex As Exception
' MsgBox("Fehler beim Anlegen der KalenderFunktion:" & vbNewLine & ex.Message)
@@ -13,7 +13,7 @@
Public Shared Function InsertFunction(ControlId As Integer, Method As String)
Try
Dim SQL As String = "INSERT INTO TBPMO_FUNCTION_GENERAL (CONTROL_ID, METHOD) VALUES (" & ControlId & ", '" & Method & "')"
ClassDatabase.Execute_non_Query(SQL)
MYDB_ECM.ExecuteNonQuery(Sql)
Return True
Catch ex As Exception
MsgBox("Fehler beim Anlegen der Funktion " & Method & ":" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
@@ -23,7 +23,7 @@
Public Shared Function UpdateAddAppointmentFunction(ControlId As Integer, FromDateId As Integer, ToDateId As Integer, SubjectString As String, Subject2String As String, PlaceString As String, DescriptionString As String)
Try
Dim SQL As String = "UPDATE TBPMO_FUNCTION_GENERAL SET INTEGER1 = " & FromDateId & ", INTEGER2 = " & ToDateId & ", STRING1 = '" & SubjectString & "', STRING2 = '" & Subject2String & "', STRING3 = '" & PlaceString & "', STRING4 = '" & DescriptionString & "' WHERE CONTROL_ID = " & ControlId
If ClassDatabase.Execute_non_Query(SQL) = False Then
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
Throw New Exception("Datenbankfehler.")
End If
Return True
@@ -36,7 +36,7 @@
Public Shared Function UpdateAddFormDataFunction(ControlId As Integer, FormId As Integer, ScreenId As Integer)
Try
Dim SQL As String = "UPDATE TBPMO_FUNCTION_GENERAL SET INTEGER1 = " & FormId & ", INTEGER2 = " & ScreenId & " WHERE CONTROL_ID = " & ControlId
If ClassDatabase.Execute_non_Query(SQL) = False Then
If MYDB_ECM.ExecuteNonQuery(Sql) = False Then
Throw New Exception("Datenbankfehler.")
End If
Return True
@@ -49,7 +49,7 @@
Public Shared Function LoadFunction(ControlId As Integer) As DataRow
Try
Dim SQL As String = "SELECT * FROM TBPMO_FUNCTION_GENERAL WHERE CONTROL_ID = " & ControlId
Dim dt As DataTable = ClassDatabase.Return_Datatable(SQL)
Dim dt As DataTable = MYDB_ECM.GetDatatable(SQL)
If dt.Rows.Count = 1 Then
Return dt.Rows.Item(0)
@@ -65,7 +65,7 @@
Public Shared Function GETCONTROL_ID_FOR_COL_NAME(FORM_ID As Integer, Column_Name As String)
Try
Dim SQL As String = "SELECT GUID FROM TBPMO_CONTROL WHERE FORM_ID = " & FORM_ID & " AND COL_NAME = '" & Column_Name & "'"
Dim result = ClassDatabase.Execute_Scalar(SQL, True)
Dim result = MYDB_ECM.GetScalarValue(SQL)
Return result
Catch ex As Exception
MsgBox("Error in GETCONTROL_ID_FOR_COL_NAME:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)