Exemplo n.º 1
0
        public static FacturaReporte ParaReporte(int?facturaId)
        {
            FacturaReporte factura = null;
            Facturas       fact    = BuscarEncabezado(facturaId);

            if (fact != null)
            {
                factura = new FacturaReporte();
                try
                {
                    factura.Encabezado = new FacturaC()
                    {
                        CantidadItems = fact.CantidadItems,
                        Cliente       = BLL.ClientesBLL.Buscar(fact.IdCliente).Nombres,
                        Fecha         = fact.Fecha,
                        IdEmpleado    = fact.IdEmpleado,
                        IdFactura     = fact.IdFactura,
                        ITBIS         = fact.ITBIS,
                        SubTotal      = fact.SubTotal,
                        TOTAL         = fact.TOTAL
                    };
                    factura.Detalle = BLL.FacturaDetalleBLL.Listar(fact.IdFactura);
                    for (int i = 0; i < factura.Detalle.Count; ++i)
                    {
                        factura.Detalle[i].Id = (i + 1);
                    }
                }
                catch (Exception)
                {
                    throw;
                }
            }
            return(factura);
        }
Exemplo n.º 2
0
        private void FacturacrystalReportViewer_Load(object sender, EventArgs e)
        {
            FacturaReporte abrir = new FacturaReporte();

            abrir.SetDataSource(datos);
            FacturacrystalReportViewer.ReportSource = abrir;
            FacturacrystalReportViewer.Refresh();
        }
Exemplo n.º 3
0
        private void ReporteFacturaViewer_Load(object sender, EventArgs e)
        {
            FacturaReporte abrir = new FacturaReporte();

            abrir.SetDataSource(datos);
            ReporteFacturaViewer.ReportSource = abrir;
            // ReporteFacturaViewer.SelectionFormula = "{View_Facturaciones}.Id=id"; {Facturaciones.ClienteId}=1
            ReporteFacturaViewer.Refresh();
        }
        public ActionResult Reporte(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FacturaReporte factura = BLL.FacturasBLL.ParaReporte(id);

            if (factura == null)
            {
                return(HttpNotFound());
            }
            return(View(factura));
        }