예제 #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
 }