Пример #1
0
 protected void AddTeamToProject(Project project, List <Guid> team)
 {
     foreach (var user in team.Select(r => ParticipantEngine.GetByID(r)))
     {
         ProjectEngine.AddToTeam(project, user, false);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
        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);
            }
        }
Пример #4
0
 public void InitTest()
 {
     Project = ProjectEngine.SaveOrUpdate(DataGenerator.GenerateProject(Admin), false);
     ProjectEngine.AddToTeam(Project, From, false);
 }