Exemplo n.º 1
0
        public ActionResult AddUserToRole(string roleName)
        {
            var model = new RoleUsers() { RoleName = roleName };
            model.UserNames = Roles.GetUsersInRole(roleName);

            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult UsersInRole(string roleName)
        {
            RoleUsers model = new RoleUsers();

            model.RoleName = roleName;
            model.UserNames = Roles.GetUsersInRole(roleName);

            return View(model);
        }
Exemplo n.º 3
0
 public ActionResult AddUserToRole(RoleUsers model)
 {
     Roles.AddUserToRole(model.UserName, model.RoleName);
     return RedirectToAction("AddUserToRole", new { roleName = model.RoleName });
 }