Beispiel #1
0
        //Update
        public bool UpdateDevContent(int originalID, DevContent newID)
        {
            //Find content
            DevContent oldID = GetDevContentByID(originalID);

            //Update content
            if (oldID != null)
            {
                oldID.IdentificationNumber = newID.IdentificationNumber;
                oldID.FullName             = newID.FullName;
                oldID.AccessPlural         = newID.AccessPlural;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        //Delete
        public bool RemoveDevFromList(int identificationNumber)
        {
            DevContent content = GetDevContentByID(identificationNumber);

            if (content == null)
            {
                return(false);
            }

            int initialCount = _listOfDevelopers.Count;

            _listOfDevelopers.Remove(content);

            if (initialCount > _listOfDevelopers.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
 //Create
 public void AddDevToList(DevContent content)
 {
     _listOfDevelopers.Add(content);
 }