1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using InABox.Core;
- namespace Comal.Classes
- {
- public class OrgChartSettings<TEntityLink> : BaseObject, IEnclosedEntity
- where TEntityLink : IEntityLink, new()
- {
- public OrgChartSettings()
- {
- ReportsTo = new TEntityLink();
- Color = "#00000000";
- Visible = true;
- }
- [EditorSequence("Org Chart", 1)]
- [Caption("Reports To", IncludePath = false)]
- public TEntityLink ReportsTo { get; set; }
- [EditorSequence("Org Chart", 2)]
- [ColorEditor]
- [Caption("Color", IncludePath = false)]
- public string Color { get; set; }
- [EditorSequence("Org Chart", 3)]
- [CheckBoxEditor]
- [Caption("Visible", IncludePath = false)]
- public bool Visible { get; set; }
- }
- public interface IOrgChart<TEntityLink> where TEntityLink : IEntityLink, new()
- {
- OrgChartSettings<TEntityLink> OrgChart { get; set; }
- }
- [UserTracking(typeof(Employee))]
- public class Role : Entity, IPersistent, IRemotable, IOrgChart<RoleLink>, ILicense<CoreLicense>, IExportable, IImportable
- {
- [EditorSequence(1)]
- [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
- public string Code { get; set; }
- [EditorSequence(2)]
- [TextBoxEditor]
- public string Name { get; set; }
- public OrgChartSettings<RoleLink> OrgChart { get; set; }
- protected override void Init()
- {
- base.Init();
- OrgChart = new OrgChartSettings<RoleLink>();
- }
- public override string ToString()
- {
- return Name;
- }
- }
- }
|