//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(); } }
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 }; }
public void SaveAssignment(int projectId) { var projectUser = new ProjectUser { Id = Id, UserId = UserId, ProjectId = projectId, ProjectRoleId = RoleId, }; ProjectManagementService.AssingRole(projectUser); }
public ProjectUserListViewModel FromProjectUser(ProjectUser projectUser, string htmlLinks) { var model = FromProjectUser(projectUser); model.Action = new HtmlString(htmlLinks); return model; }