public ActionResult Index(string ClassName) { ClassRoomService service = new ClassRoomService(); int pageNumber = 1; IPagedList <ClassRoom> classRooms = service.GetClassRoom(ClassName , pageNumber , 10 ); ViewBag.ClassName = ClassName; ViewBag.PageCurrent = pageNumber; return(View(classRooms)); }
public ActionResult Index(string ClassRoomName, int?CurrentPage) { ClassRoomService service = new ClassRoomService(); int pageNumber = CurrentPage ?? 1; IPagedList <ClassRoom> classRooms = service.GetClassRoom(ClassRoomName , pageNumber , 10 ); ViewBag.StudentCode = ClassRoomName; ViewBag.PageCurrent = CurrentPage; return(View(classRooms)); }