Example #1
0
        //member methods
        public void AddAnimal()
        {
            Animal_Log Animal = AnimalForm();

            Database.Animal_Log.Add(Animal);
            Database.SaveChanges();
        }
Example #2
0
        public Animal_Log AnimalForm()
        {
            Animal_Log AnimalToAdd = new Animal_Log();

            UI.DisplayMesage("What is the animal's name?");
            AnimalToAdd.Animal_Name = UI.getUserInput();
            UI.DisplayMesage("What species is it?");
            UI.DisplayMesage("1 for Dog, 2 for Cat, 3 for Kangaroo, 4 for Turtle");
            AnimalToAdd.Species = UI.getAnimalType();
            UI.DisplayMesage("What is the animal's age?");
            AnimalToAdd.Age = UI.getUserInputInt();
            UI.DisplayMesage("How much does the animal cost?");
            AnimalToAdd.Price = UI.getUserInputdecimal();
            UI.DisplayMesage("What is the animal's maintence score?");
            UI.DisplayMesage("1 for low maintence, 2 for medium, 3 for high");
            AnimalToAdd.Maintence_Score = UI.getUserInputInt();
            UI.DisplayMesage("How many cups of food does the animal eat per a week?");
            AnimalToAdd.Weekly_Consumption = UI.getUserInputInt();

            return(AnimalToAdd);
        }