Пример #1
0
        //Update
        public bool UpdateExistingDeveloper(string originalID, Developers newID)
        {
            //Find content
            Developers oldID = GetDeveloperByID(originalID);

            //Update content
            if (oldID != null)
            {
                oldID.Name                 = newID.Name;
                oldID.IDNumber             = newID.IDNumber;
                oldID.HasPluralSightAccess = newID.HasPluralSightAccess;

                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        //Delete
        public bool RemoveDeveloperFromList(string iD)
        {
            Developers developer = GetDeveloperByID(iD);

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

            int initialCount = _developerDirectory.Count;

            _developerDirectory.Remove(developer);

            if (initialCount > _developerDirectory.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
 //Create
 public void AddDeveloperToList(Developers developer)
 {
     _developerDirectory.Add(developer); //Fields have underscores. Properties don't
 }