コード例 #1
0
        //update
        public bool UpdateExistingContent(string origionalTeamMember, DevTeam newContent)
        {
            //Find the content
            DevTeam oldContent = GetContentByName(origionalTeamMember);

            //update the content
            if (oldContent != null)
            {
                oldContent.TeamMember  = newContent.TeamMember;
                oldContent.IdNumber    = newContent.IdNumber;
                oldContent.PluralSight = newContent.PluralSight;

                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        //delete
        public bool RemoveContentFromList(string teamMember)
        {
            DevTeam content = GetContentByName(teamMember);

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

            int initialcount = _listofteam.Count;

            _listofteam.Remove(content);

            if (initialcount > _listofteam.Count)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
 //Create
 public void AddContentToList(DevTeam content)
 {
     _listofteam.Add(content);
 }