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