/// <summary> /// 获取权限的所有的信息 /// </summary> /// <returns></returns> public ActionResult GetActionUserInfoShow() { //首先获取前台传递过来的参数 int pageIndex = Request["page"] == null ? 1 : Convert.ToInt32(Request["page"]); int pageSize = Request["rows"] == null ? 10 : Convert.ToInt32(Request["rows"]); //获取前台传递过来的数据实现进行模糊查询 string SearchActionName = Request["SearchActionName"]; string SearchRequestHttpType = Request["SearchRequestHttpType"]; //定义对象,得到所有的参数值 GetModelQuery actionInfo = new GetModelQuery(); actionInfo.ActionName = SearchActionName; actionInfo.pageIndex = pageIndex; actionInfo.pageSize = pageSize; actionInfo.RequestHttpType = SearchRequestHttpType; actionInfo.total = 0; //调用方法,实现绑定所有的数据 var data = from c in _actioninfoService.LoadDataActionInfo(actionInfo) select new { c.ID, c.ActionName, c.ActionType, c.RequestUrl, c.RequestHttpType, c.SubTime }; //var data = _actioninfoService.LoadPagerEntities(pageSize, pageIndex, out total, c => true, true, e => e.ID); //获取前台需要的数据 var jsonResult = new { total = actionInfo.total, rows = data }; return(Json(jsonResult, JsonRequestBehavior.AllowGet)); }