예제 #1
0
        private void AddNewShots()
        {
            Console.Clear();
            var shots = Query.DisplayShots().ToList();

            UserInterface.DisplayShotsTable(shots);
            Shot shot = new Shot();

            shot.Name = UserInterface.GetStringData("name", "of new shot");
            Query.AddShot(shot);
            Console.Clear();
        }
예제 #2
0
        private void CheckShots(Animal animal)
        {
            List <string> shotInfo = new List <string>();
            var           shots    = Query.GetShots(animal);

            foreach (AnimalShot shot in shots.ToList())
            {
                shotInfo.Add($"{shot.Shot.Name} Date: {shot.DateReceived}");
            }

            if (shotInfo.Count > 0)
            {
                UserInterface.DisplayUserOptions(shotInfo);
            }
            if (UserInterface.GetBitData("Would you like to Update shots?"))
            {
                var nameshots = Query.DisplayShots().ToList();
                UserInterface.DisplayShotsTable(nameshots);
                string shotToAdd = UserInterface.GetStringData("the animal received", "the shot");
                Query.UpdateShot(shotToAdd, animal);
            }
        }