ProductInstanceShell.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using Comal.Classes;
  3. using InABox.Mobile;
  4. namespace PRS.Mobile
  5. {
  6. public class ProductInstanceShell : Shell<ProductInstanceModel, ProductInstance>
  7. {
  8. protected override void ConfigureColumns(ShellColumns<ProductInstanceModel, ProductInstance> columns)
  9. {
  10. columns
  11. .Map(nameof(ProductID), x => x.Product.ID)
  12. .Map(nameof(Height), x => x.Dimensions.Height)
  13. .Map(nameof(Length), x => x.Dimensions.Length)
  14. .Map(nameof(Width), x => x.Dimensions.Width)
  15. .Map(nameof(Weight), x => x.Dimensions.Weight)
  16. .Map(nameof(Quantity), x => x.Dimensions.Quantity)
  17. .Map(nameof(UnitSize), x => x.Dimensions.UnitSize)
  18. .Map(nameof(Value), x => x.Dimensions.Value)
  19. .Map(nameof(NettCost), x => x.NettCost);
  20. }
  21. public Guid ProductID { get; set; }
  22. public double Height => Get<double>();
  23. public double Length => Get<double>();
  24. public double Width => Get<double>();
  25. public double Weight => Get<double>();
  26. public double Quantity => Get<double>();
  27. public double Value => Get<double>();
  28. public string UnitSize => Get<String>();
  29. public double NettCost => Get<double>();
  30. }
  31. }