コード例 #1
0
        //U update
        public bool UpdateTeams(string teamName, DeveloperTeam newTeam)
        {
            DeveloperTeam oldTeams = GetTeamByName(teamName); //creates new instance of the developerTeam with the Team name which is set equal to the names

            if (oldTeams != null)
            {
                oldTeams.TeamId      = newTeam.TeamId;
                oldTeams.TeamName    = newTeam.TeamName;
                oldTeams.TeamMembers = newTeam.TeamMembers;
                return(true);
            }

            else
            {
                return(false);
            }
        }
コード例 #2
0
        //C -create

        public DeveloperTeam AddTeams(DeveloperTeam teams) // add teams to directory
        {
            __teamDirectory.Add(teams);
            return(teams);
        }
コード例 #3
0
        //D Delete
        public bool DeleteTeams(DeveloperTeam existingTeam)
        {
            bool deleteTeam = __teamDirectory.Remove(existingTeam); // the bool that is true if team is successfully otherwise the bool will return false;

            return(deleteTeam);
        }