PumpAccumulatorReading.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. #region --------------- Copyright Dresser Wayne Pignone -------------
  2. /*
  3. * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/PumpAccumulatorReading.cs $
  4. *
  5. * 1 07-01-05 15:12 roger.månsson
  6. * Created
  7. */
  8. #endregion
  9. namespace Wayne.ForecourtControl
  10. {
  11. /// <summary>
  12. /// Data structure for one pump accumulator reading.
  13. /// </summary>
  14. public class PumpAccumulatorReading : Com.IPumpAccumulatorReading
  15. {
  16. #region Fields
  17. IPump pump;
  18. INozzle nozzle;
  19. int fuelPeriodId;
  20. PumpAccumulatorReadingType type;
  21. decimal quantity;
  22. decimal amount;
  23. Com.IPump comPump;
  24. Com.INozzle comNozzle;
  25. #endregion
  26. #region Construction
  27. /// <summary>
  28. /// Private constructor called by the public constructors.
  29. /// </summary>
  30. /// <param name="fuelPeriodId"></param>
  31. /// <param name="type"></param>
  32. /// <param name="quantity"></param>
  33. /// <param name="amount"></param>
  34. private PumpAccumulatorReading(int fuelPeriodId, PumpAccumulatorReadingType type,
  35. decimal quantity, decimal amount)
  36. {
  37. this.fuelPeriodId = fuelPeriodId;
  38. this.type = type;
  39. this.quantity = quantity;
  40. this.amount = amount;
  41. }
  42. /// <summary>
  43. /// Constructor for the .Net version
  44. /// </summary>
  45. /// <param name="pump"></param>
  46. /// <param name="nozzle"></param>
  47. /// <param name="fuelPeriodId"></param>
  48. /// <param name="type"></param>
  49. /// <param name="quantity"></param>
  50. /// <param name="amount"></param>
  51. public PumpAccumulatorReading(IPump pump, INozzle nozzle, int fuelPeriodId,
  52. PumpAccumulatorReadingType type, decimal quantity, decimal amount)
  53. : this(fuelPeriodId, type, quantity, amount)
  54. {
  55. this.pump = pump;
  56. this.nozzle = nozzle;
  57. }
  58. /// <summary>
  59. /// Constructor for the COM version
  60. /// </summary>
  61. /// <param name="pump"></param>
  62. /// <param name="nozzle"></param>
  63. /// <param name="fuelPeriodId"></param>
  64. /// <param name="type"></param>
  65. /// <param name="quantity"></param>
  66. /// <param name="amount"></param>
  67. public PumpAccumulatorReading(Com.IPump pump, Com.INozzle nozzle, int fuelPeriodId,
  68. PumpAccumulatorReadingType type, decimal quantity, decimal amount)
  69. : this(fuelPeriodId, type, quantity, amount)
  70. {
  71. this.comPump = pump;
  72. this.comNozzle = nozzle;
  73. }
  74. #endregion
  75. #region Properties
  76. /// <summary>
  77. /// Pump that made the reading.
  78. /// </summary>
  79. public IPump Pump
  80. {
  81. get { return pump; }
  82. }
  83. /// <summary>
  84. /// The nozzle that the reading was done for.
  85. /// </summary>
  86. public INozzle Nozzle
  87. {
  88. get { return nozzle; }
  89. }
  90. /// <summary>
  91. /// Fuel period that the reading was made in.
  92. /// </summary>
  93. public int FuelPeriodId
  94. {
  95. get { return fuelPeriodId; }
  96. }
  97. /// <summary>
  98. /// Type of accumulator reading.
  99. /// </summary>
  100. public PumpAccumulatorReadingType Type
  101. {
  102. get { return type; }
  103. }
  104. /// <summary>
  105. /// Read quantity
  106. /// </summary>
  107. public decimal Quantity
  108. {
  109. get { return quantity; }
  110. }
  111. /// <summary>
  112. /// Read amount
  113. /// </summary>
  114. public decimal Amount
  115. {
  116. get { return amount; }
  117. }
  118. #endregion
  119. #region IPumpAccumulatorReading Members
  120. Wayne.ForecourtControl.Com.IPump Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Pump
  121. {
  122. get { return comPump; }
  123. }
  124. Wayne.ForecourtControl.Com.INozzle Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Nozzle
  125. {
  126. get { return comNozzle; }
  127. }
  128. #endregion
  129. }
  130. }