rename Workflow to ModuleWorkflow

This commit is contained in:
Jonathan Jenne
2019-07-04 16:09:34 +02:00
parent eacf8e2743
commit 11f092e577
15 changed files with 36 additions and 23 deletions

View File

@@ -0,0 +1,40 @@
Imports DevExpress.XtraNavBar
Public Class NavControlOverview
Private _DataSource As List(Of WorkflowItem)
Public Property DataSource As List(Of WorkflowItem)
Get
Return _DataSource
End Get
Set(value As List(Of WorkflowItem))
_DataSource = value
'TODO: Update Navbar Items
If Not IsNothing(value) Then
UpdateItems(value)
End If
End Set
End Property
Private Sub UpdateItems(WorkflowItems As List(Of WorkflowItem))
Dim oTotalItems = WorkflowItems.Count
Dim oGroupedItems = WorkflowItems.GroupBy(Function(Item As WorkflowItem)
Return Item.Process
End Function)
AddItem("Alle Workflows", oTotalItems)
For Each oGroupedItem As IGrouping(Of String, WorkflowItem) In oGroupedItems
AddItem(oGroupedItem.Key, oGroupedItem.Count)
Next
End Sub
Private Sub AddItem(Title As String, Count As Integer)
Dim oItem = New NavBarItem() With {
.Caption = $"{Title} ({Count})"
}
NavBarControl.Groups.First().ItemLinks.Add(oItem)
End Sub
End Class