コード例 #1
0
        public bool UpdateExistingTeams(string originalTeam, DevTeams newteam)
        {
            DevTeams oldTeam = GetTeamByName(originalTeam);

            if (oldTeam != null)
            {
                oldTeam.TeamName = newteam.TeamName;
                oldTeam.TeamId   = newteam.TeamId;

                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        public bool AddDeveloperToTeam(Developers developer, string teamName)
        {
            DevTeams teams = GetTeamByName(teamName);

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

            if (developer == null)
            {
                return(false);
            }
            else
            {
                teams.listOfTeamMembers.Add(developer);

                return(true);
            }
        }
コード例 #3
0
        public bool RemoveTeamFromList(string teamName)
        {
            DevTeams team = GetTeamByName(teamName);

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

            int initialCount = _listOfTeams.Count;

            _listOfTeams.Remove(team);

            if (initialCount > _listOfTeams.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
 public void AddTeamToList(DevTeams team)
 {
     _listOfTeams.Add(team);
 }