public async Task <ActionResult> DetailsSysRole(Guid?id) { var sysRoleService = new SysRoleService(); if (id == null || !await sysRoleService.ExistsSysRole(id.Value)) { return(RedirectToAction(nameof(SysRoleList))); } return(View(await sysRoleService.GetOneSysRoleById(id.Value))); }
public async Task <ActionResult> EditSysRole(Guid id) { var sysRoleService = new SysRoleService(); var data = await sysRoleService.GetOneSysRoleById(id); return(View(new SysRoleViewModel() { Id = data.Id, RoleName = data.RoleName, SortOrder = data.SortOrder, })); }