示例#1
0
        //Update
        public bool UpdateExistingDevTeam(string originalName, DevTeam newDevTeam)
        {
            DevTeam oldDevTeam = GetDevTeamByName(originalName);

            if (oldDevTeam != null)
            {
                oldDevTeam.TeamName   = newDevTeam.TeamName;
                oldDevTeam.TeamNumber = newDevTeam.TeamNumber;
                oldDevTeam.Members    = newDevTeam.Members;

                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        //Delete - returns false
        public bool RemoveDevTeamFromList(string name)
        {
            DevTeam devTeam = GetDevTeamByName(name);

            if (devTeam == null)
            {
                return(false);
            }
            int initialCount = _listOfDevTeams.Count;

            _listOfDevTeams.Remove(devTeam);
            if (initialCount > _listOfDevTeams.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
 //Create
 public void AddDevTeamToList(DevTeam devTeam)
 {
     _listOfDevTeams.Add(devTeam);
 }