Prepare Loading Control Properties in Property Grid, Preload Controls with Data in Workflow Form
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmWorkflowStep
|
||||
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||
Inherits BaseRibbonForm
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
@@ -17,7 +17,7 @@ Partial Class frmWorkflowStep
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
@@ -25,10 +25,10 @@ Partial Class frmWorkflowStep
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl()
|
||||
Me.LayoutControlGroup1 = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||
Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup()
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl
|
||||
@@ -65,18 +65,19 @@ Partial Class frmWorkflowStep
|
||||
Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LayoutControl1.Location = New System.Drawing.Point(0, 146)
|
||||
Me.LayoutControl1.Name = "LayoutControl1"
|
||||
Me.LayoutControl1.Root = Me.LayoutControlGroup1
|
||||
Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(1039, 241, 650, 400)
|
||||
Me.LayoutControl1.Root = Me.LayoutControlGroupMain
|
||||
Me.LayoutControl1.Size = New System.Drawing.Size(991, 348)
|
||||
Me.LayoutControl1.TabIndex = 2
|
||||
Me.LayoutControl1.Text = "LayoutControl1"
|
||||
'
|
||||
'LayoutControlGroup1
|
||||
'LayoutControlGroupMain
|
||||
'
|
||||
Me.LayoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.LayoutControlGroup1.GroupBordersVisible = False
|
||||
Me.LayoutControlGroup1.Name = "LayoutControlGroup1"
|
||||
Me.LayoutControlGroup1.Size = New System.Drawing.Size(991, 348)
|
||||
Me.LayoutControlGroup1.TextVisible = False
|
||||
Me.LayoutControlGroupMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
|
||||
Me.LayoutControlGroupMain.GroupBordersVisible = False
|
||||
Me.LayoutControlGroupMain.Name = "Root"
|
||||
Me.LayoutControlGroupMain.Size = New System.Drawing.Size(991, 348)
|
||||
Me.LayoutControlGroupMain.TextVisible = False
|
||||
'
|
||||
'frmWorkflowStep
|
||||
'
|
||||
@@ -92,7 +93,7 @@ Partial Class frmWorkflowStep
|
||||
Me.Text = "frmWorkflowStep"
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlGroup1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -103,6 +104,5 @@ Partial Class frmWorkflowStep
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl
|
||||
Friend WithEvents LayoutControlGroup1 As DevExpress.XtraLayout.LayoutControlGroup
|
||||
|
||||
Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup
|
||||
End Class
|
||||
|
||||
@@ -1,3 +1,66 @@
|
||||
Public Class frmWorkflowStep
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.GUIs.ClientSuite
|
||||
|
||||
Public Class frmWorkflowStep
|
||||
Private _ControlLoader As ClassControlLoader
|
||||
Private _ControlData As ClassControlData
|
||||
|
||||
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 oResult = Await My.Channel.ReturnDatatableAsync($"SELECT PROCESS_NAME, TITLE, FORM_ID FROM VWICM_WF_REQUEST WHERE RECORD_ID = {RequestId}")
|
||||
|
||||
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.VWICM_FORM_CONTROL(_FormId)
|
||||
Dim oControlData = Await My.Common.Views.VWICM_WF_REQUESTCONTROLDATA(_FormId, _RequestId)
|
||||
|
||||
_HeaderGroup = LayoutControlGroupMain.AddGroup("Request Header")
|
||||
_BodyGroup = LayoutControlGroupMain.AddGroup("Control Body")
|
||||
|
||||
_ControlLoader = New ClassControlLoader(My.LogConfig, _BodyGroup)
|
||||
_ControlData = New ClassControlData(My.LogConfig)
|
||||
|
||||
_ControlLoader.LoadControls(oControlTable)
|
||||
_ControlData.LoadControlData(_ControlLoader.LayoutControls, oControlData)
|
||||
|
||||
_ControlLoader.AddControl("Process Name", _ProcessName, _HeaderGroup)
|
||||
_ControlLoader.AddControl("Request Name", _RequestName, _HeaderGroup)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user