using System; using Comal.Classes; using InABox.Mobile; namespace PRS.Mobile { public class DeliveryItemShell : Shell { protected override void ConfigureColumns(ShellColumns columns) { columns .Map(nameof(DeliveryID), x=>x.Delivery.ID) .Map(nameof(Description), x => x.Description) .Map(nameof(Barcode), x => x.Barcode) .Map(nameof(Rack), x => x.ShipmentLink.Code) .Map(nameof(Requi), x => x.RequisitionLink.Number) .Map(nameof(SerialNumber), x => x.ManufacturingPacketLink.Serial) .Map(nameof(Location), x => x.ManufacturingPacketLink.Location) .Map(nameof(SetoutID), x => x.ManufacturingPacketLink.SetoutLink.ID) .Map(nameof(_setoutnumber), x => x.ManufacturingPacketLink.SetoutLink.Number) .Map(nameof(_setoutdescription), x => x.ManufacturingPacketLink.SetoutLink.Description) .Map(nameof(_jobid), x => x.JobLink.ID) .Map(nameof(_jobnumber), x => x.JobLink.JobNumber) .Map(nameof(_jobname), x => x.JobLink.Name) ; } public Guid DeliveryID { get => Get(); set => Set(value); } public String Description => Get(); public String Barcode => Get(); public string Rack => Get(); public int Requi => Get(); public String SerialNumber => Get(); public String Location => Get(); public Guid SetoutID => Get(); public string _setoutnumber => Get(); private String _setoutdescription => Get(); private Guid _jobid => Get(); private String _jobnumber => Get(); private String _jobname => Get(); public String Setout => SetoutID != Guid.Empty ? $"{_setoutnumber}: {_setoutdescription}" : ""; public String Reference => Requi == 0 ? $"Rack {Rack}" : $"Req. {Requi}"; public String Job => _jobid != Guid.Empty ? $"{_jobnumber}: {_jobname}" : ""; } }