Example #1
0
        public ActionResult Index(int?page)
        {
            int pageIndex = page.HasValue ? page.Value : 1;
            int pageSize = PageConfig.BackstagePageSize;
            int count, pageCount;
            var result = Moduls.ModulInfosToVModels(Moduls.GetModulPageList(pageIndex, pageSize, null, null, out pageCount, out count));
            PagedList <ModulVModel> pl = result.ToPagedList(pageIndex, pageSize);

            pl.TotalItemCount   = count;
            pl.CurrentPageIndex = pageIndex;
            return(View(pl));
        }
Example #2
0
        public ActionResult Index(int?page)
        {
            int pageIndex = page.HasValue ? page.Value : 1;
            int pageSize = PageConfig.BackstagePageSize;
            int count, pageCount;
            var result = Moduls.ModulInfosToVModels(Moduls.GetModulPageList(pageIndex, pageSize, null, null, out pageCount, out count));

            result.ForEach(n => {
                if (n.PId != 0)
                {
                    var modulinfo = Moduls.GetModulInfo(n.PId);
                    if (modulinfo != null)
                    {
                        n.PName = modulinfo.ModulName;
                    }
                }
            });

            PagedList <ModulVModel> pl = result.ToPagedList(pageIndex, pageSize);

            pl.TotalItemCount   = count;
            pl.CurrentPageIndex = pageIndex;
            return(View(pl));
        }