using System; using Comal.Classes; using InABox.Mobile; namespace PRS.Mobile { public class RequisitionItemShell : Shell { protected override void ConfigureColumns(ShellColumns columns) { columns .Map(nameof(RequisitionID), x=>x.RequisitionLink.ID) .Map(nameof(RequisitionJobID), x=>x.RequisitionLink.JobLink.ID) .Map(nameof(ProductID), x => x.Product.ID) .Map(nameof(ProductCode), x => x.Product.Code) .Map(nameof(ProductName), x => x.Product.Name) .Map(nameof(StyleID), x => x.Style.ID) .Map(nameof(StyleCode), x => x.Style.Code) .Map(nameof(StyleDescription), x => x.Style.Description) .Map(nameof(DimensionsUnitID), x => x.Dimensions.Unit.ID) .Map(nameof(DimensionsQuantity), x => x.Dimensions.Quantity) .Map(nameof(DimensionsLength), x => x.Dimensions.Length) .Map(nameof(DimensionsHeight), x => x.Dimensions.Height) .Map(nameof(DimensionsWeight), x => x.Dimensions.Weight) .Map(nameof(DimensionsWidth), x => x.Dimensions.Width) .Map(nameof(DimensionsValue), x => x.Dimensions.Value) .Map(nameof(DimensionsUnitSize), x => x.Dimensions.UnitSize) .Map(nameof(Description), x => x.Description) .Map(nameof(Quantity), x => x.Quantity) .Map(nameof(JobID), x=>x.JobLink.ID) .Map(nameof(TargetJRI), x=>x.JobRequisitionItem.ID) .Map(nameof(LocationID), x=>x.Location.ID) .Map(nameof(SourceJRI), x=>x.SourceJRI.ID) .Map(nameof(ActualQuantity), x => x.ActualQuantity) .Map(nameof(ImageID), x=>x.Image.ID) .Map(nameof(Cost), x=>x.Cost) .Map(nameof(Done), x=>x.Done) ; } public Guid RequisitionID { get => Get(); set => Set(value); } public Guid RequisitionJobID { get => Get(); set => Set(value); } public Guid ProductID { get => Get(); set => Set(value); } public String ProductCode { get => Get(); set => Set(value); } public String ProductName { get => Get(); set => Set(value); } public Guid StyleID { get => Get(); set => Set(value); } public String StyleCode { get => Get(); set => Set(value); } public String StyleDescription { get => Get(); set => Set(value); } public Guid DimensionsUnitID { get => Get(); set => Set(value); } public double DimensionsQuantity { get => Get(); set => Set(value); } public double DimensionsLength { get => Get(); set => Set(value); } public double DimensionsWidth { get => Get(); set => Set(value); } public double DimensionsHeight { get => Get(); set => Set(value); } public double DimensionsWeight { get => Get(); set => Set(value); } public double DimensionsValue { get => Get(); set => Set(value); } public string DimensionsUnitSize { get => Get(); set => Set(value); } public String Description { get => Get(); set => Set(value); } public double Quantity { get => Get(); set => Set(value); } public double ActualQuantity { get => Get(); set => Set(value); } public Guid LocationID { get => Get(); set => Set(value); } public Guid JobID { get => Get(); set => Set(value); } public Guid SourceJRI { get => Get(); set => Set(value); } public Guid TargetJRI { get => Get(); set => Set(value); } public Guid ImageID { get => Get(); set => Set(value); } public double Cost { get => Get(); set => Set(value); } public bool Done { get => Get(); set => Set(value); } public byte[] Image => Parent.GetImage(ImageID); public String ProductDisplay() => ProductID != Guid.Empty ? $"{ProductCode}: {ProductName}" : ""; public String StyleDisplay() => StyleID != Guid.Empty ? $"{StyleCode}: {StyleDescription}" : ""; } }