This commit is contained in:
SchreiberM
2016-04-08 14:55:25 +02:00
parent d1eb7ecb5b
commit ef2a87d849
47 changed files with 12718 additions and 9964 deletions

View File

@@ -2,22 +2,25 @@
Public Class _BaseControl
Public Shared Function ReplaceSqlCommandPlaceholders(sqlCommand As String, recordId As Integer, parentRecordId As Integer)
sqlCommand = sqlCommand.Replace("@RECORD_ID", recordId)
sqlCommand = sqlCommand.Replace("@RECORDID", recordId)
sqlCommand = sqlCommand.Replace("@PARENTRECORD_ID", parentRecordId)
sqlCommand = sqlCommand.Replace("@PARENTRECORDID", parentRecordId)
'Public Shared Function ReplaceSqlCommandPlaceholders(sqlCommand As String, recordId As Integer, parentRecordId As Integer, entity_ID As Integer)
' sqlCommand = sqlCommand.Replace("@RECORD_ID", recordId)
' sqlCommand = sqlCommand.Replace("@RECORDID", recordId)
' Dim sql As String = "SELECT FORM_ID FROM TBPMO_RECORD WHERE FORM_ID = "
' ss()
' sqlCommand = sqlCommand.Replace("@ENTITY_ID", recordId)
' sqlCommand = sqlCommand.Replace("@PARENTRECORD_ID", parentRecordId)
' sqlCommand = sqlCommand.Replace("@PARENTRECORDID", parentRecordId)
Return sqlCommand
End Function
' Return sqlCommand
'End Function
Public Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer)
Public Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer, entity_ID As Integer)
Try
Dim AutoValue As String = String.Empty
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
Dim CONNID = ClassDatabase.Execute_Scalar(String.Format("SELECT CONNECTION_ID_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
SQL = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId)
SQL = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId, entity_ID)
If SQL = "" Or IsDBNull(SQL) Then
Return Nothing
@@ -39,7 +42,7 @@
ClassLogger.Add("Unexpected Error in LoadAutoValue: " & ex.Message, True)
Return Nothing
End Try
End Function
@@ -191,9 +194,9 @@
Public Class Label : Inherits _BaseControl
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String, Optional VARIABLE_VALUE As Boolean = False)
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
Try
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId)
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
If IsNothing(autoValue) Then
If VARIABLE_VALUE = True Then
@@ -208,7 +211,7 @@
control.Text = labelText
End If
End If
Else
control.Text = autoValue
@@ -256,9 +259,9 @@
Public Class TextBox : Inherits _BaseControl
Public Shared Sub LoadValue(control As Windows.Forms.TextBox, recordId As Integer, parentRecordId As Integer, value As String, Optional VARIABLE_VALUE As Boolean = False)
Public Shared Sub LoadValue(control As Windows.Forms.TextBox, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
Try
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId)
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
If VARIABLE_VALUE = True Then
control.Text = value
Else