コード例 #1
0
        private void AddProduct()
        {
            Outings outings = new Outings();

            Console.WriteLine("Hi,enter the type of outing\n" +
                              "1.Golf\n" +
                              "2.Bowling\n" +
                              "3.Amusement Park\n" +
                              "4. Concert");
            string outingsTypeAsString = Console.ReadLine().ToLower();

            Console.WriteLine("How many people attended the event?");
            outings.NumberOfPeopleAttended = int.Parse(Console.ReadLine());

            Console.WriteLine("write the date?");
            outings.Date = Console.ReadLine();

            Console.WriteLine("Enter the total cost per person");
            outings.TotalCostPerEvent = decimal.Parse
                                            (Console.ReadLine());


            _outingsRepo.AddProduct(outings);
        }
コード例 #2
0
 public void AddProduct(Outings newoutings)
 {
     _outingsList.Add(newoutings);
 }