123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using Comal.Classes;
- using InABox.DynamicGrid;
- using InABox.Wpf;
- using PRSDesktop.Components.Spreadsheet;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using InABox.Core;
- namespace PRSDesktop;
- public static class AccountsSetupActions
- {
- public static void Standard(IPanelHost host)
- {
- host.CreateSetupActionIfCanView<ContactType>("Contact Types", PRSDesktop.Resources.contacttype, (action) =>
- {
- var list = new MasterList(typeof(ContactType));
- list.ShowDialog();
- });
- host.CreateSetupActionIfCanView<TaxCode>("Tax Codes", PRSDesktop.Resources.taxcode, (action) =>
- {
- var list = new MasterList(typeof(TaxCode));
- list.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<ReceiptType>("Receipt Types", PRSDesktop.Resources.receipt, (action) =>
- {
- var list = new MasterList(typeof(ReceiptType));
- list.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<PaymentType>("Payment Types", PRSDesktop.Resources.payment, (action) =>
- {
- var list = new MasterList(typeof(PaymentTerms));
- list.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<PaymentTerms>("Payment Terms", PRSDesktop.Resources.assignments, (action) =>
- {
- var list = new MasterList(typeof(PaymentTerms));
- list.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<CostCentre>("Cost Centres", PRSDesktop.Resources.costcentre, (action) =>
- {
- var list = new MasterList(typeof(CostCentre));
- list.ShowDialog();
- });
- host.CreateSetupActionIfCanView<GLCode>("GL Codes", PRSDesktop.Resources.glcode, (action) =>
- {
- var list = new MasterList(typeof(GLCode));
- list.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<Locality>("Post Codes", PRSDesktop.Resources.map, (action) =>
- {
- var form = new PostCodeWindow();
- form.ShowDialog();
- });
-
- host.CreateSetupActionIfCanView<ForeignCurrency>("Foreign Currencies", PRSDesktop.Resources.payment, (action) =>
- {
- var list = new MasterList(typeof(ForeignCurrency));
- list.ShowDialog();
- });
- }
-
- public static void PurchaseOrderCategories(IPanelHost host)
- {
- host.CreateSetupActionIfCanView<PurchaseOrderCategory>("Purchase Order Categories", PRSDesktop.Resources.service, (action) =>
- {
- var list = new MasterList(typeof(PurchaseOrderCategory));
- list.ShowDialog();
- });
- }
- public static void CustomerSpreadsheetTemplates(IPanelHost host)
- {
- host.CreateSetupActionIfCanView<CustomerSpreadsheet>("Customer Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
- {
- SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Customer>();
- });
- }
- public static void SupplierSpreadsheetTemplates(IPanelHost host)
- {
- host.CreateSetupActionIfCanView<SupplierSpreadsheet>("Supplier Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
- {
- SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Supplier>();
- });
- }
- }
|