Ejemplo n.º 1
0
        public bool AddContentToDirectory(CarInContent content)
        {
            int startingCount = _contentDirectory.Count;

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

            return(wasAdded);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
        public bool DeleteExistingContent(CarInContent carInContent)
        {
            bool deleteResult = _contentDirectory.Remove(carInContent);

            return(deleteResult);
        }