public void Increment(ITotal with)
            {
                PointTotal other = (PointTotal)with;

                this.points      += other.points;
                this.goalaverage += other.goalaverage;
            }
示例#2
0
 public MyDemo(IService service,
               ITotal total,
               ISend send)
 {
     this._service = service;
     this._total   = total;
     this._send    = send;
 }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="iteratorSport"></param>
        /// <returns></returns>
        private IPeriod PeriodPinnacleParse(XPathNavigator matchEventNameNavigator, XPathNodeIterator iteratorBet)
        {
            XPathNavigator _betNameNavigator = iteratorBet.Current.Clone();
            IPeriod        _period           = new Period();
            // Add period to Match
            //handicap
            XPathExpression exprehandicap;

            exprehandicap = matchEventNameNavigator.Compile("spreads/spread");
            XPathNodeIterator iteratorHandicap = matchEventNameNavigator.Select(exprehandicap);
            //total
            XPathExpression expretotal;

            expretotal = matchEventNameNavigator.Compile("totals/total");
            XPathNodeIterator iteratorTotal = matchEventNameNavigator.Select(expretotal);
            //moneyline
            XPathExpression expremoneyline;

            expremoneyline = matchEventNameNavigator.Compile("moneyLine");
            XPathNodeIterator iteratorMoneyLine = matchEventNameNavigator.Select(expremoneyline);

            while (iteratorHandicap.MoveNext())
            {
                ISpread _spread = SpreadPinnacleParse(iteratorHandicap);
                if (_period.Spreads == null)
                {
                    _period.Spreads = new List <ISpread>();
                }
                _period.Spreads.Add(_spread);
            }

            while (iteratorTotal.MoveNext())
            {
                ITotal _total = TotalPinnacleParse(iteratorTotal);
                if (_period.Totals == null)
                {
                    _period.Totals = new List <ITotal>();
                }
                _period.Totals.Add(_total);
            }

            while (iteratorMoneyLine.MoveNext())
            {
                IMoneyLine _moneyline = MoneyLinePinnacleParse(iteratorMoneyLine);
                if (_period.MoneyLines == null)
                {
                    _period.MoneyLines = new List <IMoneyLine>();
                }
                _period.MoneyLines.Add(_moneyline);
            }

            if (_period.Totals != null && _period.MoneyLines != null && _period.Spreads != null)
            {
                _period.Description = _betNameNavigator.SelectSingleNode("description").Value;
            }

            return(_period);
        }
 public Invoice(IEmployee emp, int id, int drawerId)
 {
     this.id      = id;
     this.emp     = emp;
     lineItemList = new List <ILineItem>();
     total        = new Total(0, 0, 0);
     isPaid       = false;
     cashDrawerId = drawerId;
     isVoid       = "False";
 }
示例#5
0
 public void printTotals(ITotal total)
 {
     setTabs(new string[] { _currencyTabPoint });
     print("Subtotal" + tab);
     alignDecimalsAndPrintWithLineFeed(total.getSubtotal());
     print("Tax" + tab);
     alignDecimalsAndPrintWithLineFeed(total.getTax());
     print("Total" + tab);
     alignDecimalsAndPrintWithLineFeed(total.getTotal());
     cancelTabs();
 }
 public Invoice(IEmployee emp, int id, int drawerId, DateTime invoiceCreateTime, List <ILineItem> itemList, Total total, string isVoid)
 {
     this.id           = id;
     this.emp          = emp;
     this.lineItemList = itemList;
     this.total        = total;
     this.isPaid       = false;
     this.cashDrawerId = drawerId;
     this.createDate   = invoiceCreateTime;
     this.isVoid       = isVoid;
 }
示例#7
0
        /**
         * @desc function that encapsulates several function calls needed to print an order receipt
         * @param IInvoice invoice object that holds all the required information needed to print
         * @return void
         */
        public void printBody(IInvoice invoice)
        {
            // get total object reference that invoice object holds
            ITotal              total        = invoice.getTotal();
            List <ILineItem>    lineItemList = invoice.getLineItemList();
            List <ILinePayment> paymentsList = total.getLinePaymentList();

            initializePrinter();
            if (invoice.getIsVoid().Equals("True"))
            {
                printReturnHeader("Nail Salon", invoice.getEmployee().getFirstName(), invoice.ToString());
            }
            else
            {
                printHeader("Nail Salon", invoice.getEmployee().getFirstName(), invoice.ToString());
            }
            printLineItems(lineItemList);
            printSeparator();
            printTotals(total);
            printPayments(paymentsList);
            printChangeDue();
            openCashDrawer();
        }
示例#8
0
 public PointSystem()
 {
     this.initialPoint = null;
 }
 public void Increment(ITotal with)
 {
     this.points += ((PointTotal)with).points;
 }
 public void Increment(ITotal with)
 {
 }
示例#11
0
 public void setTotal(ITotal total)
 {
     this.total = total;
 }
 public void Increment(ITotal point)
 {
     this.points += ((TotalPoints)point).points;
 }
            public void Increment(ITotal with)
            {
                PointTotal other = (PointTotal)with;

                this.points += other.points;
                this.goalaverage += other.goalaverage;
            }
示例#14
0
 public TotalController()
 {
     _totalRepository = new TotalRepository();
 }
 public void Increment(ITotal with)
 {
     _points += ((PointTotal)with)._points;
     _goalaverage += ((PointTotal)with)._goalaverage;
 }