Example #1
0
        public void ProcessTheOrder(orderOBJ o)
        {
            PaymentService ps = new PaymentService();

            BaristaService bs = new BaristaService();

            DonuteerService ds = new DonuteerService();

            orderSubmitted += ps.collectCash;
            orderSubmitted += bs.makeCoffee;
            orderSubmitted += ds.packDonuts;

            OnOrderSubmitted(o);

            MessageBox.Show(o.Name + " you have ordered: \n" +
                            o.Coffee + " Coffees \n" +
                            o.Donuts + " Donuts");
        }
Example #2
0
        public void ProcessTheOrder(Order o)
        {
            PaymentService  ps  = new PaymentService();
            BaristaService  bs  = new BaristaService();
            DonuteerService ds  = new DonuteerService();
            DBService       dbs = new DBService();

            this.OrderSubmitted += ps.collectPayment;
            this.OrderSubmitted += bs.makeCoffee;
            this.OrderSubmitted += ds.packDonuts;
            this.OrderSubmitted += dbs.WriteToDB;

            /*//Let cashier know to collect cash
             * ps.collectPayment(o);
             * //Let barista know to make coffee
             * bs.makeCoffee(o);
             * //Let donuteer know to pack donuts
             * ds.packDonuts(o);*/

            OnOrderSubmittted(o);
        }