123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- #region --------------- Copyright Dresser Wayne Pignone -------------
- /*
- * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/PumpAccumulatorReading.cs $
- *
- * 1 07-01-05 15:12 roger.månsson
- * Created
- */
- #endregion
- namespace Wayne.ForecourtControl
- {
- /// <summary>
- /// Data structure for one pump accumulator reading.
- /// </summary>
- public class PumpAccumulatorReading : Com.IPumpAccumulatorReading
- {
- #region Fields
- IPump pump;
- INozzle nozzle;
- int fuelPeriodId;
- PumpAccumulatorReadingType type;
- decimal quantity;
- decimal amount;
- Com.IPump comPump;
- Com.INozzle comNozzle;
- #endregion
- #region Construction
- /// <summary>
- /// Private constructor called by the public constructors.
- /// </summary>
- /// <param name="fuelPeriodId"></param>
- /// <param name="type"></param>
- /// <param name="quantity"></param>
- /// <param name="amount"></param>
- private PumpAccumulatorReading(int fuelPeriodId, PumpAccumulatorReadingType type,
- decimal quantity, decimal amount)
- {
- this.fuelPeriodId = fuelPeriodId;
- this.type = type;
- this.quantity = quantity;
- this.amount = amount;
- }
- /// <summary>
- /// Constructor for the .Net version
- /// </summary>
- /// <param name="pump"></param>
- /// <param name="nozzle"></param>
- /// <param name="fuelPeriodId"></param>
- /// <param name="type"></param>
- /// <param name="quantity"></param>
- /// <param name="amount"></param>
- public PumpAccumulatorReading(IPump pump, INozzle nozzle, int fuelPeriodId,
- PumpAccumulatorReadingType type, decimal quantity, decimal amount)
- : this(fuelPeriodId, type, quantity, amount)
- {
- this.pump = pump;
- this.nozzle = nozzle;
- }
- /// <summary>
- /// Constructor for the COM version
- /// </summary>
- /// <param name="pump"></param>
- /// <param name="nozzle"></param>
- /// <param name="fuelPeriodId"></param>
- /// <param name="type"></param>
- /// <param name="quantity"></param>
- /// <param name="amount"></param>
- public PumpAccumulatorReading(Com.IPump pump, Com.INozzle nozzle, int fuelPeriodId,
- PumpAccumulatorReadingType type, decimal quantity, decimal amount)
- : this(fuelPeriodId, type, quantity, amount)
- {
- this.comPump = pump;
- this.comNozzle = nozzle;
- }
- #endregion
- #region Properties
- /// <summary>
- /// Pump that made the reading.
- /// </summary>
- public IPump Pump
- {
- get { return pump; }
- }
- /// <summary>
- /// The nozzle that the reading was done for.
- /// </summary>
- public INozzle Nozzle
- {
- get { return nozzle; }
- }
- /// <summary>
- /// Fuel period that the reading was made in.
- /// </summary>
- public int FuelPeriodId
- {
- get { return fuelPeriodId; }
- }
- /// <summary>
- /// Type of accumulator reading.
- /// </summary>
- public PumpAccumulatorReadingType Type
- {
- get { return type; }
- }
- /// <summary>
- /// Read quantity
- /// </summary>
- public decimal Quantity
- {
- get { return quantity; }
- }
- /// <summary>
- /// Read amount
- /// </summary>
- public decimal Amount
- {
- get { return amount; }
- }
- #endregion
- #region IPumpAccumulatorReading Members
- Wayne.ForecourtControl.Com.IPump Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Pump
- {
- get { return comPump; }
- }
- Wayne.ForecourtControl.Com.INozzle Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Nozzle
- {
- get { return comNozzle; }
- }
- #endregion
- }
- }
|