public bool AddContentToDirectory(AmusementParks content) { int startingCount = _contentDirectory.Count; _contentDirectory.Add(content); bool wasAdded = (_contentDirectory.Count > startingCount) ? true : false; return(wasAdded); }
public bool UpdateExistingContent(string originalTitle, AmusementParks newContent) { AmusementParks oldContent = GetContentByTitle(originalTitle); if (oldContent != null) { oldContent.NameOfEvent = newContent.NameOfEvent; oldContent.NumberOfPeople = newContent.NumberOfPeople; oldContent.CostPerPerson = newContent.CostPerPerson; oldContent.CostOfEntireEvent = newContent.CostOfEntireEvent; oldContent.Date = newContent.Date; oldContent.CostOfAllEvents = newContent.CostOfAllEvents; return(true); } else { return(false); } }
public bool DeleteExistingContent(AmusementParks existingContent) { bool deleteResult = _contentDirectory.Remove(existingContent); return(deleteResult); }