EmployeeResourcePlannerPanel.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using Comal.Classes;
  4. using InABox.Configuration;
  5. using InABox.Core;
  6. using InABox.Wpf;
  7. using Microsoft.Exchange.WebServices.Data;
  8. namespace PRSDesktop
  9. {
  10. public class EmployeeResourcePlannerPanel : EmployeeResourcePlanner, IPanel<Assignment>
  11. {
  12. public EmployeeResourcePlannerPanel()
  13. {
  14. SectionName = nameof(EmployeeResourcePlannerPanel);
  15. LoadSettings += (sender) => new UserConfiguration<EmployeeResourcePlannerProperties>(nameof(EmployeeResourcePlannerPanel)).Load();
  16. SaveSettings += (sender, properties) => new UserConfiguration<EmployeeResourcePlannerProperties>(nameof(EmployeeResourcePlannerPanel)).Save(properties);
  17. }
  18. public string SectionName { get; }
  19. public DataModel DataModel(Selection selection)
  20. {
  21. return new AutoDataModel<Assignment>(new Filter<Assignment>(x=>x.ID).IsEqualTo(Guid.Empty));
  22. }
  23. public event DataModelUpdateEvent? OnUpdateDataModel;
  24. public bool IsReady { get; set; }
  25. public void CreateToolbarButtons(IPanelHost host)
  26. {
  27. HumanResourcesSetupActions.EmployeeTeams(host);
  28. HumanResourcesSetupActions.EmployeeActivities(host);
  29. HumanResourcesSetupActions.EmployeeRosters(host);
  30. host.CreateSetupSeparator();
  31. HumanResourcesSetupActions.EmployeeOvertimeRules(host);
  32. HumanResourcesSetupActions.EmployeeOvertime(host);
  33. HumanResourcesSetupActions.EmployeeStandardLeave(host);
  34. }
  35. public Dictionary<string, object[]> Selected()
  36. {
  37. return new Dictionary<string, object[]>();
  38. }
  39. }
  40. }