Ejemplo n.º 1
0
        //
        // GET: /Student/

        public ActionResult Index(string SearchBy, string Search, int page = 1, int pageSize = 5)
        {
            List <Student> studentsList = StudentBL.GetAllStudents(SearchBy, Search, page, pageSize);

            // Variables for pagination
            ViewBag.SearchBy      = SearchBy;
            ViewBag.Search        = Search;
            ViewBag.page          = page;
            ViewBag.pageSize      = pageSize;
            ViewBag.totalStudents = StudentBL.GetAllStudentsCount();

            // Result
            return(View(studentsList));
        }