private void SeedOutingList()
        {
            //Golf
            WorkOuting firstGolf = new WorkOuting(EventType.Golf, 25, new DateTime(2019, 10, 02), 45.00m);

            _outingList.AddOuting(firstGolf);
            WorkOuting secondGolf = new WorkOuting(EventType.Golf, 25, new DateTime(2019, 08, 15), 38.00m);

            _outingList.AddOuting(secondGolf);

            //Parks
            WorkOuting firstAmusementPark = new WorkOuting(EventType.AmusementPark, 40, new DateTime(2019, 07, 31), 32.50m);

            _outingList.AddOuting(firstAmusementPark);
            WorkOuting secondAmusementPark = new WorkOuting(EventType.AmusementPark, 40, new DateTime(2019, 09, 02), 42.00m);

            _outingList.AddOuting(secondAmusementPark);

            //Bowling
            WorkOuting firstBowling = new WorkOuting(EventType.Bowling, 35, new DateTime(2020, 01, 16), 17.99m);

            _outingList.AddOuting(firstBowling);
            WorkOuting secondBowling = new WorkOuting(EventType.Bowling, 35, new DateTime(2019, 11, 07), 21.50m);

            _outingList.AddOuting(secondBowling);

            //Concerts
            WorkOuting firstConcert = new WorkOuting(EventType.Concert, 38, new DateTime(2019, 05, 22), 32.50m);

            _outingList.AddOuting(firstConcert);
            WorkOuting secondConcert = new WorkOuting(EventType.Concert, 38, new DateTime(2019, 06, 11), 36.99m);

            _outingList.AddOuting(secondConcert);
        }
        public void AddNewCompanyOuting()
        {
            Console.Clear();

            WorkOuting newOuting = new WorkOuting();

            Console.WriteLine("What Type Of Outing Are You Planning? (1 = Golf, 2 = Bowling, 3 = Amusement Park , 4 = Concert)");
            string typeOfOutingString = Console.ReadLine();
            int    typeOfOutingInt    = int.Parse(typeOfOutingString);

            newOuting.TypeOfEvent = (EventType)typeOfOutingInt;

            Console.WriteLine("How Many People Are Attending?");
            string numberOfAttendeesString = Console.ReadLine();
            int    numberOfAtendeesInt     = int.Parse(numberOfAttendeesString);

            newOuting.NumberOfAttendees = numberOfAtendeesInt;

            Console.WriteLine("What Is The Date Of The Event?");
            string   dateAsString = Console.ReadLine();
            DateTime dateOfEvent  = DateTime.Parse(dateAsString);

            newOuting.DateOfEvent = dateOfEvent;

            Console.WriteLine("What Is The Cost Per Person?");
            string  costAsString  = Console.ReadLine();
            decimal costAsDecimal = decimal.Parse(costAsString);

            newOuting.CostPerPerson = costAsDecimal;

            _outingList.AddOuting(newOuting);

            Console.WriteLine("Outing Has Been Added!");
        }
Пример #3
0
 public void AddOuting(WorkOuting newOuting)
 {
     _listOfOutingsRepo.Add(newOuting);
 }