ProductSetupActions.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using Comal.Classes;
  2. using InABox.Core;
  3. using InABox.DynamicGrid;
  4. using InABox.Wpf;
  5. using PRSDesktop.Components.Spreadsheet;
  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<TreatmentType>("Treatment Types", PRSDesktop.Resources.palette, (action) =>
  31. {
  32. var list = new MasterList(typeof(TreatmentType));
  33. list.ShowDialog();
  34. });
  35. host.CreateSetupActionIfCanView<StockArea>("Stock Areas", PRSDesktop.Resources.rack, (action) =>
  36. {
  37. var list = new MasterList(typeof(StockArea));
  38. list.ShowDialog();
  39. });
  40. host.CreateSetupActionIfCanView<StockWarehouse>("Stock Warehouses", PRSDesktop.Resources.factorysetup, (action) =>
  41. {
  42. var list = new MasterList(typeof(StockWarehouse));
  43. list.ShowDialog();
  44. });
  45. }
  46. public static void ProductSpreadsheetTemplates(IPanelHost host)
  47. {
  48. host.CreateSetupActionIfCanView<ProductSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  49. {
  50. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Product>();
  51. });
  52. }
  53. }