예제 #1
0
        public ActionResult Edit(int id)
        {
            var model = Moduls.ModulInfoToVModel(Moduls.GetModulInfo(id));

            if (model.PId != 0)
            {
                model.PName = Moduls.GetModulInfo(model.PId).ModulName;
            }

            return(View(model));
        }
예제 #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));
        }
예제 #3
0
        public ActionResult Edit(int id)
        {
            var model = Moduls.ModulInfoToVModel(Moduls.GetModulInfo(id));

            return(View(model));
        }