MS22062016
This commit is contained in:
@@ -296,54 +296,16 @@ Public Class frmEntities
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Dim CurrentID = GetCurrentGUID()
|
||||
Dim delete As String = "DELETE FROM TBPMO_FORM_SQL WHERE FORM_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_FORM_SQL_CONSTRUCT WHERE FORM_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_WORKFLOW_ENTITY_STATE WHERE ENTITY_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_TEMPLATE_ENTITY WHERE ENTITY_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_FORM_CONSTRUCTOR_DETAIL WHERE FORM_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
' Delete controls (and control screens and control values)
|
||||
If ClassFormCommands.DeleteFormControls(CurrentID) = True Then
|
||||
' Delete form view
|
||||
If ClassFormCommands.DeleteFormView(CurrentID) = True Then
|
||||
delete = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID in (SELECT GUID FROM TBPMO_RECORD WHERE FORM_ID = " & CurrentID & ")"
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD2_ID in (SELECT GUID FROM TBPMO_RECORD WHERE FORM_ID = " & CurrentID & ")"
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_RECORD_LOG WHERE RECORD_ID in (SELECT GUID FROM TBPMO_RECORD WHERE FORM_ID = " & CurrentID & ")"
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
delete = "DELETE FROM TBPMO_RECORD WHERE FORM_ID = " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(delete, True) = True Then
|
||||
' Delete the actual form
|
||||
Me.TBPMO_FORMTableAdapter.Delete(CurrentID)
|
||||
MsgBox("Das Formular/Die Entität wurde erfolgreich gelöscht!", MsgBoxStyle.Information)
|
||||
Load_TreeView()
|
||||
Load_Forms(999999999)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Dim sql = "EXEC PRPMO_DELETE_ENTITY " & CurrentID
|
||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
MsgBox("Entity was deleted!", MsgBoxStyle.Information)
|
||||
Load_TreeView()
|
||||
Load_Forms(999999999)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Formular konnte nicht gelöscht werden:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
MsgBox("Unexpected Error in Delete Entity:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user