示例#1
0
        //Update
        public bool UpdateExistingTeam(string originalID, DevTeam newTeam)
        {
            DevTeam oldTeam = GetTeamByID(originalID);

            if (oldTeam != null)
            {
                oldTeam.TeamID      = newTeam.TeamID;
                oldTeam.TeamName    = newTeam.TeamName;
                oldTeam.TeamMembers = newTeam.TeamMembers;
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        //Delete
        public bool RemoveTeamFromList(string teamID)
        {
            DevTeam team = GetTeamByID(teamID);

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

            int initialCount = _listOfDevTeams.Count;

            _listOfDevTeams.Remove(team);

            if (initialCount > _listOfDevTeams.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
        public void AddDeveloperToTeam(Developer person, string teamID)
        {
            DevTeam team = GetTeamByID(teamID);

            team.TeamMembers.Add(person);
        }
示例#4
0
 //Create
 public void AddTeamToList(DevTeam team)
 {
     _listOfDevTeams.Add(team);
 }