コード例 #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);
            }
        }
コード例 #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);
        }
コード例 #3
0
 private static void PrintCrusts()
 {
     InterfaceSingleton.printList(_crustSingleton.Crusts, "Please select your crust");
 }
コード例 #4
0
 private static void PrintToppings()
 {
     InterfaceSingleton.printList(_toppingSingleton.Toppings, "Please select your toppings");
 }
コード例 #5
0
 private static void PrintStoreList()
 {
     InterfaceSingleton.printList(_storeSingleton.Stores, "Please select a store");
 }
コード例 #6
0
 private static void PrintSizes()
 {
     InterfaceSingleton.printList(_sizeSingleton.Sizes, "Please select a size");
 }
コード例 #7
0
 private static void PrintPizzaList()
 {
     InterfaceSingleton.printList(_pizzaSingleton.Pizzas, "Please select a Pizza");
 }
コード例 #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"));
 }
コード例 #9
0
 private static void PrintFinalActions()
 {
     InterfaceSingleton.printList(_interfaceSingleton.FinalActions, ("What would you like to do next"));
 }