using System; using Comal.Classes; using InABox.Core; using Xamarin.Forms; namespace comal.timesheets { public class JobDeliveryShell : Shell { 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(x => x.ID); public int Number => Get(); public String Address => Get(); public String ContactName => Get(); public DateTime Due => Get(); public DateTime Delivered => Get(); public String DeliveredBy => Get(); public double Latitude => Get(); public double Longitude => Get(); public Guid JobID => Get(); public ImageSource IsDelivered => Delivered.IsEmpty() ? null : ImageSource.FromFile("tick.png"); } }