示例#1
0
        public IActionResult Listagem(string tipoFiltro, string filtro)
        {
            FiltrosEmprestimos objFiltro = null;

            if (!string.IsNullOrEmpty(filtro))
            {
                objFiltro            = new FiltrosEmprestimos();
                objFiltro.Filtro     = filtro;
                objFiltro.TipoFiltro = tipoFiltro;
            }
            EmprestimoService EmprestimoService = new EmprestimoService();

            return(View(EmprestimoService.ListarTodos(objFiltro)));
        }
示例#2
0
        public IActionResult Listagem(string tipoFiltro, string filtro)
        {
            Autenticacao.CheckLogin(this);
            FiltrosEmprestimos objFiltro = null;

            if (!string.IsNullOrEmpty(filtro))
            {
                objFiltro            = new FiltrosEmprestimos();
                objFiltro.Filtro     = filtro;
                objFiltro.TipoFiltro = tipoFiltro;
            }
            EmprestimoService emprestimoService = new EmprestimoService();

            return(View(emprestimoService.ListarTodos(objFiltro)));
        }
        public IActionResult Listagem(string tipoFiltro, string filtro)
        {
            FiltrosEmprestimos objFiltro = null;

            if (!string.IsNullOrEmpty(filtro))
            {
                objFiltro            = new FiltrosEmprestimos();
                objFiltro.Filtro     = filtro;
                objFiltro.TipoFiltro = tipoFiltro;
            }
            EmprestimoService        emprestimoService = new EmprestimoService();
            ICollection <Emprestimo> emprestimos       = emprestimoService.ListarTodos(objFiltro);

            if (emprestimos.Count == 0)
            {
                ViewData["Mensagem02"] = "Nenhum registro encontrado";
            }
            return(View(emprestimos));
        }
        public IActionResult Listagem(string tipoFiltro, string filtro, string itensPorPagina, int numDaPagina, int PaginaAtual)
        {
            Autenticacao.CheckLogin(this);
            FiltrosEmprestimos objFiltro = null;

            if (!string.IsNullOrEmpty(filtro))
            {
                objFiltro            = new FiltrosEmprestimos();
                objFiltro.Filtro     = filtro;
                objFiltro.TipoFiltro = tipoFiltro;
            }

            ViewData["emprestimosPorPagina"] = (string.IsNullOrEmpty(itensPorPagina) ? 10 : int.Parse(itensPorPagina));
            ViewData["PaginaAtual"]          = (PaginaAtual != 0 ? PaginaAtual : 1);

            EmprestimoService emprestimoService = new EmprestimoService();

            return(View(emprestimoService.ListarTodos(objFiltro)));
        }
        public IActionResult Listagem(int page, string tipoFiltro, string filtro)
        {
            Autenticacao.CheckLogin(this);
            ViewBag.pageAtual = page > 1 ? page : 1;
            FiltrosEmprestimos objFiltro = null;

            if (!string.IsNullOrEmpty(filtro))
            {
                objFiltro            = new FiltrosEmprestimos();
                objFiltro.Filtro     = filtro;
                objFiltro.TipoFiltro = tipoFiltro;
            }
            EmprestimoService emprestimoService = new EmprestimoService();

            ViewBag.dataNow    = DateTime.Now;
            ViewBag.Filtro     = string.IsNullOrEmpty(filtro) ? null : filtro;
            ViewBag.TipoFiltro = string.IsNullOrEmpty(tipoFiltro) ? null : tipoFiltro;
            return(View(emprestimoService.ListarTodos(objFiltro)));
        }