private void ListOfLocationsForUser() { System.Console.WriteLine("\n\nList of PizzaBox Locations"); //a signle with a list of location based on the user //location. for (int i = 0; i < LocationsList.Instance().Count; i++) { var locationObject = LocationsList.Instance()[i]; //System.Console.WriteLine($"{i+1}. {locationObject.StoreAddress.Street} {locationObject.StoreAddress.City}, {locationObject.StoreAddress.State} {locationObject.StorePhone}"); System.Console.WriteLine($"{i+1}. Store#: {locationObject.StoreID}\n\t{locationObject.StoreAddress.Street}"); } }
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}"); } }