コード例 #1
0
 //public void AssingRole(int userId, int projectId, int roleId)
 public void AssingRole(ProjectUser projectUser)
 {
     using (var repositoriesContainer = new LmPlatformRepositoriesContainer())
     {
         repositoriesContainer.ProjectUsersRepository.Save(projectUser);
         repositoriesContainer.ApplyChanges();
     }
 }
コード例 #2
0
ファイル: BTSController.cs プロジェクト: slaq777/lmsystem
        public ProjectUserListViewModel FromProjectUser(ProjectUser projectUser)
        {
            var context = new ProjectManagementService();

            return new ProjectUserListViewModel
            {
                Id = projectUser.Id,
                UserName = context.GetCreatorName(projectUser.User.Id),
                RoleName = GetRoleName(projectUser.ProjectRoleId),
                ProjectId = projectUser.ProjectId
            };
        }
コード例 #3
0
        public void SaveAssignment(int projectId)
        {
            var projectUser = new ProjectUser
            {
                Id = Id,
                UserId = UserId,
                ProjectId = projectId,
                ProjectRoleId = RoleId,
            };

            ProjectManagementService.AssingRole(projectUser);
        }
コード例 #4
0
ファイル: BTSController.cs プロジェクト: slaq777/lmsystem
        public ProjectUserListViewModel FromProjectUser(ProjectUser projectUser, string htmlLinks)
        {
            var model = FromProjectUser(projectUser);
            model.Action = new HtmlString(htmlLinks);

            return model;
        }