Esempio n. 1
0
 static void AddOrders(DelegateDB delegateDB)
 {
     delegateDB.AddOrder(2994, true, true, true, 1267.00m);
     delegateDB.AddOrder(2000, false, true, true, 999.99m);
     delegateDB.AddOrder(1280, true, false, false, 569.00m);
     delegateDB.AddOrder(999, false, false, false, 000.00m);
 }
Esempio n. 2
0
        public static void Main()
        {
            DelegateDB delegateDB = new DelegateDB();

            AddOrders(delegateDB);

            Console.WriteLine("Order ID's:");

            PriceTotaller pricetotaller = new PriceTotaller();

            delegateDB.ProcessShampoo(new ProcessOrderDelegate(PrintID));

            delegateDB.ProcessShampoo(new ProcessOrderDelegate(pricetotaller.AddShampooTotal));
            Console.WriteLine("Average Orders with Shampoos price: ${0:#.##}", pricetotaller.AveragePrice());
        }