public ActionResult AddUser() { var concernId = Convert.ToInt32(Session["ConcernId"]); var role = _context.UserRoles.Where(x => x.ConcernId == 1).ToList(); RoleUserViewModels viewModels = new RoleUserViewModels() { UserRoles = role }; return(View(viewModels)); }
public ActionResult EditUserRole(int id) { var concernId = Convert.ToInt32(Session["ConcernId"]); var role = _context.UserRoles.Where(x => x.ConcernId == 1).ToList(); var user = _context.SystemUsers.FirstOrDefault(x => x.UserID == id); RoleUserViewModels viewModels = new RoleUserViewModels() { UserRoles = role, SystemUser = user }; return(View(viewModels)); }