73 lines
2.6 KiB
VB.net
73 lines
2.6 KiB
VB.net
Imports DevExpress.XtraLayout
|
|
Imports DigitalData.GUIs.ClientSuite.Controls
|
|
|
|
Public Class frmWorkflowStep
|
|
Private _ControlLoader As ControlLoader
|
|
Private _ControlData As ControlData
|
|
|
|
Private _FormId As Int64
|
|
Private _RequestId As Int64
|
|
Private _ProcessName As String
|
|
Private _RequestName As String
|
|
|
|
Private _HeaderGroup As LayoutControlGroup
|
|
Private _BodyGroup As LayoutControlGroup
|
|
|
|
Public Sub New(RequestId As Int64)
|
|
' Dieser Aufruf ist für den Designer erforderlich.
|
|
InitializeComponent()
|
|
|
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
|
_RequestId = RequestId
|
|
End Sub
|
|
|
|
Private Async Function GetRequestData(RequestId) As Task
|
|
Await My.Channel.CreateDatabaseRequestAsync("Get Request Data", True)
|
|
Dim oSQL = $"SELECT RECORD_ID,PROCESS_NAME, REQUESTTITLE, FORM_ID FROM VWIDB_PROCESS_REQUEST WHERE REQUESTID = {RequestId}"
|
|
If My.Application.Service.Online = False Then
|
|
|
|
End If
|
|
Dim oResult = Await My.Channel.ReturnDatatableAsync(oSQL)
|
|
|
|
If Not oResult.OK Then
|
|
Throw New ApplicationException("Request data could not be fetched!")
|
|
ShowErrorMessage(oResult.ErrorMessage)
|
|
End If
|
|
|
|
My.Channel.CloseDatabaseRequest()
|
|
|
|
Dim oRows = oResult.Table.Rows
|
|
|
|
If oRows.Count = 1 Then
|
|
_FormId = oRows.Item(0).Item("FORM_ID")
|
|
_ProcessName = oRows.Item(0).Item("PROCESS_NAME")
|
|
_RequestName = oRows.Item(0).Item("TITLE")
|
|
Else
|
|
Throw New ApplicationException("Request data could not be fetched!")
|
|
End If
|
|
End Function
|
|
|
|
|
|
Private Async Sub frmWorkflowStep_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Await GetRequestData(_RequestId)
|
|
|
|
Dim oControlTable = Await My.Common.Views.VWIDB_FORM_CONTROL(_FormId)
|
|
Dim oControlData = Await My.Common.Views.VWIDB_WF_REQUESTCONTROLDATA(_FormId, _RequestId)
|
|
|
|
_HeaderGroup = LayoutControlGroupMain.AddGroup("Request Header")
|
|
_BodyGroup = LayoutControlGroupMain.AddGroup("Control Body")
|
|
|
|
_ControlLoader = New ControlLoader(My.LogConfig, _BodyGroup)
|
|
_ControlData = New ControlData(My.LogConfig)
|
|
|
|
LayoutControl1.BeginUpdate()
|
|
|
|
_ControlLoader.LoadControls(oControlTable)
|
|
_ControlData.LoadControlData(_ControlLoader.LayoutControls, oControlData)
|
|
|
|
LayoutControl1.EndUpdate()
|
|
|
|
_ControlLoader.AddControl("Process Name", _ProcessName, _HeaderGroup)
|
|
_ControlLoader.AddControl("Request Name", _RequestName, _HeaderGroup)
|
|
End Sub
|
|
End Class |