/// <summary> /// Loads the "Actual Cash Denoms" with the quantities of items known, /// but does not remove empty denoms already defined. /// </summary> /// <param name="actualCashDenoms"></param> public void LoadActualCashDenomQuantities(List <ActualCashCurrencyDenom> actualCashDenoms) { List <ActualCashCurrencyDenom> denoms = new List <ActualCashCurrencyDenom>(); foreach (var srcDenom in actualCashDenoms) { ActualCashCurrencyDenom newDenom = (ActualCashCurrencyDenom)srcDenom.Clone(); denoms.Add(newDenom); } ActualCashDenoms = denoms; }
/// <summary> /// Copy constructs a actual cash currency denom from another /// </summary> /// <param name="src">The source of the session cost to copy.</param> public ActualCashCurrencyDenom(ActualCashCurrencyDenom src) { ID = src.ID; SessionSummaryID = src.SessionSummaryID; ISOCode = src.ISOCode; CurrencyDetailID = src.CurrencyDetailID; Quantity = src.Quantity; CurrencyValue = src.CurrencyValue; ExchangeRate = src.ExchangeRate; DefaultValue = src.DefaultValue; }
/// <summary> /// Clones the Actual Cash Denoms object /// </summary> /// <returns>The new cloned object.</returns> public object Clone() { ActualCashCurrencyDenom clone = new ActualCashCurrencyDenom(this); return(clone); }
/// <summary> /// Initalizes a Summary object from another /// </summary> /// <param name="src">The Summary object to copy.</param> public Summary(Summary src) { if (src == null) { throw new ArgumentNullException("src"); } SessionDate = src.SessionDate; SessionNumber = src.SessionNumber; AttendanceSystem = src.AttendanceSystem; AttendanceSystemTime = src.AttendanceSystemTime; AttendanceManual = src.AttendanceManual; AttendanceManualTime = src.AttendanceManualTime; Manager = src.Manager; Callers = new List <Staff>(src.Callers); Comments = src.Comments; BankBegin = src.BankBegin; BankFill = src.BankFill; BankEnd = src.BankEnd; List <SessionCost> costs = new List <SessionCost>(); foreach (SessionCost cost in src.SessionCosts) { SessionCost newCost = (SessionCost)cost.Clone(); costs.Add(newCost); } SessionCosts = costs; // Copy sales information SalesPaper = src.SalesPaper; SalesElectronic = src.SalesElectronic; SalesBingoOther = src.SalesBingoOther; //FIX: DE8961 Session summary does calculate bingo other sales SalesPullTab = src.SalesPullTab; SalesConcession = src.SalesConcession; SalesMerchandise = src.SalesMerchandise; SalesDeviceFee = src.SalesDeviceFee; SalesDiscount = src.SalesDiscount; SalesValidation = src.SalesValidation; SalesTax = src.SalesTax; KioskSale = src.KioskSale; KioskVoids = src.KioskVoids; // Copy prize information PrizesCash = src.PrizesCash; PrizesCheck = src.PrizesCheck; PrizesMerchandise = src.PrizesMerchandise; PrizesPullTab = src.PrizesPullTab; PrizesOther = src.PrizesOther; PrizesAccrualInc = src.PrizesAccrualInc; PrizesAccrualIncCountExpected = src.PrizesAccrualIncCountExpected; PrizesAccrualIncCountApplied = src.PrizesAccrualIncCountApplied; PrizesAccrualPay = src.PrizesAccrualPay; PrizesFees = src.PrizesFees; OverCash = src.OverCash; OverDebitCredit = src.OverDebitCredit; OverChecks = src.OverChecks; OverMoneyOrders = src.OverMoneyOrders; OverCoupons = src.OverCoupons; OverGiftCards = src.OverGiftCards; OverChips = src.OverChips; AccrualCashPayouts = src.AccrualCashPayouts; List <Currency> curr = new List <Currency>(); foreach (var srcCur in src.m_availableCurrencies) { Currency newCur = (Currency)srcCur.Clone(); curr.Add(newCur); } AvailableCurrencies = curr; List <ActualCashCurrencyDenom> denoms = new List <ActualCashCurrencyDenom>(); foreach (var srcDenom in src.m_actualCashDenomsSet) { ActualCashCurrencyDenom newDenom = (ActualCashCurrencyDenom)srcDenom.Clone(); denoms.Add(newDenom); } ActualCashDenoms = denoms; }