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