Ejemplo n.º 1
0
        /// <summary>
        /// this method lets the user make an order to the user
        /// </summary>
        public void MakeAnOrder()
        {
            try{
                Location    location = GetLocation();
                List <Item> items    = GetItems(location);
                Order       order    = new Order(_customer, location, items);
                order.calculateTotal();

                foreach (Item item in items)
                {
                    System.Console.WriteLine("\t" + item.ToString());
                }

                System.Console.WriteLine("Your total is $" + order.Total);
                _orderBL.AddOreder(order, location);
            }
            catch (Exception ex) {
                Log.Error(ex.Message);
                System.Console.WriteLine(ex.Message);
            }
        }