Role.cs 2.1 KB

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