示例#1
0
        private void SeeCosts()
        {
            Console.Clear();

            List <Outing> masterList    = new List <Outing>();
            List <Outing> golfList      = _repo.GetGolfList();
            List <Outing> bowlingList   = _repo.GetBowlingList();
            List <Outing> themeParkList = _repo.GetThemeParkList();
            List <Outing> concertList   = _repo.GetConcertList();

            Console.WriteLine("Which events would you like costs of? \n[1) All Events 2) Golf 3) Bowling 4) Theme Parks 5) Concerts");
            int userDisplaySelection = int.Parse(Console.ReadLine());

            switch (userDisplaySelection)
            {
            case 1:
                decimal golfCost      = _repo.CostOfGolfEvents();
                decimal bowlingCost   = _repo.CostOfBowlingEvents();
                decimal themeParkCost = _repo.CostOfThemeParkEvents();
                decimal concertCost   = _repo.CostOfConcertEvents();

                decimal totalCost = golfCost + bowlingCost + themeParkCost + concertCost;
                Console.WriteLine($"Total cost is ${totalCost}");
                Console.ReadKey();
                break;

            case 2:
                decimal totalGolfCost = _repo.CostOfGolfEvents();
                Console.WriteLine($"{totalGolfCost}");
                break;

            case 3:
                decimal totalBowlingCost = _repo.CostOfBowlingEvents();
                Console.WriteLine($"{totalBowlingCost}");
                break;

            case 4:
                decimal totalThemeParkCost = _repo.CostOfThemeParkEvents();
                Console.WriteLine($"{totalThemeParkCost}");
                break;

            case 5:
                decimal totalConcertCost = _repo.CostOfConcertEvents();
                Console.WriteLine($"{totalConcertCost}");
                break;

            default:
                break;
            }
        }