Ejemplo n.º 1
0
        public ActionResult Demo(DemoViewModel vm, int?FirstPageIndex, int?SecondPageIndex)
        {
            int pageIndex       = FirstPageIndex.HasValue ? FirstPageIndex.Value : 0;
            int pageIndexSecond = SecondPageIndex.HasValue ? SecondPageIndex.Value : 0;
            int pageCount;
            int pageCountSecond;

            vm.DemoPagerViewModel        = DemoPagerViewModel.GetList(pageIndex, 5, out pageCount);
            vm.DemoPagerViewModel_Second = DemoPagerViewModel.GetList(pageIndexSecond, 5, out pageCountSecond);
            ViewBag.FirstPageCount       = pageCount;
            ViewBag.FirstPageIndex       = pageIndex;
            ViewBag.PageCountSecond      = pageCountSecond;
            ViewBag.PageIndexSecond      = pageIndexSecond;
            return(View(vm));
        }
Ejemplo n.º 2
0
        public ActionResult Demo()
        {
            //ViewBag.___IsReadonly___ = true;
            DemoViewModel vm = new DemoViewModel();
            int           pageCount;
            int           pageCountSecond;

            vm.DemoPagerViewModel        = DemoPagerViewModel.GetList(0, 5, out pageCount);
            vm.DemoPagerViewModel_Second = DemoPagerViewModel.GetList(0, 5, out pageCountSecond);
            ViewBag.FirstPageCount       = pageCount;
            ViewBag.FirstPageIndex       = 0;
            ViewBag.PageCountSecond      = pageCountSecond;
            ViewBag.PageIndexSecond      = 0;
            return(View(vm));
        }