Example #1
0
        public bool AddContentToDirectory(CustomerContent content)
        {
            int startingCount = _contentDirectory.Count;

            _contentDirectory.Add(content);

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

            return(wasAdded);
        }
Example #2
0
        public bool UpdateExistingContent(string originalfirstName, CustomerContent newContent)
        {
            CustomerContent oldContent = FindPersonByName(originalfirstName);

            if (oldContent != null)
            {
                oldContent.FirstName = newContent.FirstName;
                oldContent.LastName  = newContent.LastName;
                oldContent.Type      = newContent.Type;
                oldContent.Email     = newContent.Email;
                return(true);
            }
            else
            {
                {
                    return(false);
                }
            }
        }
Example #3
0
        public bool DeleteCustomerByName(CustomerContent existingContent)
        {
            bool deleteResult = _contentDirectory.Remove(existingContent);

            return(deleteResult);
        }