} //END OF SIGNINORSIGNIN protected bool SelectingLocation() { if (CurrentUsersList.Instance().Count == 1) { ListOfLocationsForUser(); UserSelectALocation(); return(true); } return(false); //error }
private void PrintUsersOrderHistory() { if (CurrentUsersList.Instance()[0].PizzaBoxStore.OrderHistory.Count == 0) { System.Console.WriteLine("\nYou have no orders, yet!"); } else { CurrentUsersList.FetchAllInformationOnUsersHistory(); } }
private void UserChooseAnSpecialty() { System.Console.WriteLine("Please select a specialty"); string reader = System.Console.ReadLine(); short selected = Convert.ToInt16(reader); selected -= 1; int size = SpecialtyPizzaList.Store().Count; if (selected >= 0 && selected < size) { var ATruePizzaObject = SpecialtyPizzaList.Store()[selected]; CurrentUsersList.Instance()[0].PizzaBoxStore.CurrentOrder.Add(ATruePizzaObject.Item2); } }
public bool OptionsToUser() { string reader; System.Console.Write("\nView your [order history] or continue to [make an order]: "); reader = System.Console.ReadLine(); if (reader.Contains("order history")) { PrintUsersOrderHistory(); return(false); ///tohave the user make an order } else if (reader.Contains("make an order")) { // if(!CheckIfUserCanMakeAnOrder()) return false; //flag that user data we unsuccessful or user cant order due to time restricts if (!CurrentUsersList.SetupOrderInDBForUser()) { return(false); } System.Console.WriteLine($"\tThis is your order number: { CurrentUsersList.Instance()[0].PizzaBoxStore.CurrentOrder.GetOrderID()}"); var culture = new CultureInfo("en-US"); string currentDateTime = CurrentUsersList.Instance()[0].PizzaBoxStore.LastOrderTime.ToString(culture); System.Console.WriteLine($"\tThis is the time it was created: {currentDateTime}"); while (true) { if (!(SelectingTypesOfPizzas())) { break; //if user no longer wants to add a pizza to order } } CurrentUsersList.Instance()[0].PizzaBoxStore.CurrentOrder.Print(); //introduce a function that restarts the order for people that cant make their mind up System.Console.Write("Are you satified with your order? [no] to restart or [yes] to submit: "); reader = System.Console.ReadLine(); if (reader == "no" || reader == "No") { CurrentUsersList.DeleteOrderInDBForUser(); return(false); //this way we restart the order and reprompt the user again } else { CurrentUsersList.SubmitOrder(); } } return(true); }
private void UserSelectALocation() { string reader; System.Console.Write("\nPlease select your closest location: "); reader = System.Console.ReadLine(); int selected = Convert.ToInt16(reader); selected -= 1; int store = 0; if (selected >= 0 && selected < LocationsList.Instance().Count) { store = LocationsList.Instance()[selected].StoreID; CurrentUsersList.Instance()[0].PizzaBoxStore.PrimaryStoreID = store; System.Console.WriteLine($"\tYou have selected store number #{store}"); } }
private void UserSelectedCustom() { var newFinalPizza = new CustomRecipe(); CurrentUsersList.Instance()[0].PizzaBoxStore.CurrentOrder.Add(newFinalPizza.Make()); }