//Update public bool UpdateOuting(string originalOuting, Outings newOuting) { Outings oldOuting = GetOutingByName(originalOuting); if (oldOuting != null) { oldOuting.OutingName = newOuting.OutingName; oldOuting.TypeOfOuting = newOuting.TypeOfOuting; oldOuting.NumberOfPeople = newOuting.NumberOfPeople; oldOuting.Date = newOuting.Date; oldOuting.CostPerPerson = newOuting.CostPerPerson; return(true); } else { return(false); } }
//Delete public bool RemoveOuting(string name) { Outings outing = GetOutingByName(name); if (outing == null) { return(false); } int initialCount = _listOfOutings.Count; _listOfOutings.Remove(outing); if (initialCount > _listOfOutings.Count) { return(true); } else { return(false); } }
//Create Outing public void AddOuting(Outings outing) { _listOfOutings.Add(outing); }