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

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

            return(wasAdded);
        }
Exemple #2
0
        public bool UpdateExistingContent(string originalLastName, CarInContent updatedContent)
        {
            CarInContent oldContent = GetContentByLastName(originalLastName);

            if (oldContent != null)
            {
                oldContent.Id               = updatedContent.Id;
                oldContent.LastName         = updatedContent.LastName;
                oldContent.Age              = updatedContent.Age;
                oldContent.EnrollmentDate   = updatedContent.EnrollmentDate;
                oldContent.TypeOfMembership = updatedContent.TypeOfMembership;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemple #3
0
        public bool DeleteExistingContent(CarInContent carInContent)
        {
            bool deleteResult = _contentDirectory.Remove(carInContent);

            return(deleteResult);
        }