Exemple #1
0
 private void DisplayOuting(OutingsDetails content)
 {
     Console.WriteLine($"Event Type: {content.EventType}\n" +
                       $"Number of Attendants: {content.NumAttend}\n" +
                       $"Date of Event: {content.DateAttend}\n" +
                       $"Total Cost per Person for the Event: {content.IndCost}\n" +
                       $"Total Cost for the Event: {content.TotCost}\n");
 }
Exemple #2
0
        public void AddOuting_BooleanShouldReturnTrue()
        {
            OutingsDetails           content    = new OutingsDetails();
            OutingsDetailsRepository repository = new OutingsDetailsRepository();
            bool addOuting = repository.AddOutingsDetails(content);

            Assert.IsTrue(addOuting);
            System.Console.WriteLine(addOuting);
        }
Exemple #3
0
        public void ShowAllOutings_BooleanShouldReturnTrue()
        {
            OutingsDetails           content    = new OutingsDetails();
            OutingsDetailsRepository repository = new OutingsDetailsRepository();

            repository.AddOutingsDetails(content);
            List <OutingsDetails> outingsList = repository.GetDetails();
            bool listHasOutings = outingsList.Contains(content);

            Assert.IsTrue(listHasOutings);
        }
Exemple #4
0
        private void AddOuting()
        {
            Console.Clear();
            OutingsDetails content = new OutingsDetails();

            Console.WriteLine("Add an outing to the list here.");
            Console.WriteLine("Please select the event type:\n" +
                              "1. Golf\n" +
                              "2. Bowling\n" +
                              "3. Amusement Park\n" +
                              "4. Concert\n");
            string eventType   = Console.ReadLine();
            int    eventNumber = int.Parse(eventType);

            content.EventType = (EventType)eventNumber;
            Console.WriteLine("Please enter the number of people that attended:");
            string attendInput  = Console.ReadLine();
            int    attendNumber = int.Parse(attendInput);

            content.NumAttend = attendNumber;
            Console.WriteLine("Please enter the date of the event:");
            string   dateEvent   = Console.ReadLine();
            DateTime dateNumbers = DateTime.Parse(dateEvent);

            content.DateAttend = dateNumbers;
            Console.WriteLine("Please enter the total cost per person:");
            string personCost   = Console.ReadLine();
            double personNumber = double.Parse(personCost);

            content.IndCost = personNumber;
            Console.WriteLine("Please enter the total cost of the outing:");
            string totalCost   = Console.ReadLine();
            double totalNumber = double.Parse(totalCost);

            content.TotCost = totalNumber;
            _outingsRepository.AddOutingsDetails(content);
        }
Exemple #5
0
 private void DisplayIndTotal(OutingsDetails content)
 {
     Console.WriteLine($"Total cost for all outings: { content.IndCost}");
 }