public ActionResult Create(int projectId, int userId) { var model = new ProjectUserFormModel(); var projectUser = ProjectUserRepository.ProjectUserNew(projectId, userId); projectUser.RoleId = (int)Role.Collaborator; projectUser = ProjectUserRepository.ProjectUserSave(projectUser); return(this.RedirectToAction("Details", "Project", new { id = projectUser.ProjectId })); }
public ActionResult Create(int projectId) { var model = new ProjectUserFormModel(); var projectUser = ProjectUserRepository.ProjectUserNew(projectId, 0); model.Title = "Project User Create"; model.Users = UserRepository.UserFetchInfoList(); model.ProjectUser = projectUser; model.ProjectUsers = ProjectUserRepository.ProjectUserFetchInfoList(projectId); return(this.View(model)); }