1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using Comal.Classes;
- using InABox.Core;
- using Xamarin.Forms;
- namespace comal.timesheets
- {
- public class JobDeliveryShell : Shell<JobDetailModel, Delivery>
- {
- static JobDeliveryShell()
- {
- Columns
- .Map(nameof(ID), x => x.ID)
- .Map(nameof(Number), x => x.Number)
- .Map(nameof(Address), x => x.Location.Address)
- .Map(nameof(ContactName), x => x.Contact.Name)
- .Map(nameof(Due), x => x.Due)
- .Map(nameof(Delivered), x => x.Delivered)
- .Map(nameof(DeliveredBy), x => x.DeliveredBy.Name)
- .Map(nameof(Latitude), x => x.Location.Latitude)
- .Map(nameof(Longitude), x => x.Location.Longitude)
- .Map(nameof(JobID), x => x.Job.ID);
- }
-
- public Guid ID => Row.Get<JobEquipment, Guid>(x => x.ID);
- public int Number => Get<int>();
- public String Address => Get<String>();
- public String ContactName => Get<String>();
- public DateTime Due => Get<DateTime>();
- public DateTime Delivered => Get<DateTime>();
- public String DeliveredBy => Get<String>();
- public double Latitude => Get<double>();
- public double Longitude => Get<double>();
- public Guid JobID => Get<Guid>();
-
- public ImageSource IsDelivered => Delivered.IsEmpty() ? null : ImageSource.FromFile("tick.png");
-
- }
- }
|