public IActionResult UserData(SysUserSearchArg arg)
        {
            var parms    = Request.QueryString.ToTableParms();
            var pageList = _sysUserService.AdminSearch(arg, parms);

            if (pageList.Any())
            {
                foreach (var user in pageList)
                {
                    user.SysRoles = _sysRoleService.GetUserRoles(user.Id);
                }
            }
            var data = pageList.ToAjax();

            return(Json(data));
        }
Exemple #2
0
        public void OnGet(Guid id)
        {
            SysUser = _sysUserService.GetUserMapping(id);
            var userRoles = _sysRoleService.GetUserRoles();

            UserRoles = userRoles.Where(o => o.UserId == id).Distinct().ToList();
            Roles     = _sysRoleService.GetRoles();
        }
Exemple #3
0
 public void OnGet(Guid?id = null)
 {
     if (id.HasValue)
     {
         SysUser = _sysUserService.GetUserMapping(id.Value);
         var userRoles = _sysRoleService.GetUserRoles();
         UserRoles = userRoles.Where(o => o.UserId == id.Value).Distinct().ToList();
     }
     Roles = _sysRoleService.GetRoles();
 }
 public void OnGet(Guid id)
 {
     SysUser = _sysUserService.GetUserMapping(id);
     Roles   = _sysRoleService.GetUserRoles(id);
 }