| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- using System;
- using Comal.Classes;
- namespace comal.timesheets
- {
- public class AssignmentDetailShell : DetailShell<AssignmentDetailModel, Assignment>
- {
- static AssignmentDetailShell()
- {
- Columns
- .Map(nameof(ID), c => c.ID)
- .Map(nameof(EmployeeID), x => x.EmployeeLink.ID)
- .Map(nameof(Number), x => x.Number)
- .Map(nameof(Subject), x => x.Title)
- .Map(nameof(Description), x => x.Description)
- .Map(nameof(Date), x => x.Date)
- .Map(nameof(ActualStart), x => x.Actual.Start)
- .Map(nameof(ActualDuration), x => x.Actual.Duration)
- .Map(nameof(ActualFinish), x => x.Actual.Finish)
- .Map(nameof(BookedStart), x => x.Booked.Start)
- .Map(nameof(BookedDuration), x => x.Booked.Duration)
- .Map(nameof(BookedFinish), x => x.Booked.Finish)
- .Map(nameof(JobID), x => x.JobLink.ID)
- .Map(nameof(JobNumber), x => x.JobLink.JobNumber)
- .Map(nameof(JobName), x => x.JobLink.Name)
- .Map(nameof(Latitude), x => x.JobLink.SiteAddress.Location.Latitude)
- .Map(nameof(Longitude), x => x.JobLink.SiteAddress.Location.Longitude)
- .Map(nameof(TaskID), x => x.Task.ID)
- .Map(nameof(TaskNumber), x => x.Task.Number)
- .Map(nameof(TaskName), x => x.Task.Title)
- .Map(nameof(ActivityID), x => x.ActivityLink.ID)
- .Map(nameof(ActivityCode), x => x.ActivityLink.Code)
- .Map(nameof(ActivityDescription), x => x.ActivityLink.Description)
- .Map(nameof(ActivityColor), x => x.ActivityLink.Color)
- .Map(nameof(Completed), x => x.Completed);
- }
- public Guid ID => Get<Guid>();
-
- public Guid EmployeeID
- {
- get => Get<Guid>();
- set => Set(value);
- }
- public int Number
- {
- get => Get<int>();
- set => Set(value);
- }
-
- public String Subject
- {
- get => Get<String>();
- set => Set(value);
- }
- public String Description
- {
- get => Get<String>();
- set => Set(value);
- }
-
- public DateTime Date
- {
- get => Get<DateTime>();
- set => Set(value);
- }
- public TimeSpan ActualStart
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
- public TimeSpan ActualDuration
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
-
- public TimeSpan ActualFinish
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
- public TimeSpan BookedStart
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
- public TimeSpan BookedDuration
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
- public TimeSpan BookedFinish
- {
- get => Get<TimeSpan>();
- set => Set(value);
- }
- public Guid JobID
- {
- get => Get<Guid>();
- set => Set(value);
- }
-
- public String JobNumber
- {
- get => Get<String>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(JobDisplay));
- }
- }
-
- public String JobName
- {
- get => Get<String>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(JobDisplay));
- }
- }
-
- public String JobDisplay => JobID != Guid.Empty
- ? String.Format("{0}: {1}", JobNumber, JobName )
- : "(No Job Selected)";
-
- public double Latitude
- {
- get => Get<double>();
- set => Set(value);
- }
-
- public double Longitude
- {
- get => Get<double>();
- set => Set(value);
- }
-
- public Guid TaskID
- {
- get => Get<Guid>();
- set => Set(value);
- }
-
- public int TaskNumber
- {
- get => Get<int>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(TaskDisplay));
- }
- }
-
- public String TaskName
- {
- get => Get<String>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(TaskDisplay));
- }
- }
-
- public String TaskDisplay => TaskID != Guid.Empty
- ? String.Format("{0}: {1}", TaskNumber, TaskName )
- : "(No Task Selected)";
-
- public Guid ActivityID
- {
- get => Get<Guid>();
- set => Set(value);
- }
-
- public String ActivityCode
- {
- get => Get<String>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(ActivityDisplay));
- }
- }
-
- public String ActivityDescription
- {
- get => Get<String>();
- set
- {
- Set(value,false);
- DoPropertyChanged(nameof(TaskDisplay));
- }
- }
-
- public String ActivityColor
- {
- get => Get<String>();
- set => Set(value);
- }
- public String ActivityDisplay => ActivityID != Guid.Empty
- ? String.Format("{0}: {1}", ActivityCode, ActivityDescription)
- : "(No Activity Selected)";
- public DateTime Completed
- {
- get => Get<DateTime>();
- set => Set(value);
- }
-
- }
- }
|