Role.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public class OrgChartSettings<TEntityLink> : EnclosedEntity
  6. where TEntityLink : IEntityLink, new()
  7. {
  8. [EditorSequence("Org Chart", 1)]
  9. [Caption("Reports To", IncludePath = false)]
  10. public TEntityLink ReportsTo { get; set; }
  11. [EditorSequence("Org Chart", 2)]
  12. [ColorEditor]
  13. [Caption("Color", IncludePath = false)]
  14. public string Color { get; set; } = "#00000000";
  15. [EditorSequence("Org Chart", 3)]
  16. [CheckBoxEditor]
  17. [Caption("Visible", IncludePath = false)]
  18. public bool Visible { get; set; } = true;
  19. }
  20. public interface IOrgChart<TEntityLink> where TEntityLink : IEntityLink, new()
  21. {
  22. OrgChartSettings<TEntityLink> OrgChart { get; set; }
  23. }
  24. [UserTracking(typeof(Employee))]
  25. public class Role : Entity, IPersistent, IRemotable, IOrgChart<RoleLink>, ILicense<CoreLicense>, IExportable, IImportable
  26. {
  27. [EditorSequence(1)]
  28. [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
  29. public string Code { get; set; }
  30. [EditorSequence(2)]
  31. [TextBoxEditor]
  32. public string Name { get; set; }
  33. [MemoEditor]
  34. [EditorSequence("Standards",1)]
  35. public String Description { get; set; }
  36. [MemoEditor]
  37. [EditorSequence("Standards",2)]
  38. public String JobKnowledge { get; set; }
  39. [MemoEditor]
  40. [EditorSequence("Standards",3)]
  41. public String WorkQuality { get; set; }
  42. [MemoEditor]
  43. [EditorSequence("Standards",3)]
  44. public String Productivity { get; set; }
  45. [MemoEditor]
  46. [EditorSequence("Standards",4)]
  47. public String Relationships { get; set; }
  48. public OrgChartSettings<RoleLink> OrgChart { get; set; }
  49. public override string ToString()
  50. {
  51. return Name;
  52. }
  53. }
  54. }