Example #1
0
        private static void PrintCustomerOrderHistory()
        {
            IEnumerable <Order> orders = _customerSingleton.FetchCustomerOrders(_orderSingleton.Customer);

            foreach (Order o in orders)
            {
                InterfaceSingleton.printList(o.Pizzas, $"{o.TimeOfPurchase.ToString("MMMM dd, yyyy")} || Store: {o.Store.Name}");
                System.Console.WriteLine("Total: $" + o.TotalCost);
            }
        }
Example #2
0
        private static CustomPizza AddTopping(CustomPizza customPizza)
        {
            var index = Console.ReadLine();
            var valid = int.TryParse(index, out int input);

            customPizza.Toppings.Add(_toppingSingleton.Toppings[int.Parse(index) - 1]);
            System.Console.WriteLine(input);
            if (customPizza.Toppings.Count > 4)
            {
                System.Console.WriteLine("\n");
                InterfaceSingleton.printList(customPizza.Toppings, "Here are your Pizzas Toppings");
                return(customPizza);
            }
            System.Console.WriteLine("add another? (Y/N)");
            var response = Console.ReadLine();

            if (response == "Y")
            {
                PrintToppings();
                AddTopping(customPizza);
            }
            return(customPizza);
        }
Example #3
0
 private static void PrintCrusts()
 {
     InterfaceSingleton.printList(_crustSingleton.Crusts, "Please select your crust");
 }
Example #4
0
 private static void PrintToppings()
 {
     InterfaceSingleton.printList(_toppingSingleton.Toppings, "Please select your toppings");
 }
Example #5
0
 private static void PrintStoreList()
 {
     InterfaceSingleton.printList(_storeSingleton.Stores, "Please select a store");
 }
Example #6
0
 private static void PrintSizes()
 {
     InterfaceSingleton.printList(_sizeSingleton.Sizes, "Please select a size");
 }
Example #7
0
 private static void PrintPizzaList()
 {
     InterfaceSingleton.printList(_pizzaSingleton.Pizzas, "Please select a Pizza");
 }
Example #8
0
 private static void PrintOrder()
 {
     InterfaceSingleton.printList(_orderSingleton.Pizzas, "Your order so far");
     System.Console.WriteLine("Total: $" + _orderSingleton.TotalCost);
     System.Console.WriteLine("Store:" + _orderSingleton.Store.Name + " || Customer:" + _orderSingleton.Customer.Name + " || Time:" + _orderSingleton.TimeStamp.ToString("hh:mm tt"));
 }
Example #9
0
 private static void PrintFinalActions()
 {
     InterfaceSingleton.printList(_interfaceSingleton.FinalActions, ("What would you like to do next"));
 }