private void cboFactura_SelectedIndexChanged_1(object sender, EventArgs e) { CapaNegocios.clsCredito factura = new CapaNegocios.clsCredito(); DataTable dtfactura = new DataTable(); dtfactura = factura.cargarFactura(); cboFactura.DataSource = dtfactura; cboFactura.DisplayMember = "Nombre"; cboFactura.ValueMember = "Id_Persona"; }
private void btnAdd_Click(object sender, EventArgs e) { CapaNegocios.clsCredito pago = new CapaNegocios.clsCredito(); if (rbCredito.Checked) { if (pago.PagoCredito(Int32.Parse(cboFactura.Text))) { if (pago.insertarCredito(float.Parse(txtSaldo.Text), dtPago.Text, float.Parse(txtMonto.Text), dtLimite.Text, Int32.Parse(cboFactura.Text))) { MessageBox.Show("Crédito realizado"); } } } if (rbContado.Checked) { if (pago.PagoContado(Int32.Parse(cboFactura.Text))) { MessageBox.Show("Pago a contado realizado"); } } }