public PartialViewResult AdminAddUserToGroupRoleForm(string groupName) { var vm = new AddUserToGroupRoleModel(); vm.GroupName = groupName; return(PartialView("_PartialAddUserToGroupRoleForm", vm)); }
public PartialViewResult AdminAddUserToGroupRoleForm(int groupId) { using (var db = new ZapContext()) { var g = db.Groups.FirstOrDefault(grp => grp.GroupId == groupId); var groupName = ""; if (g == null) { // TODO: handle group not found } groupName = g.GroupName; var vm = new AddUserToGroupRoleModel(); vm.GroupName = groupName; return(PartialView("_PartialAddUserToGroupRoleForm", vm)); } }