Beispiel #1
0
        public ActionResult Comprobantes(int? idTipoComprobante = null, string sortOrder = null, string currentFilter = null, string searchString = null, int? page = null)
        {
            if (!this.currentUser()) { return RedirectToAction("Ingresar"); }
            ViewBag.Title = "Comprobantes";
            MenuNavBarSelected(2);

            UsuarioDTO currentUser = getCurrentUser();

            ComprobanteBL objBL = new ComprobanteBL();
            List<ComprobanteDTO> listaIngresos = new List<ComprobanteDTO>();
            List<ComprobanteDTO> listaEgresos = new List<ComprobanteDTO>();
            ViewBag.lstTipoComprobantes = objBL.getTipoDeComprobantes();
            ViewBag.idTipoComprobante = idTipoComprobante;

            if (currentUser.IdEmpresa > 0)
            {
                listaIngresos = objBL.getComprobantesEnEmpresaPorTipo(currentUser.IdEmpresa, 1);
                listaEgresos = objBL.getComprobantesEnEmpresaPorTipo(currentUser.IdEmpresa, 2);
                List<IPagedList<ComprobanteDTO>> matrix = new List<IPagedList<ComprobanteDTO>>();
                matrix.Add(BusquedaYPaginado_Comprobantes(listaIngresos, sortOrder, currentFilter, searchString, page));
                matrix.Add(BusquedaYPaginado_Comprobantes(listaEgresos, sortOrder, currentFilter, searchString, page));
                return View(matrix);
            }
            return View();
        }