示例#1
0
        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;
            }
        }
示例#2
0
        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);
        }
示例#3
0
 public override void LogIn()
 {
     if (CheckIfNewUser())
     {
         CustomerInterface.CreateClient();
         LogInPreExistingUser();
     }
     else
     {
         Console.Clear();
         LogInPreExistingUser();
     }
     RunUserMenus();
 }
示例#4
0
 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;
         }
     }
 }
示例#5
0
        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);
            }
        }