public void OnGet(long id) { Command = _roleApplication.GetDetails(id); var permissions = new List <PermissionDto>(); foreach (var exposition in _exposition) { var exposedPermissions = exposition.Expose(); foreach (var(key, value) in exposedPermissions) { permissions.AddRange(value); var group = new SelectListGroup { Name = key }; foreach (var permission in value) { var item = new SelectListItem(permission.Name, permission.Code.ToString()) { Group = group }; if (Command.MappedPermissions.Any(x => x.Code == permission.Code)) { item.Selected = true; } Permissions.Add(item); } } } }
public void OnGet(long id) { Role = _roleApplication.GetDetails(id); Permissions = new List <SelectListItem>(); foreach (var exposer in _permissionExposer) { var exposedPermission = exposer.Expose(); foreach (var(key, value) in exposedPermission) { var group = new SelectListGroup() { Name = key }; foreach (var permission in value) { var item = new SelectListItem(permission.Name, permission.Code.ToString()) { Group = group }; if (Role.MappedPermissions.Any(x => x.Code == permission.Code)) { item.Selected = true; } Permissions.Add(item); } } } }
public void OnGet(long id) { Command = _roleApplication.GetDetails(id); }
public IActionResult OnGetEdit(long id) { var account = _roleApplication.GetDetails(id); return(Partial("Edit", account)); }
public IActionResult OnGetEdit(long id) { var role = _roleApplication.GetDetails(id); return(Partial("./Edit", role)); }