private TripItem AddItem(string type, string name, string owner, decimal cost, int number) { if (TripItemsContain(type, name)) { return(GetTripItem(type, name)); } else { TripItem item = new TripItem(type, name, owner, cost, number); Children.Add(item); return(item); } }
public TripItem AddTripItem(TripItem tripItem) { if (!DaySet()) { return(null); } if (CurrentDayContainsChild(tripItem.Type, tripItem.Name)) { return(GetCurrentDayChild(tripItem.Type, tripItem.Name)); } else { List <TripItem> currentDay = Vacation[_currentDate]; currentDay.Add(tripItem); return(tripItem); } }
public override TripItem AddItemChild(TripItem tripItem) { Children.Add(tripItem); return(tripItem); }
public virtual TripItem AddItemChild(TripItem tripItem) { return(new TripItem("", "", "", 0, 0)); }
public override TripItem AddTickets(string name) { TripItem item = new TripItem(TICKETS, name, "", 0, 0); return(_vacationPlanner.AddTripItem(item)); }
public override TripItem AddSpecialEvent(string name) { TripItem item = new TripItem(SPECIAL_EVENT, name, "", 0, 0); return(_vacationPlanner.AddTripItem(item)); }
public override TripItem AddReservation(string reservationHolder, decimal cost, int number) { TripItem item = new TripItem(RESERVATION, "", reservationHolder, cost, number); return(_vacationPlanner.AddTripItem(item)); }
public override TripItem AddHotel(string name) { TripItem item = new TripItem(HOTEL, name, "", 0, 0); return(_vacationPlanner.AddTripItem(item)); }