//update public bool UpdateOuting(Events originalEventType, OutingContent newOutingContent) { OutingContent oldOutingContent = GetOutingByType(originalEventType); if (oldOutingContent != null) { oldOutingContent.EventType = newOutingContent.EventType; oldOutingContent.AttendanceNumber = newOutingContent.AttendanceNumber; oldOutingContent.DateOfEvent = newOutingContent.DateOfEvent; oldOutingContent.CostPerPerson = newOutingContent.CostPerPerson; return(true); } else { return(false); } }
//delete public bool DeleteOuting(Events eventType) { OutingContent outingContent = GetOutingByType(eventType); if (outingContent == null) { return(false); } int initialCount = _outingContent.Count(); _outingContent.Remove(outingContent); if (initialCount > _outingContent.Count) { return(true); } else { return(false); } }
//create public void AddNewOuting(OutingContent content) { _outingContent.Add(content); }