Beispiel #1
0
        private void CargarCreditos()
        {
            DBCreditos objCredito = new DBCreditos(this.codCliente);

            DGCreditos.DataSource = objCredito.TraerCreditos();

            DestacarAnticipos();

            cboFecha1.Value    = DateTime.Today;
            cboFecha2.Value    = cboFecha1.Value.AddDays(30);
            cboFechaPago.Value = DateTime.Today;

            this.cboVentas.DisplayMember = "Venta";
            this.cboVentas.ValueMember   = "CodCredito";
            this.cboVentas.DataSource    = objCredito.TraerVentas();

            //return;

            DataTable sena = objCredito.TraerSena();

            if (sena.Rows.Count > 0)
            {
                foreach (DataRow fila in sena.Rows)
                {
                    valorSena = valorSena + Convert.ToDecimal(fila["Saldo"].ToString());
                }

                if (valorSena > 0)
                {
                    lblSena.Visible      = true;
                    lblValorSena.Visible = true;
                    lblValorSena.Text    = valorSena.ToString();
                }
            }
        }
        private void TraerFormasPago(string pCodPago)
        {
            if (pCodPago == "")
            {
                DGFormas.DataSource = new DataTable();
                return;
            }

            DBCreditos objCredito = new DBCreditos(codCliente);

            DGFormas.DataSource = objCredito.TraerFormasPago(pCodPago);
        }
Beispiel #3
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            if (ControlarDatosGuardar() == false)
            {
                return;
            }

            string strFormasPago = GenerarstrFormasPago();

            DBCreditos objCredito = new DBCreditos(this.codCliente,
                                                   this.strCodCuota,
                                                   //TxtImporte.Text.Trim(),
                                                   txtPagos.Text.Trim(),
                                                   TxtSaldoTotal.Text.Trim(),
                                                   //cboFormaPago.SelectedValue.ToString(),
                                                   strFormasPago,
                                                   TxtCliente.Text,
                                                   cboFecha1.Value,
                                                   cboFecha2.Value,
                                                   TxtNroCheque.Text,
                                                   Txt1.Text,
                                                   Txt2.Text,
                                                   Txt4.Text);

            ////Sobrecargo el metodo para hacer pagos con señas
            //if (ChSena.Checked)
            //{
            //    sena = TxtSena.Text;
            //}

            Msj = objCredito.InsertarPago(TxtConcepto.Text,
                                          cboFechaPago.Value,
                                          cboVentas.SelectedValue.ToString());

            NroRecibo = objCredito.NroRecibo;

            this.Close();
        }
        private void CargarPagos()
        {
            DBCreditos objCredito = new DBCreditos(this.codCliente);

            DGPagos.DataSource = objCredito.TraerPagos();
        }