Пример #1
0
        public ActionResult GetActionInfoList()
        {
            int pageIndex      = int.Parse(Request["page"]);
            int pageSize       = int.Parse(Request["rows"]);
            int totalCount     = 0;
            var ActionInfoList = actionInfoService.LoadPageEntities(pageIndex, pageSize, out totalCount, s => s.DelFlag == "False", a => a.ActionInfoName, true).ToList();
            var rows           = (from a in ActionInfoList select new { ID = a.ID, ActionInfoName = a.ActionInfoName, Remark = a.Remark, Url = a.Url, HttpMethod = a.HttpMethod, SubTime = a.SubTime }).ToList();

            return(Json(new { rows = rows, totalCount = totalCount }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetActionInfo()
        {
            int   pageIndex = int.Parse(Request["page"]);
            int   pageSize  = int.Parse(Request["rows"]);
            int   totalCount;
            short delFlag        = (short)DeleteEnumType.Normal;
            var   actionInfoList = actionInfoService.LoadPageEntities <int>(pageIndex, pageSize, out totalCount, r => r.DelFlag == delFlag, r => r.ID, true);
            var   rows           = from r in actionInfoList
                                   select new { ID = r.ID, ActionInfoName = r.ActionInfoName, Sort = r.Sort, Remark = r.Remark, SubTime = r.SubTime, HttpMethod = r.HttpMethod, ActionTypeEnum = r.ActionTypeEnum, Url = r.Url };

            return(Json(new { rows = rows, total = totalCount }, JsonRequestBehavior.AllowGet));
        }