ProductSetupActions.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Comal.Classes;
  2. using InABox.Core;
  3. using InABox.DynamicGrid;
  4. using PRSDesktop.Components.Spreadsheet;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace PRSDesktop;
  11. public static class ProductSetupActions
  12. {
  13. public static void Standard(IPanelHost host)
  14. {
  15. host.CreateSetupActionIfCanView<ProductDimensionUnit>("Product Dimensions", PRSDesktop.Resources.unitofmeasure, (action) =>
  16. {
  17. var list = new MasterList(typeof(ProductDimensionUnit));
  18. list.ShowDialog();
  19. });
  20. host.CreateSetupActionIfCanView<ProductGroup>("Product Groups", PRSDesktop.Resources.productgroup, (action) =>
  21. {
  22. var list = new MasterList(typeof(ProductGroup));
  23. list.ShowDialog();
  24. });
  25. host.CreateSetupActionIfCanView<ProductStyle>("Product Styles", PRSDesktop.Resources.palette, (action) =>
  26. {
  27. var list = new MasterList(typeof(ProductStyle));
  28. list.ShowDialog();
  29. });
  30. host.CreateSetupActionIfCanView<StockArea>("Stock Areas", PRSDesktop.Resources.rack, (action) =>
  31. {
  32. var list = new MasterList(typeof(StockArea));
  33. list.ShowDialog();
  34. });
  35. host.CreateSetupActionIfCanView<StockWarehouse>("Stock Warehouses", PRSDesktop.Resources.factorysetup, (action) =>
  36. {
  37. var list = new MasterList(typeof(StockWarehouse));
  38. list.ShowDialog();
  39. });
  40. }
  41. public static void ProductSpreadsheetTemplates(IPanelHost host)
  42. {
  43. host.CreateSetupActionIfCanView<ProductSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  44. {
  45. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Product>();
  46. });
  47. }
  48. }