DAtabase integriert
This commit is contained in:
@@ -136,7 +136,7 @@ Module ModuleHelperMethods
|
||||
Public Function GetControlID_for_Name(name As String, formid As Integer) As Integer
|
||||
Try
|
||||
Dim SQL = "SELECT GUID FROM TBPMO_CONTROL WHERE FORM_ID = " & formid & " and NAME = '" & name & "'"
|
||||
Dim ID As Integer = ClassDatabase.Execute_Scalar(SQL)
|
||||
Dim ID As Integer = MYDB_ECM.GetScalarValue(SQL)
|
||||
If ID > 0 Then
|
||||
Return ID
|
||||
Else
|
||||
@@ -150,7 +150,7 @@ Module ModuleHelperMethods
|
||||
Public Function GetControlID_for_RecordID(name As String, recID As Integer) As Integer
|
||||
Try
|
||||
Dim SQL = "SELECT CONTROL_ID FROM VWPMO_VALUES WHERE RECORD_ID = " & recID & " and CONTROL_NAME = '" & name & "'"
|
||||
Dim ID As Integer = ClassDatabase.Execute_Scalar(SQL, True)
|
||||
Dim ID As Integer = MYDB_ECM.GetScalarValue(SQL)
|
||||
If ID > 0 Then
|
||||
Return ID
|
||||
Else
|
||||
@@ -171,7 +171,7 @@ Module ModuleHelperMethods
|
||||
Public Function Get_Name_for_ControlID(Id As Integer, formid As Integer) As String
|
||||
Try
|
||||
Dim SQL = "SELECT NAME FROM TBPMO_CONTROL WHERE FORM_ID = " & formid & " AND GUID = " & Id
|
||||
Dim Name = ClassDatabase.Execute_Scalar(SQL)
|
||||
Dim Name = MYDB_ECM.GetScalarValue(SQL)
|
||||
|
||||
Return Name
|
||||
Catch ex As Exception
|
||||
@@ -522,10 +522,10 @@ Module ModuleHelperMethods
|
||||
|
||||
Try
|
||||
Dim sql = String.Format("SELECT COUNT(*) FROM TBPMO_CONSTRUCTOR_USER_SQL WHERE USER_ID = {0} AND CONSTR_DET_ID = {1} AND SQL_COMMAND IS NOT NULL AND SQL_COMMAND <> ''", USER_GUID, ConstructorDetailID)
|
||||
Dim exists = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim exists = MYDB_ECM.GetScalarValue(SQL)
|
||||
If exists = 1 Then
|
||||
sql = String.Format("SELECT SQL_COMMAND FROM TBPMO_CONSTRUCTOR_USER_SQL WHERE USER_ID = {0} AND CONSTR_DET_ID = {1}", USER_GUID, ConstructorDetailID)
|
||||
Dim result = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim result = MYDB_ECM.GetScalarValue(SQL)
|
||||
If Not IsNothing(result) Then
|
||||
' result = result.ToUpper.Replace("@RECORDID", RECORD_ID)
|
||||
result = result.ToUpper.Replace("@USER_ID", UserGuid)
|
||||
@@ -560,10 +560,10 @@ Module ModuleHelperMethods
|
||||
|
||||
Try
|
||||
Dim sql = String.Format("SELECT COUNT(*) FROM TBPMO_CONSTRUCTOR_USER_SQL WHERE USER_ID = {0} AND CONSTR_DET_ID = {1} AND SQL_COMMAND IS NOT NULL AND SQL_COMMAND <> ''", USER_GUID, ConstructorDetailID)
|
||||
Dim exists = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim exists = MYDB_ECM.GetScalarValue(SQL)
|
||||
If exists = 1 Then
|
||||
sql = String.Format("SELECT SQL_COMMAND FROM TBPMO_CONSTRUCTOR_USER_SQL WHERE USER_ID = {0} AND CONSTR_DET_ID = {1}", USER_GUID, ConstructorDetailID)
|
||||
Dim result = ClassDatabase.Execute_Scalar(sql)
|
||||
Dim result = MYDB_ECM.GetScalarValue(SQL)
|
||||
If Not IsNothing(result) Then
|
||||
' result = result.ToUpper.Replace("@RECORDID", RECORD_ID)
|
||||
result = result.ToUpper.Replace("@USER_ID", UserGuid)
|
||||
|
||||
Reference in New Issue
Block a user