/// <summary> /// The override of ExecuteSelection handles whatever selection was made by the user. /// This is where any business logic is executed. /// </summary> /// <param name="choice">"Key" of the user's menu selection</param> /// <returns></returns> protected override bool ExecuteSelection(string choice) { string countryCode; switch (choice) { case "1": // List Countries // Show user a list of items available ListCountries(); Pause(""); return(true); case "2": // List Countries on a continent string continent = GetString("Enter the Continent Name: "); ListCountries(continent); Pause(""); return(true); case "3": // Show the Country sub-menu countryCode = GetString("Enter the Country Code: "); Country country = countryDAO.GetCountryByCode(countryCode); if (country == null) { Pause($"Sorry, country '{countryCode}' does not exist."); return(true); } // Code was found, invole the Country menu CountryMenu menu = new CountryMenu(country, cityDAO, countryDAO, languageDAO); menu.Run(); return(true); } return(true); }