Esempio n. 1
0
        private void FTablaFinanciamiento_Load(object sender, EventArgs e)
        {
            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("costo", precio.ToString()),
                new ReportParameter("prima", prima.ToString()),
                new ReportParameter("financiamiento", (precio - prima).ToString()),
                new ReportParameter("meses", meses.ToString()),
                new ReportParameter("articulo", "Motocicleta"),
                new ReportParameter("cliente", cliente),
                new ReportParameter("informacion", informacion)
            };

            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listadofghfgh";
            rds.Value = lista;
            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
            this.reportViewer1.RefreshReport();
        }
Esempio n. 2
0
        private void FReporteCuotas_Load(object sender, EventArgs e)
        {
            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("informacion", informacion),
                new ReportParameter("nombrenegocio", c.NombreEmpresa.ToString().ToUpper()),
                new ReportParameter("fechas", "Periodo del " + f1.Date.ToShortDateString() + " al " + f2.Date.ToShortDateString())
            };



            List <Pagos> listado = new List <Pagos>();
            CPagos       cPagos  = new CPagos();

            listado = cPagos.ListadoReporte(f1, f2);


            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listado";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
            this.reportViewer1.RefreshReport();
        }
Esempio n. 3
0
        private void FReporteContrato_Load(object sender, EventArgs e)
        {
            CContratos cContratos = new CContratos();
            List <con> listado    = new List <con>();

            ReportParameter[] p = new ReportParameter[2];
            CConfiguracion    cConfiguracion = new CConfiguracion();
            Configuracion     c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            p[1] = new ReportParameter("informacion", informacion);

            if (tipo == 1)
            {
                p[0]    = new ReportParameter("titulo", "Contratos Activos");
                listado = cContratos.Listado(false);
            }
            else
            {
                p[0]    = new ReportParameter("titulo", "Contratos en mora");
                listado = cContratos.Atrasados();
            }

            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listado";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.RefreshReport();
        }
Esempio n. 4
0
        private void FReporteVentas_Load(object sender, EventArgs e)
        {
            this.reportViewer1.RefreshReport();
            CVenta cVentas = new CVenta();

            List <ReporteVentas> lista = new List <ReporteVentas>();

            lista = cVentas.Reporte(f1, f2);


            string fechas = f1.ToShortDateString() + " al " + f2.ToShortDateString();

            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;



            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("fechas", fechas),
                new ReportParameter("informacion", informacion),
                new ReportParameter("nombrenegocio", c.NombreEmpresa)
            };
            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "ListadoVentas";
            rds.Value = lista;
            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.RefreshReport();
        }
Esempio n. 5
0
        private void FReporteMora_Load(object sender, EventArgs e)
        {
            if (mora)
            {
                this.Text = "Contratos con pagos para este mes";
            }

            CContratos cContratos = new CContratos();
            con        contrato   = new con();

            contrato = cContratos.uno(id);
            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("costo", contrato.Precio.ToString()),
                new ReportParameter("prima", contrato.Prima.ToString()),
                new ReportParameter("financiamiento", contrato.Financiamiento.ToString()),
                new ReportParameter("meses", contrato.Meses.ToString()),
                new ReportParameter("articulo", contrato.DescripcionProducto),
                new ReportParameter("cliente", contrato.NombreCompleto),
                new ReportParameter("informacion", informacion)
            };



            List <Cuotas> listado = new List <Cuotas>();
            CCuota        cCuota  = new CCuota();

            listado = cCuota.Listado(contrato.IdContrato);


            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listadofghfgh";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.RefreshReport();

            this.reportViewer1.RefreshReport();
        }
Esempio n. 6
0
        private void FHojaDePagos_Load(object sender, EventArgs e)
        {
            CContratos cContratos = new CContratos();
            con        contrato   = new con();

            contrato = cContratos.uno(id);
            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("costo", contrato.Precio.ToString()),
                new ReportParameter("prima", contrato.Prima.ToString()),
                new ReportParameter("financiamiento", contrato.Financiamiento.ToString()),
                new ReportParameter("meses", contrato.Meses.ToString()),
                new ReportParameter("articulo", contrato.DescripcionProducto),
                new ReportParameter("cliente", contrato.NombreCompleto),
                new ReportParameter("informacion", informacion)
            };



            List <Pagos> listado = new List <Pagos>();

            Controladores.CPagos cPagos = new Controladores.CPagos();
            listado = cPagos.Listado(contrato.IdContrato);


            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listado";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
            this.reportViewer1.ZoomPercent = 150;
            this.reportViewer1.RefreshReport();

            this.reportViewer1.RefreshReport();
        }
Esempio n. 7
0
        private void FReporteInventario_Load(object sender, EventArgs e)
        {
            CDetallesInventario cDetalles = new CDetallesInventario();

            List <DetallesInventario> listado = new List <DetallesInventario>();

            ReportParameter[] p = new ReportParameter[3];
            CConfiguracion    cConfiguracion = new CConfiguracion();
            Configuracion     c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            p[1] = new ReportParameter("informacion", informacion);
            p[2] = new ReportParameter("nombrenegocio", c.NombreEmpresa);

            if (tipo == 0)
            {
                p[0]    = new ReportParameter("tipo", "Todos los productos");
                listado = cDetalles.Listado(idinventario);
            }
            else if (tipo == 1)
            {
                p[0]    = new ReportParameter("tipo", "Productos propios");
                listado = cDetalles.ListadoPropio(idinventario);
            }
            else
            {
                p[0]    = new ReportParameter("tipo", "Productos en consignacion");
                listado = cDetalles.ListadoConsignacion(idinventario);
            }

            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listado";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);
            this.reportViewer1.RefreshReport();

            this.reportViewer1.RefreshReport();
        }
Esempio n. 8
0
        private void FReportePagosExtras_Load(object sender, EventArgs e)
        {
            CContratos cContratos = new CContratos();
            con        contrato   = new con();

            contrato = cContratos.uno(id);
            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  c = new Configuracion();

            c = cConfiguracion.ObtenerConfiguracion();
            string informacion = c.NombreEmpresa + " - " + c.Telefono;

            ReportParameter[] p = new ReportParameter[]
            {
                new ReportParameter("informacion", informacion),
                new ReportParameter("producto", contrato.DescripcionProducto.ToString()),
                new ReportParameter("cliente", "CLIENTE: " + contrato.NombreCompleto.ToString().ToUpper()),
                new ReportParameter("nombrenegocio", c.NombreEmpresa.ToString().ToUpper()),
                new ReportParameter("capital", contrato.Restante.ToString()),
                new ReportParameter("inicio", contrato.FechaInicio.ToString())
            };



            List <OtrosPagos> listado = new List <OtrosPagos>();
            COtrosPagos       cOtros  = new COtrosPagos();

            listado = cOtros.Listado(contrato.IdContrato);


            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "Listado";
            rds.Value = listado;

            this.reportViewer1.LocalReport.DataSources.Add(rds);
            this.reportViewer1.LocalReport.SetParameters(p);

            this.reportViewer1.RefreshReport();
        }
Esempio n. 9
0
        private void ImprimirTicket(OtrosPagos otros)
        {
            CContratos cContratos = new CContratos();

            /* CCuota cCuota = new CCuota();
             * Cuotas c = new Cuotas();
             * c = cCuota.ObtenerUna(id);*/
            contrato contrato = new contrato();

            contrato = cContratos.uno(otros.IdContrato_FK);


            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  config         = cConfiguracion.ObtenerConfiguracion();
            Printer        printer        = new Printer(config.Impresora);

            // CCorrelativo ccorrelativo = new CCorrelativo();
            //  Correlativo correlativo = ccorrelativo.ObtenerUna(c.IdCorrelativo_FK);

            printer.AlignCenter();
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.BoldMode(config.NombreEmpresa);
            printer.BoldMode(config.municipio);
            //Bitmap image = new Bitmap(Bitmap.FromFile("Icon.bmp"));
            //printer.Image(image);
            printer.Append(config.Direccion);
            printer.Append("NIT:" + config.NIT);
            printer.Append("NRC:" + config.NRC);
            printer.Append("Fecha:" + otros.fecha);
            printer.Append("Comprobante de pago");
            printer.Append("Cliente:" + contrato.NombreCompleto);
            printer.Append("--------------------------------------");

            printer.AlignLeft();
            printer.Append("Descripción del pago");


            printer.Append("Total cancelado = $" + otros.monto.Value.ToString("F"));

            if (otros.comentario != null)
            {
                printer.Append("--------------");
                printer.Append("Información:" + otros.comentario);
                printer.Append("--------------");
            }

            /*printer.Append("A intereses = $" + c.AIntereses.Value.ToString("F"));
             * printer.Append("A capital = $" + c.ACapital.Value.ToString("F"));
             * printer.Append("Abono extra a capital = $" + c.ACapitalExtra.Value.ToString("F"));
             * printer.Append("--------------");
             * printer.Append("Capital pendiente = $" + c.CapitalPendiente.Value.ToString("F"));*/

            printer.AlignCenter();
            printer.Append("--------------------------------------");
            printer.AlignLeft();
            printer.Append("Ventas Afectas:" + otros.monto);
            printer.Append("Ventas Exentas:" + "0.00");
            printer.AlignCenter();
            printer.Append("--------------------------------------");
            printer.AlignLeft();
            printer.Append("Recibido:" + otros.efectivo.Value);
            printer.Append("Cambio:" + otros.cambio.Value);
            printer.AlignCenter();
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("Gracias por su pago realizado");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");

            /*printer.Append("Resolución: " + correlativo.Resolucion);
             * printer.Append("Del " + "0000001 al " + correlativo.Fin);
             * printer.Append("Autorización:" + correlativo.Autorizacion);
             * printer.Append("Fecha de resolución:" + correlativo.FechaDeAutorizacion.ToString());*/
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.FullPaperCut();
            try
            {
                printer.PrintDocument();
            }
            catch (Exception)
            {
            }
        }
Esempio n. 10
0
        void imprimirTicket(Pagos pago)
        {
            CContratos cContratos = new CContratos();
            con        contrato   = new con();
            CCuota     cCuota     = new CCuota();
            Cuotas     c          = new Cuotas();

            c        = cCuota.ObtenerUna(pago.IdCuota_FK);
            contrato = cContratos.uno(c.IdContrato_FK);


            CConfiguracion cConfiguracion = new CConfiguracion();
            Configuracion  config         = cConfiguracion.ObtenerConfiguracion();
            Printer        printer        = new Printer(config.Impresora);

            CCorrelativo ccorrelativo = new CCorrelativo();
            Correlativo  correlativo  = ccorrelativo.ObtenerUna(pago.IdCorrelativo_FK);

            printer.AlignCenter();
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.BoldMode(config.NombreEmpresa);
            printer.BoldMode(config.municipio);
            //Bitmap image = new Bitmap(Bitmap.FromFile("Icon.bmp"));
            //printer.Image(image);
            printer.Append(config.Direccion);
            printer.Append("TELEFONO: " + config.Telefono);
            printer.Append("NIT:" + config.NIT);
            printer.Append("NRC:" + config.NRC);
            printer.Append("Fecha:" + pago.FechaPago);
            printer.Append("Ticket #" + pago.Correlativo);
            printer.Append("Cliente:" + contrato.NombreCompleto);
            printer.Append("--------------------------------------");

            printer.AlignLeft();
            printer.Append("Descripción del pago");


            printer.Append("Total cancelado = $" + pago.Monto.ToString("F"));
            // printer.Append("Cuota con vencimiento al " + c.Fecha.Value.ToString());
            if (pago.Comentario != null)
            {
                printer.Append("--------------");
                printer.Append("Información:" + pago.Comentario);
                printer.Append("--------------");
            }
            printer.Append("A intereses = $" + pago.AIntereses.ToString("F"));
            printer.Append("A capital = $" + pago.ACapital.ToString("F"));
            printer.Append("Abono extra a capital = $" + pago.ACApitalExtra.ToString("F"));
            printer.Append("--------------");
            printer.Append("Capital pendiente = $" + pago.CapitalRestante.ToString("F"));

            printer.AlignCenter();
            printer.Append("--------------------------------------");
            printer.AlignLeft();
            printer.Append("Ventas Afectas:" + pago.Monto);
            printer.Append("Ventas Exentas:" + "0.00");
            printer.AlignCenter();
            printer.Append("--------------------------------------");
            printer.AlignLeft();
            printer.Append("Recibido:" + pago.Recibido);
            printer.Append("Cambio:" + pago.Cambio);
            printer.AlignCenter();
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("Gracias por su pago");
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.Append("                                        ");

            printer.Append("Resolución: " + correlativo.Resolucion);
            printer.Append("Del " + "0000001 al " + correlativo.Fin);
            printer.Append("Autorización:" + correlativo.Autorizacion);
            printer.Append("Fecha de resolución:" + correlativo.FechaDeAutorizacion.ToString());
            printer.Append("                                        ");
            printer.Append("                                        ");
            printer.FullPaperCut();
            try
            {
                printer.PrintDocument();
            }
            catch (Exception)
            {
            }
        }
Esempio n. 11
0
        private void FReporteDocumentos_Load(object sender, EventArgs e)
        {
            try
            {
                CContratos cContratos = new CContratos();
                con        contrato   = new con();
                contrato = cContratos.uno(id);
                CConfiguracion cConfiguracion = new CConfiguracion();
                Configuracion  c = new Configuracion();
                c = cConfiguracion.ObtenerConfiguracion();
                string informacion = c.NombreEmpresa + " - " + c.Telefono;
                string titulo      = "CREDITO DE MOTOCICLETA";
                if (contrato.NoEsMoto == 1)
                {
                    titulo = "CREDITO SG";
                }

                string dir = "-";
                if (contrato.DireccionCasa != null)
                {
                    dir = contrato.DireccionCasa;
                }
                string parte1 = "POR MEDIO DE ESTE PAGARÉ SIN PROTESTO ME OBLIGO A PAGAR EN LA CIUDAD DE " + c.municipio.ToUpper() + ", A LA ORDEN DE INVERSIONES SG LA SUMA DE $" + contrato.Financiamiento.Value.ToString("F") + " MÁS INTERESES MENSUALES DISTRIBUIDA EN " + contrato.Meses + " CUOTAS DE $" + contrato.Cuota.Value.ToString("F") + ", EN CONCEPTO DE COMPRA DE " + contrato.DescripcionProducto + ".";
                string parte2 = "ENTREGADO ESTE DIA " + contrato.FechaInicio.Value.Date.ToShortDateString() + ". LA PRIMERA PRIMA DE $" + contrato.PrimaNeta.Value.ToString("F") + ". EL PAGO MENSUAL SE HARA EN EL LUGAR PACTADO.";
                string parte3 = "PARA TODOS LOS EFECTOS DE ESTA OBLIGACION MERCANTIL FIJAMOS COMO DOMICILIO LA CIUDAD DE NUEVA CONCEPCION CHALATENANGO, Y EN CASO DE ACCION JUDICIAL RENUNCIO AL DECRETO DE APELAR DE DERECHO DE EMBARGO, SENTENCIA DE REMATE Y TODA OTRA PROVIDENCIA APELABLE QUE SE DICTARE EN EL JUICIO EJECUTIVO O SUS INCIDENCIAS, SIENDO A MI CARGO TODOS LOS GASTOS QUE INVERSIONES SG HICIERE EN EL NOMBRE DE ESTE PAGARÉ, EN CUALQUIER CONCEPTO, INCLUIDOS LOS DE CANCELACION Y DE COBRANZA JUDICIALES Y EXTRAJUDICIALES.";

                ReportParameter[] p = new ReportParameter[]
                {
                    new ReportParameter("informacion", informacion),
                    new ReportParameter("producto", contrato.DescripcionProducto.ToString().ToUpper()),
                    new ReportParameter("cliente", "CLIENTE: " + contrato.NombreCompleto.ToString().ToUpper()),
                    new ReportParameter("direccion", "DIRECCIÓN: " + dir.ToUpper()),
                    new ReportParameter("financiamiento", "FINANCIAMIENTO: $" + contrato.Financiamiento.ToString()),
                    new ReportParameter("financiamiento2", contrato.Financiamiento.ToString()),
                    new ReportParameter("cuota1", "CUOTA: $" + contrato.Cuota.ToString()),
                    new ReportParameter("fechacredito", "FECHA DE CRÉDITO: " + contrato.FechaInicio.Value.ToShortDateString()),
                    new ReportParameter("precio", contrato.Precio.ToString()),
                    new ReportParameter("prima", contrato.Prima.ToString()),
                    new ReportParameter("meses", contrato.Meses.ToString()),
                    new ReportParameter("titulo", titulo),
                    new ReportParameter("parte1", parte1),
                    new ReportParameter("parte2", parte2),
                    new ReportParameter("parte3", parte3),
                    new ReportParameter("dui", contrato.Dui),
                    new ReportParameter("telefono", contrato.Celular),
                    new ReportParameter("direccion2", dir),
                    new ReportParameter("cliente2", contrato.NombreCompleto)
                };



                List <Cuotas>        listado = new List <Cuotas>();
                Controladores.CCuota cCuota  = new Controladores.CCuota();
                listado = cCuota.Listado(contrato.IdContrato);


                ReportDataSource rds = new ReportDataSource();
                // rds.Name = "Listado";
                // rds.Value = listado;
                //  this.reportViewer1.LocalReport.DataSources.Add(rds);

                generarTabla();
                rds       = new ReportDataSource();
                rds.Name  = "Listadofghfgh";
                rds.Value = lista;
                this.reportViewer1.LocalReport.DataSources.Add(rds);



                this.reportViewer1.LocalReport.SetParameters(p);
                this.reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
                this.reportViewer1.RefreshReport();
            }
            catch (Exception)
            {
            }
        }