Exemplo n.º 1
0
        public ActionResult Index(string buscar, int pageNumber = 1)
        {
            var paged = _alunoappservice.ObterTodosAlunos(buscar, PageSize, pageNumber);

            ViewBag.TotalCount = Math.Ceiling((double)paged.Count / PageSize);
            ViewBag.PageNumber = pageNumber;
            ViewBag.SearchData = buscar;
            ViewBag.Count      = paged.Count;

            return(View(paged.List));
        }
Exemplo n.º 2
0
        public ActionResult BuscarTodosAlunos(Guid id, string buscar, int pageNumber = 1)
        {
            var paged = _alunoappservice.ObterTodosAlunos(buscar, PageSize, pageNumber);

            ViewBag.TotalCount = Math.Ceiling((double)paged.Count / PageSize);
            ViewBag.PageNumber = pageNumber;
            ViewBag.SearchData = buscar;
            ViewBag.Count      = paged.Count;

            _paged          = paged;
            ViewBag.TurmaId = id;
            Turmaid         = id;

            return(PartialView("_BuscarAlunos", paged.List));
        }