DeliveryDetailShell.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using Comal.Classes;
  3. namespace comal.timesheets
  4. {
  5. public class DeliveryDetailShell : DetailShell<DeliveryDetailModel, Delivery>
  6. {
  7. static DeliveryDetailShell()
  8. {
  9. Columns.Map(nameof(ID), x => x.ID)
  10. .Map(nameof(Number), x => x.Number)
  11. .Map(nameof(JobID), x => x.Job.ID)
  12. .Map(nameof(JobNumber), x => x.Job.JobNumber)
  13. .Map(nameof(JobName), x => x.Job.Name)
  14. .Map(nameof(Date), x => x.Date)
  15. .Map(nameof(ContactName), x => x.Contact.Name)
  16. .Map(nameof(Latitude), x => x.Location.Latitude)
  17. .Map(nameof(Longitude), x => x.Location.Longitude)
  18. .Map(nameof(AssignmentDate), x => x.Assignment.Date)
  19. .Map(nameof(DeliveredBy), x => x.DeliveredBy.Name)
  20. .Map(nameof(Delivered), x => x.Delivered)
  21. .Map(nameof(Due), x => x.Due)
  22. .Map(nameof(Address), x => x.Location.Address)
  23. .Map(nameof(Created), x => x.Created);
  24. }
  25. public Guid ID => Get<Guid>();
  26. public String JobNumber => Get<String>();
  27. public Guid JobID => Get<Guid>();
  28. public String JobName => Get<String>();
  29. public int Number => Get<int>();
  30. public DateTime Date => Get<DateTime>();
  31. public String ContactName => Get<String>();
  32. public double Latitude => Get<double>();
  33. public double Longitude => Get<double>();
  34. public DateTime AssignmentDate => Get<DateTime>();
  35. public String DeliveredBy => Get<String>();
  36. public DateTime Delivered => Get<DateTime>();
  37. public DateTime Due => Get<DateTime>();
  38. public String Address => Get<String>();
  39. public DateTime Created => Get<DateTime>();
  40. //public ImageSource IsDelivered => Delivered.IsEmpty() ? null : ImageSource.FromResource("tick.png");
  41. }
  42. }