DeliveryItemShell.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using Comal.Classes;
  3. using InABox.Mobile;
  4. namespace PRS.Mobile
  5. {
  6. public class DeliveryItemShell : Shell<DeliveryItemModel, DeliveryItem>
  7. {
  8. protected override void ConfigureColumns(ShellColumns<DeliveryItemModel, DeliveryItem> columns)
  9. {
  10. columns
  11. .Map(nameof(DeliveryID), x=>x.Delivery.ID)
  12. .Map(nameof(Description), x => x.Description)
  13. .Map(nameof(Barcode), x => x.Barcode)
  14. .Map(nameof(Rack), x => x.ShipmentLink.Code)
  15. .Map(nameof(Requi), x => x.RequisitionLink.Number)
  16. .Map(nameof(SerialNumber), x => x.ManufacturingPacketLink.Serial)
  17. .Map(nameof(Location), x => x.ManufacturingPacketLink.Location)
  18. .Map(nameof(SetoutID), x => x.ManufacturingPacketLink.SetoutLink.ID)
  19. .Map(nameof(_setoutnumber), x => x.ManufacturingPacketLink.SetoutLink.Number)
  20. .Map(nameof(_setoutdescription), x => x.ManufacturingPacketLink.SetoutLink.Description)
  21. .Map(nameof(_jobid), x => x.JobLink.ID)
  22. .Map(nameof(_jobnumber), x => x.JobLink.JobNumber)
  23. .Map(nameof(_jobname), x => x.JobLink.Name)
  24. ;
  25. }
  26. public Guid DeliveryID
  27. {
  28. get => Get<Guid>();
  29. set => Set(value);
  30. }
  31. public String Description => Get<String>();
  32. public String Barcode => Get<String>();
  33. public string Rack => Get<String>();
  34. public int Requi => Get<int>();
  35. public String SerialNumber => Get<String>();
  36. public String Location => Get<String>();
  37. public Guid SetoutID => Get<Guid>();
  38. public string _setoutnumber => Get<String>();
  39. private String _setoutdescription => Get<String>();
  40. private Guid _jobid => Get<Guid>();
  41. private String _jobnumber => Get<String>();
  42. private String _jobname => Get<String>();
  43. public String Setout => SetoutID != Guid.Empty
  44. ? $"{_setoutnumber}: {_setoutdescription}"
  45. : "";
  46. public String Reference => Requi == 0
  47. ? $"Rack {Rack}"
  48. : $"Req. {Requi}";
  49. public String Job => _jobid != Guid.Empty
  50. ? $"{_jobnumber}: {_jobname}"
  51. : "";
  52. }
  53. }