| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System;
- using Comal.Classes;
- using InABox.Configuration;
- using InABox.Core;
- using InABox.DynamicGrid;
- using InABox.Wpf;
- namespace PRSDesktop;
- public class QuotePanelSettings : 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 QuotePanel : MasterDetailPanel<Quote,QuoteGrid,QuotePanelSettings>
- {
-
- protected override string MasterCaption => "Service Jobs";
-
- protected override string DetailCaption => "Job Details";
- protected override string MasterColumnsTag => "Service";
- protected override void CreatePages()
- {
- CreatePage<QuoteDetailPanel<QuoteDetails>>("Details");
- CreatePage<QuoteDetailGrid<QuoteDocuments, QuoteDocument>>(Security.CanView<QuoteDocument>, "Documents");
- CreatePage<QuoteDetailGrid<QuoteSpreadsheets, QuoteSpreadsheet>>(Security.CanView<QuoteSpreadsheet>, "Spreadsheets");
- CreatePage<QuoteDetailPanel<QuoteDiagrams>>(Security.CanView<QuoteDiagram>, "Diagrams");
- CreatePage<QuoteDetailGrid<QuoteTakeoffs, QuoteTakeoff>>(Security.CanView<QuoteTakeoff>, "Takeoffs");
- CreatePage<QuoteDetailPanel<QuoteDesigns>>(Security.CanView<QuoteDesign>, "Designs");
- CreatePage<QuoteDetailPanel<QuoteCostSheets>>(Security.CanView<QuoteCostSheet>, "Cost Sheets");
- CreatePage<QuoteDetailPanel<QuoteProposals>>(Security.CanView<QuoteProposal>, "Proposals");
- CreatePage<QuoteDetailPanel<QuoteContracts>>(Security.CanView<QuoteContract>, "Contracts");
- }
- protected override void AfterLoadSettings(QuotePanelSettings settings)
- {
-
- }
- protected override void BeforeSaveSettings(QuotePanelSettings settings)
- {
-
- }
- public override string SectionName => "Quotes";
-
- public override void CreateToolbarButtons(IPanelHost host)
- {
- QuoteSetupActions.Standard(host);
- // host.CreateSetupAction(new PanelAction()
- // {
- // Caption = "Job Settings",
- // Image = PRSDesktop.Resources.specifications,
- // OnExecute = action =>
- // {
- // if (DynamicGridUtils.Edit(Settings))
- // SaveSettings();
- // }
- // });
- }
- }
|