示例#1
0
        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)));
        }
示例#2
0
        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,
            }));
        }