コード例 #1
0
        private void AddOutings()
        {
            Console.WriteLine("what is the event type?");
            var type = Console.ReadLine();

            Console.WriteLine("how many people attended the event?");
            var number = int.Parse(Console.ReadLine());

            Console.WriteLine("what is the date of the event?");
            var date = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("what is the individual cost?");
            var personCost = decimal.Parse(Console.ReadLine());

            Console.WriteLine("what is the total event cost?");
            var    eventCost = decimal.Parse(Console.ReadLine());
            Outing newOuting = new Outing()
            {
                EventType      = type,
                PeopleAttended = number,
                Date           = date,
                PersonCost     = personCost,
                EventCost      = eventCost,
            };

            _contentOuting.AddEventsToOuting(newOuting);
        }