public ActionResult GetActionInfo() { int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1; int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 5; int totalCount; bool Qx = Request["Qx"] != null?Convert.ToBoolean(Request["Qx"]) : false; short delFlag = (short)DelFlagEnum.Normarl; var actioninfolist = ActionInfoService.LoadPageEntities <string>(pageIndex, pageSize, out totalCount, a => a.DelFlag == delFlag, a => a.Url, true); if (Qx) { actioninfolist = ActionInfoService.LoadPageEntities <string>(pageIndex, pageSize, out totalCount, a => a.DelFlag == delFlag && a.ActionTypeEnum == 1, a => a.Url, true); } var temp = from a in actioninfolist select new { ID = a.ID, ActionInfoName = a.ActionInfoName, Sort = a.Sort, Remark = a.Remark, Url = a.Url, HttpMethod = a.HttpMethod, ActionTypeEnum = a.ActionTypeEnum, SubTime = a.SubTime }; return(Json(new { rows = temp, total = totalCount }, JsonRequestBehavior.AllowGet)); }