| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- using System;
- using System.Collections.ObjectModel;
- using System.Windows.Media;
- using Comal.Classes;
- using InABox.Core;
- using InABox.WPF;
- namespace PRSDesktop
- {
- public class AssignmentModel : Model<AssignmentModel,Assignment>
- {
-
- public Guid EmployeeID { get; }
- public int Number { get; set; }
- public String? Subject { get; set; }
- public String? Notes { get; set; }
- public DateTime Completed { get; set; }
- public DateTime Date { get; }
- public TimeSpan BookedStart { get; set; }
- public TimeSpan BookedFinish { get; set; }
- public TimeSpan BookedDuration { get; }
- public TimeSpan ActualStart { get; set; }
- public TimeSpan ActualDuration { get; set; }
- public TimeSpan ActualFinish { get; set; }
-
- public Guid JobID { get; }
- public string? JobNumber { get; }
- public string? JobName { get; }
-
- public Guid ActivityID { get; set; }
- public string? ActivityCode { get; }
- public string? ActivityDescription { get; }
- public string? Color { get; }
-
- public Guid ItpID { get; set; }
- public string? ItpCode { get; set; }
- public string? ItpDescription { get; set; }
- public Guid DeliveryID { get; set; }
- public string? DeliveryNotes { get; set; }
- public Guid TaskID { get; set; }
- public int TaskNumber { get; set; }
- public AssignmentModel(CoreRow row) : base(row)
- {
- EmployeeID = Get(x=>x.EmployeeLink.ID);
- Number = Get(x => x.Number);
- Subject = Get(x => x.Title);
- Notes = Get(x => x.Description);
- Completed = Get(x => x.Completed);
- Date = Get(x=>x.Date);
- BookedDuration = Get(x => x.Booked.Duration);
- BookedStart = Get(x => x.Booked.Start);
- BookedFinish = Get(x => x.Booked.Finish);
- ActualStart = Get(x => x.Actual.Start);
- ActualDuration = Get(x => x.Actual.Duration);
- ActualFinish = Get(x => x.Actual.Finish);
-
- JobID = Get(x => x.JobLink.ID);
- JobNumber = Get(x => x.JobLink.JobNumber);
- JobName = Get(x => x.JobLink.Name);
-
- ActivityID = Get(x => x.ActivityLink.ID);
- ActivityCode = Get(x => x.ActivityLink.Code);
- ActivityDescription = Get(x => x.ActivityLink.Description);
- Color = Get(x => x.ActivityLink.Color);
-
- ItpID = Get(x => x.ITP.ID);
- ItpCode = Get(x => x.ITP.Code);
- ItpDescription = Get(x => x.ITP.Description);
- DeliveryID = Get(x => x.Delivery.ID);
- DeliveryNotes = Get(x => x.Delivery.Notes);
-
- TaskID = Get(x => x.Task.ID);
- TaskNumber = Get(x => x.Task.Number);
- }
-
- public override Columns<Assignment> GetColumns()
- {
- return new Columns<Assignment>(x => x.ID)
-
- .Add(x => x.EmployeeLink.ID)
- .Add(x => x.Number)
- .Add(x => x.Title)
- .Add(x => x.Description)
- .Add(x => x.Completed)
-
- .Add(x => x.Date)
- .Add(x => x.Booked.Start)
- .Add(x => x.Booked.Duration)
- .Add(x => x.Booked.Finish)
- .Add(x => x.Actual.Start)
- .Add(x => x.Actual.Duration)
- .Add(x => x.Actual.Finish)
- .Add(x => x.JobLink.ID)
- .Add(x => x.JobLink.JobNumber)
- .Add(x => x.JobLink.Name)
-
- .Add(x => x.ActivityLink.ID)
- .Add(x => x.ActivityLink.Code)
- .Add(x => x.ActivityLink.Description)
- .Add(x => x.ActivityLink.Color)
-
- .Add(x => x.ITP.ID)
- .Add(x => x.ITP.Code)
- .Add(x => x.ITP.Description)
- .Add(x => x.Delivery.ID)
- .Add(x => x.Delivery.Notes)
-
- .Add(x => x.Task.ID)
- .Add(x => x.Task.Number);
-
- }
- }
- }
|