|
@@ -16,6 +16,7 @@ using InABox.WPF;
|
|
|
using Microsoft.Office.Interop.Outlook;
|
|
|
using System.ComponentModel;
|
|
|
using Selection = InABox.Core.Selection;
|
|
|
+using PRSDesktop.Panels.Jobs;
|
|
|
|
|
|
namespace PRSDesktop
|
|
|
{
|
|
@@ -43,6 +44,8 @@ namespace PRSDesktop
|
|
|
Documents,
|
|
|
Stages,
|
|
|
ITPs,
|
|
|
+ ProductMappings,
|
|
|
+ ProductStyles,
|
|
|
BOM,
|
|
|
Requisitions,
|
|
|
Orders,
|
|
@@ -70,6 +73,8 @@ namespace PRSDesktop
|
|
|
private JobDocumentSetPanel? JobDocumentsPage;
|
|
|
private JobStagesPanel? JobPlanningPage;
|
|
|
private JobITPGrid? JobITPPage;
|
|
|
+ private JobProductMappingsGrid? ProductMappingsPage;
|
|
|
+ private JobProductStylesGrid? ProductStylesPage;
|
|
|
private JobBillOfMaterialsPanel? JobBillOfMaterialsPage;
|
|
|
private JobRequisitionPanel? JobRequisitionsPage;
|
|
|
private JobDesignList? JobDesignsPage;
|
|
@@ -209,6 +214,8 @@ namespace PRSDesktop
|
|
|
Documents.Visibility = Security.CanView<JobDocumentSet>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
Stages.Visibility = ClientFactory.IsSupported<JobStage>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
ITPs.Visibility = ClientFactory.IsSupported<JobITP>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ ProductMappings.Visibility = ClientFactory.IsSupported<JobProductMapping>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
+ ProductStyles.Visibility = ClientFactory.IsSupported<JobStyle>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
BOM.Visibility = ClientFactory.IsSupported<JobBillOfMaterials>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
Requisitions.Visibility = ClientFactory.IsSupported<JobRequisition>() ? Visibility.Visible : Visibility.Collapsed;
|
|
|
Orders.Visibility = ClientFactory.IsSupported<PurchaseOrderItem>() ? Visibility.Visible : Visibility.Collapsed;
|
|
@@ -377,9 +384,8 @@ namespace PRSDesktop
|
|
|
var propertyEditor = new DynamicEditorForm(typeof(JobPanelSettings), pages, buttons);
|
|
|
propertyEditor.OnDefineLookups += sender =>
|
|
|
{
|
|
|
- var editor = sender.EditorDefinition as ILookupEditor;
|
|
|
var colname = sender.ColumnName;
|
|
|
- var values = editor.Values(colname, new [] { _settings });
|
|
|
+ var values = sender.LookupEditorDefinition.Values(colname, new [] { _settings });
|
|
|
sender.LoadLookups(values);
|
|
|
};
|
|
|
propertyEditor.OnEditorValueChanged += (sender, name, value) =>
|
|
@@ -417,7 +423,7 @@ namespace PRSDesktop
|
|
|
{
|
|
|
}
|
|
|
|
|
|
- private void Timer_Tick(object sender, EventArgs e)
|
|
|
+ private void Timer_Tick(object? sender, EventArgs e)
|
|
|
{
|
|
|
if (lastselection < DateTime.Now.AddMilliseconds(-500))
|
|
|
{
|
|
@@ -443,6 +449,10 @@ namespace PRSDesktop
|
|
|
break;
|
|
|
case PageIndex.ITPs : RefreshGrid(ITPs, ref JobITPPage, job);
|
|
|
break;
|
|
|
+ case PageIndex.ProductMappings: RefreshGrid(ProductMappings, ref ProductMappingsPage, job);
|
|
|
+ break;
|
|
|
+ case PageIndex.ProductStyles: RefreshGrid(ProductStyles, ref ProductStylesPage, job);
|
|
|
+ break;
|
|
|
case PageIndex.BOM : RefreshPanel(BOM, ref JobBillOfMaterialsPage, job);
|
|
|
break;
|
|
|
case PageIndex.Requisitions : RefreshPanel(Requisitions, ref JobRequisitionsPage, job);
|
|
@@ -496,7 +506,7 @@ namespace PRSDesktop
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void RefreshPanel<T>(TabItem container, ref T panel, Job job) where T : IBasePanel, IJobControl, new()
|
|
|
+ private void RefreshPanel<T>(TabItem container, ref T? panel, Job job) where T : IBasePanel, IJobControl, new()
|
|
|
{
|
|
|
if (panel == null)
|
|
|
{
|