private void RunUserInput(int input) { switch (input) { case 1: RunSearch(); RunUserMenus(); return; case 2: CustomerInterface.UpdateClientInfo(client); RunUserMenus(); return; case 3: ApplyForAdoption(); RunUserMenus(); return; case 4: CheckAdoptionStatus(); RunUserMenus(); return; default: UserInterface.DisplayUserOptions("Input not accepted please try again"); return; } }
protected Dictionary <int, string> GetAnimalCriteria() { Dictionary <int, string> searchParameters = new Dictionary <int, string>(); bool isSearching = true; while (isSearching) { Console.Clear(); List <string> options = new List <string>() { "Select Search Criteia: (Enter number and choose finished when finished)", "1. Species", "2. Breed", "3. Name", "4. Age", "5. Demeanor", "6. Kid friendly", "7. Pet friendly", "8. Weight", "9. ID", "10. Finished" }; UserInterface.DisplayUserOptions(options); string input = UserInterface.GetUserInput(); if (input.ToLower() == "10" || input.ToLower() == "finished") { isSearching = false; continue; } else { searchParameters = CustomerInterface.EnterSearchCriteria(searchParameters, input); } } return(searchParameters); }
public override void LogIn() { if (CheckIfNewUser()) { CustomerInterface.CreateClient(); LogInPreExistingUser(); } else { Console.Clear(); LogInPreExistingUser(); } RunUserMenus(); }
private void CheckIfAccountComplete() { if (client.homeSize == null || client.kids == null || client.income == null) { UserInterface.DisplayUserOptions("Account not up to date would you like to update your account?"); string input = UserInterface.GetUserInput(); if (input == "yes" || input == "y") { Console.Clear(); CustomerInterface.UpdateClientInfo(client); } else { Console.Clear(); return; } } }
private void UpdateAnimal(Animal animal) { Dictionary <int, string> updates = new Dictionary <int, string>(); List <string> options = new List <string>() { "Select Updates: (Enter number and choose finished when finished)", "1. Species", "2. Breed", "3. Name", "4. Age", "5. Demeanor", "6. Kid friendly", "7. Pet friendly", "8. Weight", "9. Finished" }; UserInterface.DisplayUserOptions(options); string input = UserInterface.GetUserInput(); if (input.ToLower() == "9" || input.ToLower() == "finished") { Query.EnterUpdate(animal, updates); } else { updates = CustomerInterface.EnterSearchCriteria(updates, input); } }