ReservationManagementHoldingsModel.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows;
  5. using Comal.Classes;
  6. using InABox.Core;
  7. namespace PRSDesktop;
  8. public class ReservationManagementHoldingsModel
  9. {
  10. public Visibility Visibility { get; set; }
  11. public string JobNumber { get; set; }
  12. public string JobName { get; set; }
  13. public List<StockMovement> StockOfCurrentStyle { get; set; } = new List<StockMovement>();
  14. public List<StockMovement> StockOfNoStyle { get; set; } = new List<StockMovement>();
  15. public List<StockMovement> StockOfOtherStyles { get; set; } = new List<StockMovement>();
  16. public double UnitsOfCurrentStyle { get; set; }
  17. public double UnitsOfNoStyle { get; set; }
  18. public double UnitsOfOtherStyles { get; set; }
  19. public bool CurrentStylePositive => !UnitsOfCurrentStyle.IsEffectivelyEqual(0.0);
  20. public bool NoStylePositive => !UnitsOfNoStyle.IsEffectivelyEqual(0.0);
  21. public bool OtherStylesPositive => !UnitsOfOtherStyles.IsEffectivelyEqual(0.0);
  22. public bool Empty => UnitsOfCurrentStyle.IsEffectivelyEqual(0.0) && UnitsOfNoStyle.IsEffectivelyEqual(0.0) && UnitsOfOtherStyles.IsEffectivelyEqual(0.0);
  23. public bool AlreadyAllocated { get; set; }
  24. public Guid JobID { get; set; }
  25. public ReservationManagementHoldingsModel() : this(Guid.Empty, "", "")
  26. {
  27. Visibility = Visibility.Collapsed;
  28. }
  29. public ReservationManagementHoldingsModel(Guid jobid, string jobnumber, string jobname)
  30. {
  31. JobNumber = jobnumber;
  32. JobID = jobid;
  33. JobName = jobname;
  34. Visibility = Visibility.Visible;
  35. }
  36. }