MS_02062016_2

This commit is contained in:
SchreiberM
2016-06-02 15:42:01 +02:00
parent f60d30572c
commit 5c1b1dbc67
10 changed files with 53 additions and 35 deletions

View File

@@ -411,6 +411,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)
@@ -710,7 +724,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 = ""