DeliveryShell.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. using System;
  2. using Comal.Classes;
  3. using InABox.Core;
  4. using InABox.Mobile;
  5. namespace PRS.Mobile
  6. {
  7. public class DeliveryShell : Shell<DeliveryModel, Delivery>
  8. {
  9. protected override void ConfigureColumns(ShellColumns<DeliveryModel, Delivery> columns)
  10. {
  11. columns
  12. .Map(nameof(Number), x => x.Number)
  13. .Map(nameof(Due), x => x.Due)
  14. .Map(nameof(Booked), x => x.Assignment.Date)
  15. .Map(nameof(Delivered), x => x.Delivered)
  16. .Map(nameof(TypeID), x => x.Type.ID)
  17. .Map(nameof(TypeDescription), x => x.Type.Description)
  18. .Map(nameof(JobID), x => x.Job.ID)
  19. .Map(nameof(JobNumber), x => x.Job.JobNumber)
  20. .Map(nameof(JobName), x => x.Job.Name)
  21. .Map(nameof(ContactID), x => x.Contact.ID)
  22. .Map(nameof(ContactName), x => x.Contact.Name)
  23. .Map(nameof(Street), x => x.Address.Street)
  24. .Map(nameof(City), x => x.Address.City)
  25. .Map(nameof(PostCode), x => x.Address.PostCode)
  26. .Map(nameof(Latitude), x => x.Address.Location.Latitude)
  27. .Map(nameof(Longitude), x => x.Address.Location.Longitude)
  28. .Map(nameof(Notes), x => x.Notes);
  29. }
  30. public int Number => Get<int>();
  31. public String Notes
  32. {
  33. get => Get<String>();
  34. set => Set(value);
  35. }
  36. public Guid TypeID
  37. {
  38. get => Get<Guid>();
  39. set => Set(value);
  40. }
  41. public String TypeDescription
  42. {
  43. get => Get<String>();
  44. set => Set(value);
  45. }
  46. public Guid JobID
  47. {
  48. get => Get<Guid>();
  49. set => Set(value);
  50. }
  51. public String JobNumber
  52. {
  53. get => Get<String>();
  54. set => Set(value);
  55. }
  56. public String JobName
  57. {
  58. get => Get<String>();
  59. set => Set(value);
  60. }
  61. public String Street
  62. {
  63. get => Get<String>();
  64. set => Set(value);
  65. }
  66. public String City
  67. {
  68. get => Get<String>();
  69. set => Set(value);
  70. }
  71. public String PostCode
  72. {
  73. get => Get<String>();
  74. set => Set(value);
  75. }
  76. public Guid ContactID
  77. {
  78. get => Get<Guid>();
  79. set => Set(value);
  80. }
  81. public String ContactName
  82. {
  83. get => Get<String>();
  84. set => Set(value);
  85. }
  86. public DateTime Due {
  87. get => Get<DateTime>();
  88. set => Set(value);
  89. }
  90. public DateTime Booked => Get<DateTime>();
  91. public DateTime Delivered
  92. {
  93. get => Get<DateTime>();
  94. set => Set(value);
  95. }
  96. public double Latitude
  97. {
  98. get => Get<double>();
  99. set => Set(value);
  100. }
  101. public double Longitude
  102. {
  103. get => Get<double>();
  104. set => Set(value);
  105. }
  106. }
  107. }