コード例 #1
0
        private void FReportePagosExtras_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", "Del " + f1.Date.Date.ToShortDateString() + " al " + f2.Date.Date.ToShortDateString())
            };



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

            listado = cOtros.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();
        }
コード例 #2
0
ファイル: FNuevoContrato.cs プロジェクト: JGuardadoSV/EASYPOS
        private void button8_Click(object sender, EventArgs e)
        {
            decimal total = decimal.Parse(montoTextBox.Text);
            FCobro  f     = new FCobro(total);

            f.ShowDialog();

            if (f.DialogResult == DialogResult.OK)
            {
                OtrosPagos  otros  = new OtrosPagos();
                COtrosPagos cOtros = new COtrosPagos();
                otrosPagosBindingSource.EndEdit();
                otros               = (OtrosPagos)otrosPagosBindingSource.Current;
                otros.fecha         = DateTime.Now;
                otros.efectivo      = f.recibe;
                otros.cambio        = f.cambio;
                otros.IdContrato_FK = contratoUp.IdContrato;
                cOtros.Insertar(otros);
                //otrosPagosBindingSource.DataSource = null;
                otrosPagosBindingSource.DataSource = cOtros.Listado(contratoUp.IdContrato);
                groupBoxDatos.Enabled = !groupBoxDatos.Enabled;
                button7.Enabled       = !button7.Enabled;
                MessageBox.Show("Pago registrado con éxito");

                ImprimirTicket(otros);
            }
        }
コード例 #3
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();
        }
コード例 #4
0
ファイル: FNuevoContrato.cs プロジェクト: JGuardadoSV/EASYPOS
        private void FNuevoContrato_Load(object sender, EventArgs e)
        {
            CCuenta cCuenta = new CCuenta();

            cuentasBindingSource.DataSource = cCuenta.Listado();



            if (contratoUp == null)
            {
                //contraton.Meses = 18;
                //contraton.GastosEscritura = 0;
                //// contraton.PrimaNeta = 0;
                // contraton.PrimaInicial = contraton.PrimaNeta;
                contraton.Estado = 1;
                contratosBindingSource.Add(contraton);
                button5.Visible = false;

                bancoLabel2.Visible = false;
            }
            else
            {
                if (contratoUp.IdCuenta_FK != null)
                {
                    bancoLabel2.Visible = true;
                }
                else
                {
                    bancoLabel2.Visible = false;
                }
                CContratos c = new CContratos();
                contratoUp = c.uno(contratoUp.IdContrato);
                contratosBindingSource.DataSource = contratoUp;
                if (contratoUp.Estado == 1)
                {
                    estadoCheckBox.Checked = true;
                }

                else
                {
                    estadoCheckBox.Checked = false;
                    estadoCheckBox.Visible = false;
                    datosgenerales.Controls["labelestado"].Visible = false;
                    //button4.Visible = false;
                }

                if (contratoUp.Estado == 1)
                {
                    button5.Visible = false;
                }

                COtrosPagos cOtros = new COtrosPagos();
                otrosPagosBindingSource.DataSource = cOtros.Listado(contratoUp.IdContrato);

                if (contratoUp.Finalizado == 1)
                {
                    button1.Visible = false;
                    button2.Visible = false;
                    button4.Visible = false;
                }
            }
        }