HumanResourcesSetupActions.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 HumanResourcesSetupActions
  13. {
  14. public static void SecurityGroups(IPanelHost host)
  15. {
  16. host.CreateSetupActionIfCanView<SecurityGroup>("Security Groups", PRSDesktop.Resources.securitygroup, (action) =>
  17. {
  18. var list = new MasterList(typeof(SecurityGroup));
  19. list.ShowDialog();
  20. Security.Reset();
  21. });
  22. }
  23. public static void EmployeeGroups(IPanelHost host)
  24. {
  25. host.CreateSetupActionIfCanView<EmployeeGroup>("Employee Groups", PRSDesktop.Resources.employees, (action) =>
  26. {
  27. var list = new MasterList(typeof(EmployeeGroup));
  28. list.ShowDialog();
  29. });
  30. }
  31. public static void EmployeePositions(IPanelHost host)
  32. {
  33. host.CreateSetupActionIfCanView<EmployeePosition>("Positions", PRSDesktop.Resources.position, (action) =>
  34. {
  35. var list = new MasterList(typeof(EmployeePosition));
  36. list.ShowDialog();
  37. });
  38. }
  39. public static void EmployeeRoles(IPanelHost host)
  40. {
  41. host.CreateSetupActionIfCanView<EmployeeRole>("Roles", PRSDesktop.Resources.employeerole, (action) =>
  42. {
  43. var list = new MasterList(typeof(Role));
  44. list.ShowDialog();
  45. });
  46. }
  47. public static void EmployeeTeams(IPanelHost host)
  48. {
  49. host.CreateSetupActionIfCanView<EmployeeTeam>("Teams", PRSDesktop.Resources.team, (action) =>
  50. {
  51. var list = new MasterList(typeof(Team));
  52. list.ShowDialog();
  53. });
  54. }
  55. public static void EmployeeActivities(IPanelHost host)
  56. {
  57. host.CreateSetupActionIfCanView<Activity>("Activities", PRSDesktop.Resources.quality, (action) =>
  58. {
  59. var list = new MasterList(typeof(Activity));
  60. list.ShowDialog();
  61. });
  62. }
  63. public static void EmployeeQualifications(IPanelHost host)
  64. {
  65. host.CreateSetupActionIfCanView<Qualification>("Qualifications", PRSDesktop.Resources.certificate, (action) =>
  66. {
  67. var list = new MasterList(typeof(Qualification));
  68. list.ShowDialog();
  69. });
  70. }
  71. public static void EmployeeRosters(IPanelHost host)
  72. {
  73. host.CreateSetupActionIfCanView<EmployeeRoster>("Rosters", PRSDesktop.Resources.assignments, (action) =>
  74. {
  75. var list = new MasterList(typeof(EmployeeRoster));
  76. list.ShowDialog();
  77. });
  78. }
  79. public static void EmployeeOvertimeRules(IPanelHost host)
  80. {
  81. host.CreateSetupActionIfCanView<OvertimeRule>("Overtime Rules", PRSDesktop.Resources.overtime, (action) =>
  82. {
  83. var list = new MasterList(typeof(OvertimeRule));
  84. list.ShowDialog();
  85. });
  86. }
  87. public static void EmployeeOvertime(IPanelHost host)
  88. {
  89. host.CreateSetupActionIfCanView<Overtime>("Overtime", PRSDesktop.Resources.overtime, (action) =>
  90. {
  91. var list = new MasterList(typeof(Overtime));
  92. list.ShowDialog();
  93. });
  94. }
  95. public static void EmployeeStandardLeave(IPanelHost host)
  96. {
  97. host.CreateSetupActionIfCanView<StandardLeave>("Standard Leave", PRSDesktop.Resources.fireworks, (action) =>
  98. {
  99. var list = new MasterList(typeof(StandardLeave));
  100. list.ShowDialog();
  101. });
  102. }
  103. public static void EmployeeSpreadsheetTemplates(IPanelHost host)
  104. {
  105. host.CreateSetupActionIfCanView<EmployeeSpreadsheet>("Spreadsheet Templates", PRSDesktop.Resources.box, (action) =>
  106. {
  107. SpreadsheetTemplateGrid.ViewSpreadsheetTemplates<Employee>();
  108. });
  109. }
  110. }