1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- using Comal.Classes;
- using InABox.Configuration;
- using InABox.Core;
- using InABox.DynamicGrid;
- using InABox.Wpf;
- namespace PRSDesktop;
- public class ServicePanelSettings : BaseObject, IUserConfigurationSettings, IMasterDetailSettings
- {
- [NullEditor] public DynamicSplitPanelView ViewType { get; set; } = DynamicSplitPanelView.Combined;
-
- [NullEditor]
- public double AnchorWidth { get; set; } = 300;
-
- [NullEditor]
- public Guid MasterID { get; set; }
- }
- public class ServicePanel : MasterDetailPanel<Job,ServiceGrid,ServicePanelSettings>
- {
-
- protected override string MasterCaption => "Service Jobs";
-
- protected override string DetailCaption => "Job Details";
- protected override string MasterColumnsTag => "Service";
- protected override void CreatePages()
- {
- CreatePage<JobDetailPanel<JobDetails>>("Details");
- CreatePage<JobDetailGrid<JobOrderGrid, ConsolidatedPurchaseOrderItem>>(Security.CanView<PurchaseOrderItem>, "Orders");
- CreatePage<JobDetailPanel<JobPickingListPanel>>(Security.CanView<Requisition>, "Picking Lists");
- CreatePage<JobDetailGrid<JobAssignmentGrid, Assignment>>(Security.CanView<Assignment>, "Assignments");
- CreatePage<JobDetailGrid<JobFormGrid, JobForm>>(Security.CanView<JobForm>, "Forms");
- CreatePage<JobDetailPanel<InvoicePanel>>(Security.CanView<Invoice>, "Invoices");
- }
- protected override void AfterLoadSettings(ServicePanelSettings settings)
- {
-
- }
- protected override void BeforeSaveSettings(ServicePanelSettings settings)
- {
- }
- public override void CreateToolbarButtons(IPanelHost host)
- {
- ProjectSetupActions.JobStatuses(host);
- // host.CreateSetupAction(new PanelAction()
- // {
- // Caption = "Job Settings",
- // Image = PRSDesktop.Resources.specifications,
- // OnExecute = action =>
- // {
- // if (DynamicGridUtils.Edit(Settings))
- // SaveSettings();
- // }
- // });
- }
- }
|