// GET: AgenteErgonomicos public ActionResult Index(string pesquisa, int page = 0) { var agenteErgonomicoViewModel = _agenteErgonomicoAppService.ObterGrid(page, pesquisa); ViewBag.PaginaAtual = page; ViewBag.Busca = "&pesquisa=" + pesquisa; ViewBag.Controller = "AgenteErgonomicos"; ViewBag.TotalRegistros = _agenteErgonomicoAppService.ObterTotalRegistros(pesquisa); return(View(agenteErgonomicoViewModel)); }
// GET: AgenteErgonomicos public ActionResult Index(string pesquisa, int page = 0) { if (Session["usuario"] == null) { return(RedirectToAction("Login", "Usuarios")); } var agenteErgonomicoViewModel = _agenteErgonomicoAppService.ObterGrid(page, pesquisa); ViewBag.PaginaAtual = page; ViewBag.Busca = "&pesquisa=" + pesquisa; ViewBag.Controller = "AgenteErgonomicos"; ViewBag.TotalRegistros = _agenteErgonomicoAppService.ObterTotalRegistros(pesquisa); return(View(agenteErgonomicoViewModel)); }