Example #1
0
        public ActionResult ChonLop(int id, int?page)
        {
            var model = dao.Get_Class();

            ViewBag.IDStudent = id;
            int pagesize   = 15;
            int pagenumber = (page ?? 1);

            return(View(model.ToPagedList(pagenumber, pagesize)));
        }
Example #2
0
 public ActionResult Index(string Search, int?page)
 {
     if (Session[Common.CommonConstant.USER_SESSION] != null)
     {
         var model = dao.Get_Class();
         ViewBag.Search = Search;
         if (!string.IsNullOrEmpty(Search))
         {
             model = dao.Search_Class(Search);
         }
         int pagesize   = 15;
         int pagenumber = (page ?? 1);
         return(View(model.ToPagedList(pagenumber, pagesize)));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }