This commit is contained in:
JenneJ
2016-06-02 15:48:10 +02:00
10 changed files with 67 additions and 46 deletions

View File

@@ -412,6 +412,20 @@ Public Class ClassControlValues
Dim connID = row.Item("CONTROL_CONNID_1")
Dim sqlcommand As String = row.Item("SQL")
If ParentRecordId = 0 And CURRENT_ACT_LEVEL > 1 Then
'eigentlich sollte eine Parent_RecordID da sein
Try
Dim _SQL = String.Format("SELECT RECORD1_ID FROM TBPMO_RECORD_CONNECT WHERE RECORD2_ID = {0}", RecordId)
Dim ParentRec = ClassDatabase.Execute_Scalar(_SQL)
If Not IsNothing(ParentRec) Then
If ParentRec > 0 Then
ParentRecordId = ParentRec
End If
End If
Catch ex As Exception
ClassLogger.Add("Unexpected Error in Getting Parent-Record cause PRecord was 0: " & ex.Message)
End Try
End If
sqlcommand = ReplaceSqlCommandPlaceholders(sqlcommand, RecordId, ParentRecordId, entity_ID)
@@ -543,7 +557,7 @@ Public Class ClassControlValues
End Try
End Select
End If
Next
@@ -757,7 +771,7 @@ Public Class ClassControlValues
vorgabe = defaultValue.Replace("@FORM_ID", CURRENT_FORM_ID)
vorgabe = vorgabe.Replace("@RECORD_ID", CURRENT_RECORD_ID)
vorgabe = vorgabe.Replace("@RECORDID", CURRENT_RECORD_ID)
vorgabe = vorgabe.Replace("@PARENTRECORD_ID", CURRENT_PARENT_ID)
vorgabe = vorgabe.Replace("@PARENTRECORD_ID", CURRENT_PARENT_ENTITY_ID)
defaultValue = ClassDatabase.Execute_Scalar(vorgabe.ToString, True)
If IsNothing(vorgabe) Then
textbox.Text = ""