HumanResourcesSetupActions.cs 3.8 KB

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