public ActionResult BuscarComprobantes() { var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); ViewData["ListaFacturas"] = null; ViewData["ListaCobranzas"] = null; ViewData["SaldoCuentaCorriente"] = null; return(View()); }
public ActionResult CreateDetalle(Cobranza cobranza) { var btc = new BLLEntidadBancaria(); ViewData["EntidadBancaria"] = btc.All(); var btcomp = new BllMedioPago(); ViewData["MedioPago"] = btcomp.All(); var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); return(View()); }
public ActionResult ExportToExcel(string search, int?page) { var gv = new GridView(); var cp = new BLLEmpresa(); var lista = cp.AllCliente(); gv.DataSource = cp.AllCliente(); gv.DataBind(); Response.ClearContent(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment; filename=DemoExcel.xls"); Response.ContentType = "application/ms-excel"; Response.Charset = ""; StringWriter objStringWriter = new StringWriter(); HtmlTextWriter objHtmlTextWriter = new HtmlTextWriter(objStringWriter); gv.RenderControl(objHtmlTextWriter); Response.Output.Write(objStringWriter.ToString()); Response.Flush(); Response.End(); return(View(lista.Where(x => x.RazonSocial.ToUpper().StartsWith(search.ToUpper())).ToList().ToPagedList(page ?? 1, 10))); }
public ActionResult Index(string search, int?page) { var cp = new BLLEmpresa(); var lista = cp.AllCliente(); var btc = new BLLTipoContribuyente(); ViewData["TipoContribuyente"] = btc.All(); if (search == null) { search = ""; } return(View(lista.Where(x => x.RazonSocial.ToUpper().StartsWith(search.ToUpper())).ToList().ToPagedList(page ?? 1, 10))); }
public ActionResult BuscarComprobantes(Cliente factura) { var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); var fac = new BLLFactura(); ViewData["ListaFacturas"] = fac.VW_FACTURA_SALDO(factura).ToList(); var cob = new BLLCobranza(); ViewData["ListaCobranzas"] = cob.BuscarCobranza_View(factura).ToList(); ViewData["SaldoCuentaCorriente"] = cob.SaldoCuentaCorriente(factura).ToList(); return(View()); }
public ActionResult BuscarComprobante() { var btcomp = new BLLTipoComprobante(); ViewData["TipoComprobante"] = btcomp.All(); var letra = new BLLLetra(); ViewData["Letra"] = letra.All(); var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); ViewData["ListaFacturas"] = null; return(View()); }
public ActionResult BuscarComprobante(Cliente factura) { var btcomp = new BLLTipoComprobante(); ViewData["TipoComprobante"] = btcomp.All(); var letra = new BLLLetra(); ViewData["Letra"] = letra.All(); var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); factura.IdTipo = 1; var fac = new BLLFactura(); ViewData["ListaFacturas"] = fac.VW_FACTURA_CABECERA(factura).ToList(); return(View()); }
public ActionResult Buscar(Cliente factura) { try { var btc = new BLLTipoContribuyente(); ViewData["TipoContribuyente"] = btc.All(); var btcomp = new BLLTipoComprobante(); ViewData["TipoComprobante"] = btcomp.All(); var letra = new BLLLetra(); ViewData["Letra"] = letra.All(); var bllempresa = new BLLEmpresa(); ViewData["Cliente"] = bllempresa.AllCliente(); var fac = new BLLFactura(); ViewData["ListaTraslados"] = fac.LISTAR_COMPROBANTE_DETALLE(factura).ToList(); return(View(factura)); } catch { return(View()); } }