|
@@ -19,7 +19,9 @@ public partial class JobScopePanel : UserControl, IPanel<JobScope>, IJobControl
|
|
|
ManufacturingPackets,
|
|
|
DeliveryItems,
|
|
|
Assignments,
|
|
|
- Documents
|
|
|
+ Documents,
|
|
|
+ Tasks,
|
|
|
+ Forms,
|
|
|
}
|
|
|
|
|
|
private int _currentPage = -1;
|
|
@@ -27,6 +29,8 @@ public partial class JobScopePanel : UserControl, IPanel<JobScope>, IJobControl
|
|
|
private JobScopeRequisitionItemGrid? _requisitionItemsGrid;
|
|
|
private JobScopeAssignmentGrid? _assignmentGrid;
|
|
|
private JobScopeDocumentGrid? _documentGrid;
|
|
|
+ private JobScopeKanbanGrid? _kanbanGrid;
|
|
|
+ private JobScopeFormGrid? _formGrid;
|
|
|
|
|
|
public JobScopePanel()
|
|
|
{
|
|
@@ -89,6 +93,12 @@ public partial class JobScopePanel : UserControl, IPanel<JobScope>, IJobControl
|
|
|
case PageIndex.Documents:
|
|
|
RefreshGrid(_documents, ref _documentGrid, scope);
|
|
|
break;
|
|
|
+ case PageIndex.Tasks:
|
|
|
+ RefreshGrid(_kanbans, ref _kanbanGrid, scope);
|
|
|
+ break;
|
|
|
+ case PageIndex.Forms:
|
|
|
+ RefreshGrid(_forms, ref _formGrid, scope, () => new JobScopeFormGrid(Job));
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -113,13 +123,17 @@ public partial class JobScopePanel : UserControl, IPanel<JobScope>, IJobControl
|
|
|
{
|
|
|
RefreshPage();
|
|
|
}
|
|
|
-
|
|
|
- private void RefreshGrid<T>(TabItem container, ref T? grid, JobScope? scope) where T : IDynamicGrid, IJobScopeGrid, new()
|
|
|
+
|
|
|
+ private void RefreshGrid<T>(TabItem container, ref T? grid, JobScope? scope) where T : IDynamicGrid, IJobScopeGrid, new() =>
|
|
|
+ RefreshGrid(container, ref grid, scope, () => new T());
|
|
|
+
|
|
|
+ private void RefreshGrid<T>(TabItem container, ref T? grid, JobScope? scope, Func<T> newGrid)
|
|
|
+ where T : IDynamicGrid, IJobScopeGrid
|
|
|
{
|
|
|
var bInitialised = grid != null;
|
|
|
if (!bInitialised)
|
|
|
{
|
|
|
- grid = new T();
|
|
|
+ grid = newGrid();
|
|
|
container.Content = grid;
|
|
|
}
|
|
|
grid.Scope = scope;
|