/// <summary> /// Copy constructs a session cost from another /// </summary> /// <param name="src">The source of the session cost to copy.</param> public SessionCost(SessionCost src) { Id = src.Id; MasterId = src.MasterId; Name = src.Name; Code = src.Code; Value = src.Value; IsRegister = src.IsRegister; IsInactive = src.IsInactive; }
/// <summary> /// Request that a session cost be saved. /// </summary> /// <param name="cost">The cost to be saved.</param> public void RequestSaveCost(SessionCost cost) { if (!IsBusy) { IsBusy = true; RunWorker(Resources.SavingCost, DoRequestSaveCost, cost, false, OnRequestSaveCostCompleted); } }
/// <summary> /// Clones the session cost object /// </summary> /// <returns>The new cloned object.</returns> public object Clone() { SessionCost clone = new SessionCost(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; 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; SalesTax = src.SalesTax; // Copy prize information PrizesCash = src.PrizesCash; PrizesCheck = src.PrizesCheck; PrizesMerchandise = src.PrizesMerchandise; PrizesPullTab = src.PrizesPullTab; PrizesOther = src.PrizesOther; PrizesAccrualInc = src.PrizesAccrualInc; 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; }
/// <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; }