Exemple #1
0
 private void btnBuscar_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (dtpFecInicio.SelectedDate.Value.ToString() != "" && dtpFecFinal.SelectedDate.Value.ToString() != "")
         {
             SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();
             ReporteFacturaVenta.Reset();
             List <SIGEEA_spReporteVentasProductoPorClienteResult>   Detalle = new List <SIGEEA_spReporteVentasProductoPorClienteResult>();
             List <SIGEEA_spEncabezadoReporteVentasPorClienteResult> Orden   = new List <SIGEEA_spEncabezadoReporteVentasPorClienteResult>();
             List <SIGEEA_spPieReporteVentasPorClienteResult>        Pie     = new List <SIGEEA_spPieReporteVentasPorClienteResult>();
             List <SIGEEA_spSaldoCreditoClienteResult> SaldoCredito          = new List <SIGEEA_spSaldoCreditoClienteResult>();
             Detalle      = dc.SIGEEA_spReporteVentasProductoPorCliente(Cliente, dtpFecInicio.SelectedDate.Value, dtpFecFinal.SelectedDate.Value).ToList();
             Orden        = dc.SIGEEA_spEncabezadoReporteVentasPorCliente(Cliente).ToList();
             Pie          = dc.SIGEEA_spPieReporteVentasPorCliente(Cliente, dtpFecInicio.SelectedDate.Value, dtpFecFinal.SelectedDate.Value).ToList();
             SaldoCredito = dc.SIGEEA_spSaldoCreditoCliente(Cliente, dtpFecInicio.SelectedDate.Value, dtpFecFinal.SelectedDate.Value).ToList();
             var source  = new ReportDataSource("Detalle", helper.ConvertToDatatable(Detalle));
             var source2 = new ReportDataSource("Encabezado", helper.ConvertToDatatable(Orden));
             var source3 = new ReportDataSource("Pie", helper.ConvertToDatatable(Pie));
             var source4 = new ReportDataSource("SaldoCredito", helper.ConvertToDatatable(SaldoCredito));
             ReporteFacturaVenta.LocalReport.DataSources.Add(source);
             ReporteFacturaVenta.LocalReport.DataSources.Add(source2);
             ReporteFacturaVenta.LocalReport.DataSources.Add(source3);
             ReporteFacturaVenta.LocalReport.DataSources.Add(source4);
             ReporteFacturaVenta.LocalReport.ReportEmbeddedResource = "SIGEEA_App.Reportes.Clientes.Re_Reporte_Ventas_Cliente.rdlc";
             ReporteFacturaVenta.RefreshReport();
         }
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void llamarSegundaPantalla(List <Detalle> detalles)
        {
            SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();

            ReporteFacturaVenta.Reset();
            Factura = dc.SIGEEA_FacAsociados.First(c => c.PK_Id_FacAsociado == (dc.SIGEEA_DetFacAsociados.First(d => d.PK_Id_DetFacAsociado == detalles.First().getLlave()).FK_Id_FacAsociado)).PK_Id_FacAsociado;
            List <SIGEEA_spObtenerDetallesFacturaCompletaAsocResult> Detalle = new List <SIGEEA_spObtenerDetallesFacturaCompletaAsocResult>();
            List <SIGEEA_spGenerarFacturaEntregaResult> Orden = new List <SIGEEA_spGenerarFacturaEntregaResult>();

            Detalle = dc.SIGEEA_spObtenerDetallesFacturaCompletaAsoc(Factura).ToList();
            Orden   = dc.SIGEEA_spGenerarFacturaEntrega(Factura).ToList();
            var source  = new ReportDataSource("Detalle", helper.ConvertToDatatable(Detalle));
            var source2 = new ReportDataSource("Orden", helper.ConvertToDatatable(Orden));

            ReporteFacturaVenta.LocalReport.DataSources.Add(source);
            ReporteFacturaVenta.LocalReport.DataSources.Add(source2);
            ReporteFacturaVenta.LocalReport.ReportEmbeddedResource = "SIGEEA_App.Facturas.Re_Factura_Pendiente_Pago.rdlc";
            ReporteFacturaVenta.RefreshReport();
        }
Exemple #3
0
 private void btnBuscar_Click(object sender, RoutedEventArgs e)
 {
     if (dtpFecInicio.SelectedDate.Value != null && dtpFecFinal.SelectedDate.Value != null)
     {
         SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();
         ReporteFacturaVenta.Reset();
         List <SIGEEA_spReporteVentasProductoPorClienteResult>   Detalle = new List <SIGEEA_spReporteVentasProductoPorClienteResult>();
         List <SIGEEA_spEncabezadoReporteVentasPorClienteResult> Orden   = new List <SIGEEA_spEncabezadoReporteVentasPorClienteResult>();
         List <SIGEEA_spPieReporteVentasPorClienteResult>        Pie     = new List <SIGEEA_spPieReporteVentasPorClienteResult>();
         Detalle = dc.SIGEEA_spReporteVentasProductoPorCliente(Cliente, dtpFecInicio.SelectedDate.Value, dtpFecFinal.SelectedDate.Value).ToList();
         Orden   = dc.SIGEEA_spEncabezadoReporteVentasPorCliente(Cliente).ToList();
         Pie     = dc.SIGEEA_spPieReporteVentasPorCliente(Cliente, dtpFecInicio.SelectedDate.Value, dtpFecFinal.SelectedDate.Value).ToList();
         var source  = new ReportDataSource("Detalle", helper.ConvertToDatatable(Detalle));
         var source2 = new ReportDataSource("Encabezado", helper.ConvertToDatatable(Orden));
         var source3 = new ReportDataSource("Pie", helper.ConvertToDatatable(Pie));
         ReporteFacturaVenta.LocalReport.DataSources.Add(source);
         ReporteFacturaVenta.LocalReport.DataSources.Add(source2);
         ReporteFacturaVenta.LocalReport.DataSources.Add(source3);
         ReporteFacturaVenta.LocalReport.ReportEmbeddedResource = "SIGEEA_App.Reportes.Clientes.Re_Reporte_Ventas_Cliente.rdlc";
         ReporteFacturaVenta.RefreshReport();
     }
 }
        public void cargarFactura(int idFactura)
        {
            ReporteFacturaVenta.Reset();
            SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();

            ReporteFacturaVenta.Reset();
            List <SIGEEA_spDetalleFacturaClienteResult>    Detalle = new List <SIGEEA_spDetalleFacturaClienteResult>();
            List <SIGEEA_spEncabezadoFacturaClienteResult> Orden   = new List <SIGEEA_spEncabezadoFacturaClienteResult>();
            List <SIGEEA_spPieFacturaClienteResult>        Pie     = new List <SIGEEA_spPieFacturaClienteResult>();

            Detalle = dc.SIGEEA_spDetalleFacturaCliente(idFactura).ToList();
            Orden   = dc.SIGEEA_spEncabezadoFacturaCliente(idFactura).ToList();
            Pie     = dc.SIGEEA_spPieFacturaCliente(idFactura).ToList();
            var source  = new ReportDataSource("Detalle", helper.ConvertToDatatable(Detalle));
            var source2 = new ReportDataSource("Orden", helper.ConvertToDatatable(Orden));
            var source3 = new ReportDataSource("Pie", helper.ConvertToDatatable(Pie));

            ReporteFacturaVenta.LocalReport.DataSources.Add(source);
            ReporteFacturaVenta.LocalReport.DataSources.Add(source2);
            ReporteFacturaVenta.LocalReport.DataSources.Add(source3);
            ReporteFacturaVenta.LocalReport.ReportEmbeddedResource = "SIGEEA_App.Facturas.Re_Cancelar_Factura_Cliente.rdlc";
            ReporteFacturaVenta.RefreshReport();
        }
        public wnwCancelarPagoEmpleado(List <SIGEEA_spObtenerPagosEmpleadosPendientesResult> pLista, int pEmpleado)
        {
            InitializeComponent();


            SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();

            ReporteFacturaVenta.Reset();


            List <SIGEEA_spGenerarFacturaPagoEmpleadoResult> Orden = new List <SIGEEA_spGenerarFacturaPagoEmpleadoResult>();

            Orden = dc.SIGEEA_spGenerarFacturaPagoEmpleado(pEmpleado).ToList();
            var source  = new ReportDataSource("Detalle", helper.ConvertToDatatable(pLista));
            var source2 = new ReportDataSource("Orden", helper.ConvertToDatatable(Orden));

            ReporteFacturaVenta.LocalReport.DataSources.Add(source);
            ReporteFacturaVenta.LocalReport.DataSources.Add(source2);
            ReporteFacturaVenta.LocalReport.ReportEmbeddedResource = "SIGEEA_App.Facturas.Re_Cancelar_Pago_Empleado.rdlc";
            ReporteFacturaVenta.RefreshReport();



            /*SIGEEA_DiagramaDataContext dc = new SIGEEA_DiagramaDataContext();
             *
             * SIGEEA_spGenerarFacturaPagoEmpleadoResult encabezado = dc.SIGEEA_spGenerarFacturaPagoEmpleado(pEmpleado).First();
             *
             *
             *
             * Paragraph parrafoEncabezado = new Paragraph();
             * parrafoEncabezado.TextAlignment = TextAlignment.Center;
             * parrafoEncabezado.FontFamily = new FontFamily("Agency FB");
             * parrafoEncabezado.FontSize = 18;
             *
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.Nombre_Empresa));
             * parrafoEncabezado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.CedJuridica));
             * parrafoEncabezado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.Direccion_Empresa));
             * parrafoEncabezado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.Telefono));
             * parrafoEncabezado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.Correo));
             * parrafoEncabezado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEncabezado.Inlines.Add(new Run(encabezado.Fecha));
             * parrafoEncabezado.Inlines.Add(new Run("  " + encabezado.Hora));
             *
             * txbFactura.Document.Blocks.Add(parrafoEncabezado);
             *
             * Paragraph parrafoEmpleado = new Paragraph();
             * parrafoEmpleado.TextAlignment = TextAlignment.Left;
             * parrafoEmpleado.FontFamily = new FontFamily("Agency FB");
             * parrafoEmpleado.FontSize = 16;
             *
             * parrafoEmpleado.Inlines.Add(new Run(encabezado.NombreAsociado));
             * parrafoEmpleado.Inlines.Add(new Run(Environment.NewLine));
             * parrafoEmpleado.Inlines.Add(new Run(encabezado.CedPersona));
             * parrafoEmpleado.Inlines.Add(new Run(Environment.NewLine));
             * txbFactura.Document.Blocks.Add(parrafoEmpleado);
             *
             *
             * Lista = pLista;
             * pk_empleado = pEmpleado;
             *
             *
             * Paragraph parrafoFactura = new Paragraph();
             * parrafoFactura.TextAlignment = TextAlignment.Left;
             * parrafoFactura.FontFamily = new FontFamily("Agency FB");
             * parrafoFactura.FontSize = 16;
             *
             * parrafoFactura.Inlines.Add("Puesto      Horas       Precio      Total");
             * parrafoFactura.Inlines.Add(Environment.NewLine);
             *
             * foreach (SIGEEA_spObtenerPagosEmpleadosPendientesResult p in pLista)
             * {
             *  total += Convert.ToDouble(p.Total.Remove(0,1));
             *  horas += Convert.ToDouble(p.Diferencia);
             *  parrafoFactura.Inlines.Add(p.Nombre_Puesto + "      " + p.Diferencia +"         "+ p.Tarifa + "      " + p.Total);
             *  parrafoFactura.Inlines.Add(Environment.NewLine);
             * }
             *
             * txbFactura.Document.Blocks.Add(parrafoFactura);
             *
             * Paragraph parrafoTotal = new Paragraph();
             * parrafoTotal.TextAlignment = TextAlignment.Left;
             * parrafoTotal.FontFamily = new FontFamily("Agency FB");
             * parrafoTotal.FontSize = 16;
             * parrafoTotal.Inlines.Add("Total a cancelar: ₡" + total.ToString());
             * parrafoTotal.Inlines.Add(Environment.NewLine);
             * parrafoTotal.Inlines.Add("Horas laboradas: " + horas.ToString());
             *
             *
             * txbFactura.Document.Blocks.Add(parrafoTotal);*/
        }