DeliveryItemDetailShell.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using Comal.Classes;
  3. namespace comal.timesheets
  4. {
  5. public class DeliveryItemDetailShell : DetailShell<DeliveryItemDetailModel, DeliveryItem>
  6. {
  7. static DeliveryItemDetailShell()
  8. {
  9. Columns
  10. .Map(nameof(ID), x=>x.ID)
  11. .Map(nameof(Description), x => x.Description)
  12. .Map(nameof(Location), x => x.ManufacturingPacketLink.Location)
  13. .Map(nameof(_jobid), x => x.JobLink.ID)
  14. .Map(nameof(_jobnumber), x => x.JobLink.JobNumber)
  15. .Map(nameof(_jobname), x => x.JobLink.Name)
  16. .Map(nameof(_setoutid), x => x.ManufacturingPacketLink.SetoutLink.ID)
  17. .Map(nameof(_setoutnumber), x => x.ManufacturingPacketLink.SetoutLink.Number)
  18. .Map(nameof(_setoutdescription), x => x.ManufacturingPacketLink.SetoutLink.Description)
  19. .Map(nameof(SerialNumber), x => x.ManufacturingPacketLink.Serial)
  20. .Map(nameof(Barcode), x => x.Barcode)
  21. .Map(nameof(DeliveryID), x=>x.Delivery.ID);
  22. }
  23. public Guid ID => Get<Guid>();
  24. public String Description => Get<String>();
  25. public String Location => Get<String>();
  26. private Guid _jobid => Get<Guid>();
  27. private String _jobnumber => Get<String>();
  28. private String _jobname => Get<String>();
  29. public String Job => _jobid != Guid.Empty
  30. ? $"{_jobnumber}: {_jobname}"
  31. : "";
  32. private Guid _setoutid => Get<Guid>();
  33. private String _setoutnumber => Get<String>();
  34. private String _setoutdescription => Get<String>();
  35. public String Setout => _setoutid != Guid.Empty
  36. ? $"{_setoutnumber}: {_setoutdescription}"
  37. : "";
  38. public String SerialNumber => Get<String>();
  39. public String Barcode => Get<String>();
  40. public Guid DeliveryID => Get<Guid>();
  41. }
  42. }