public void AddconcertToList(Outing newEventItem)
 {
     _ConcertList.Add(newEventItem);
 }
 public void AddAPToList(Outing newEventItem)
 {
     _APList.Add(newEventItem);
 }
 public void AddBowlingToList(Outing newEventItem)
 {
     _BowlingList.Add(newEventItem);
 }
 public void AddGolfToList(Outing newEventItem)
 {
     _GolfList.Add(newEventItem);
 }
 //This will allow the user to add a new menu item to the menu
 public void AddEventToList(Outing newEventItem)
 {
     _EventList.Add(newEventItem);
 }
Beispiel #6
0
 public ProgramUI()
 {
     _outingRepo = new OutingRepository();
     _outing     = new Outing();
 }
Beispiel #7
0
        private void AddNewOutingToList()
        {
            Console.Clear();
            EventType TheEventType = new EventType();

            Console.WriteLine("What is the type of Event?\n" +
                              "1. Golf\n" +
                              "2. Bowling\n" +
                              "3. Amusement Park\n" +
                              "4. Concert");
            string userinputOfTypeOfEvent = Console.ReadLine();
            int    NumberofEvent          = int.Parse(userinputOfTypeOfEvent);

            switch (NumberofEvent)
            {
            case 1:
                TheEventType = EventType.Golf;
                break;

            case 2:
                TheEventType = EventType.Bowling;
                break;

            case 3:
                TheEventType = EventType.Amusement_Park;
                break;

            case 4:
                TheEventType = EventType.Concert;
                break;
            }

            Console.WriteLine("How many people were in attendance?");
            int AttendanceAtEvent = int.Parse(Console.ReadLine());

            Console.WriteLine("What was the date of the event? DD/MM/YYYY");
            DateTime dateTime = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("What was the cost of the event in total?");
            decimal CostofWholeEvent = decimal.Parse(Console.ReadLine());

            decimal TotalCostofEventPerPerson = CostofWholeEvent / AttendanceAtEvent;

            Outing EventToList = new Outing(AttendanceAtEvent, dateTime, TotalCostofEventPerPerson, CostofWholeEvent, TheEventType);

            switch (NumberofEvent)
            {
            case 1:
                _outingRepo.AddGolfToList(EventToList);
                break;

            case 2:
                _outingRepo.AddBowlingToList(EventToList);
                break;

            case 3:
                _outingRepo.AddAPToList(EventToList);
                break;

            case 4:
                _outingRepo.AddconcertToList(EventToList);
                break;
            }
            _outingRepo.AddEventToList(EventToList);

            Console.WriteLine("Event was successfully added to the list please press any key to continue.");
            Console.ReadKey();
        }
Beispiel #8
0
 public void AddOutingToList(Outing outing)
 {
     _outing.Add(outing);
 }