ProductSetupActions.cs 1.8 KB

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