public void GetOutingInfo() { KOutings newOuting = new KOutings(); Console.WriteLine("What is the outing type?\n\t" + "1. Golf\n\t" + "2. Bowling\n\t" + "3. Amusement Park\n\t" + "4. Concert\n\t" + "5. Other"); int outingInt = int.Parse(Console.ReadLine()); OutingType type = _kOutingsRepo.GetTypefromInt(outingInt); newOuting.TypeofOuting = type; Console.WriteLine("Enter the number of attendees"); decimal attendees = decimal.Parse(Console.ReadLine()); newOuting.Attendees = attendees; Console.WriteLine("Enter the date of the outing"); string date = Console.ReadLine(); newOuting.Date = date; Console.WriteLine("Enter the cost per person"); decimal costPerson = decimal.Parse(Console.ReadLine()); newOuting.CostPerson = costPerson; decimal costEvent = costPerson * attendees; newOuting.CostEvent = costEvent; _kOutingsRepo.AddOutingToList(newOuting); }
public void AddOutingToList(KOutings outing) { _outingsList.Add(outing); }