using System; using System.Collections.ObjectModel; using System.Windows.Media; using Comal.Classes; using InABox.Core; using InABox.WPF; namespace PRSDesktop { public class StandardLeaveModel : Model { public String? Code { get; } public String? Subject { get; } public String? Color { get; } public DateTime From { get; } public TimeSpan FromTime { get; } public DateTime To { get; } public TimeSpan ToTime { get; } public StandardLeaveModel(CoreRow row) : base(row) { Code = CoreUtils.Codify(Get(c => c.LeaveType.Description)); Subject = Get(c => c.LeaveType.Description); Color = Get(c => c.LeaveType.Color); From = Get(c => c.From); FromTime = Get(c => c.FromTime); To = Get(c => c.To); ToTime = Get(c => c.ToTime); } public override Columns GetColumns() { return new Columns(x => x.ID) .Add(c => c.ID) .Add(c => c.LeaveType.Description) .Add(c => c.Name) .Add(c => c.LeaveType.Color) .Add(c => c.From) .Add(c => c.FromTime) .Add(c => c.To) .Add(c => c.ToTime); } } }