Example #1
0
        public ActionResult BannerRead(int page = 1)
        {
            if (!CheckMemberlogin)
            {
                return RedirectToAction("login");
            }
            else
            {
                leftModel();
                var currentpage = page < 1 ? 1 : page;
                var pagesize = 10;
                var model = new BannerViewModel()
                {
                    Banner = band.Get().OrderBy(a => a.sort).ToPagedList(currentpage, pagesize)

                };

                return View(model);
            }
        }
Example #2
0
        public ActionResult BannerEdit(int num)
        {
            if (!CheckMemberlogin)
            {
                return RedirectToAction("login");
            }
            else
            {
                leftModel();
                var model = new BannerViewModel()
                {
                    Banner_nopage = band.Get().ToList().Where(a => a.num == num)

                };

                return View(model);
            }
        }