public ActionResult ComprobantesEgreso() { if (!this.currentUser()) { return RedirectToAction("Ingresar"); } ViewBag.Title = "Comprobantes de Egreso"; MenuNavBarSelected(3, 1); UsuarioDTO user = getCurrentUser(); ComprobanteBL objBL = new ComprobanteBL(); int tipo = 2; //Egresos ViewBag.idTipoComprobante = tipo; if (user.IdEmpresa > 0) { List<ComprobanteDTO> lista = objBL.getComprobantesEnEmpresaPorTipo(user.IdEmpresa, tipo); return View(lista); } return View(); }
public ActionResult ComprobantesAnulados() { if (!this.currentUser()) { return RedirectToAction("Ingresar"); } ViewBag.Title = "Comprobantes Anulados"; MenuNavBarSelected(3, 2); UsuarioDTO user = getCurrentUser(); ComprobanteBL objBL = new ComprobanteBL(); //int tipo = 3; //Anulados //ViewBag.idTipoComprobante = tipo; if (user.IdEmpresa > 0) { List<ComprobanteDTO> lista = objBL.getComprobantesEnEmpresaPorTipo(user.IdEmpresa, 3); List<ComprobanteDTO> lista2 = objBL.getComprobantesEnEmpresaPorTipo(user.IdEmpresa, 4); lista.AddRange(lista2); return View(lista); } return View(); }
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(); }