Exemple #1
0
        public ActionResult GetAllActionInfos()
        {
            //jquery easyui:table:{total:32,row:[{},{}]}
            // easyui:table 在初始化的时候自动发送以下俩个参数值
            int pageSize  = int.Parse(Request["rows"] ?? "10");
            int pageIndex = int.Parse(Request["page"] ?? "1");
            int total     = 0;

            //拿到当前页的数据
            var temp = ActionInfoService.GetPageEntities(pageSize, pageIndex,
                                                         out total, u => u.DelFlag == delflagNormal, u => u.Id,
                                                         true);
            var tempData = temp.Select(a => new
            {
                a.Id,
                a.IsMenu,
                a.Url,
                a.Remark,
                a.Sort,
                a.SubTime,
                a.ModfiedOn,
                a.HttpMethd,
                a.MenuIcon,
                a.ActionName
            });

            var data = new { total = total, rows = tempData.ToList() };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetAllActionInfos()
        {
            int pageSize  = int.Parse(Request["rows"] ?? "10");
            int pageIndex = int.Parse(Request["page"] ?? "1");
            int total     = 0;

            var temp = ActionInfoService.GetPageEntities(
                pageSize,
                pageIndex,
                out total,
                u => u.DelFlag == delFlagNormal,
                u => u.Id,
                true);
            var tempData = temp.Select(a => new { a.Id, a.IsMenu, a.Url, a.Remark, a.Sort, a.ActionName, a.ModfiliedOn, a.SubTime, a.HttpMethod, a.MenuIcon });
            var data     = new { total = total, rows = tempData.ToList() };

            return(Json(data, JsonRequestBehavior.AllowGet));
        }