protected void AddTeamToProject(Project project, List <Guid> team) { foreach (var user in team.Select(r => ParticipantEngine.GetByID(r))) { ProjectEngine.AddToTeam(project, user, false); } }
private void AddToTeam(Project project, Guid userId) { if (!FromUserProjects.Exists(r => r.ID == project.ID) && !ToUserProjects.Exists(r => r.ID == project.ID)) { ProjectEngine.AddToTeam(project, userId, false); ToUserProjects.Add(project); } }
private void ReplaceTeam(Guid fromUserId, Guid toUserId) { foreach (var project in FromUserProjects) { var teamSecurity = ProjectEngine.GetTeamSecurity(project, fromUserId); if (!ToUserProjects.Exists(r => r.ID == project.ID)) { ProjectEngine.AddToTeam(project, toUserId, false); ProjectEngine.SetTeamSecurity(project, toUserId, teamSecurity); } ProjectEngine.RemoveFromTeam(project, fromUserId, false); } }
public void InitTest() { Project = ProjectEngine.SaveOrUpdate(DataGenerator.GenerateProject(Admin), false); ProjectEngine.AddToTeam(Project, From, false); }