示例#1
0
        public bool AddContentToDirectory(Golf content)
        {
            int startingCount = _contentDirectory.Count;



            _contentDirectory.Add(content);

            bool wasAdded = (_contentDirectory.Count > startingCount) ? true : false;

            return(wasAdded);
        }
示例#2
0
        public bool UpdateExistingContent(string originalTitle, Golf newContent)
        {
            Golf 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);
            }
        }