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