/*jquery easyui 数据格式{total:22,rows:[]}*/ int pageIndex = Request["page"] == null ? 1 : int.Parse(Request["page"]); int pageSize = Request["rows"] == null ? 13 : int.Parse(Request["rows"]); String userName = Request["UserName"]; String userPwd = Request["UserPwd"]; UserInfoSearchParams pParams = new UserInfoSearchParams { PageIndex = pageIndex, PageSize = pageSize, Total = 0, UserPwd = userPwd, UserName = userName }; var userInfoList = _userInfoService.GetUserInfos(pParams); //var userInfoList = _userInfoService.GetPagerEntites(pageSize, pageIndex, out totalCount, u =>u.UserInfoId==userInfoId&&u.UserName==userName , u => u.UserInfoId, true); //如果有循环依赖 会报exception 1.构造新的列 2.json.net var data = new { total = pParams.Total, rows = from user in userInfoList select new { user.UserInfoId, user.UserName, user.UserPwd, user.DelFlag, user.SubTime, user.LastLogoutDate, user.LastLoginIp } }; return Json(data, JsonRequestBehavior.AllowGet);
http://www.jeasyui.com/documentation/index.php