private void editarFechasCuotasToolStripMenuItem_Click(object sender, EventArgs e) { if (dtgPrestamos.SelectedRows.Count > 0) { int prestamo = Convert.ToInt32(dtgPrestamos.CurrentRow.Cells["ID"].Value); Prestamos_CuotasCL oCuotas = new Prestamos_CuotasCL(); DataSet oDatos = oCuotas.TraerPrestamoCuotas_NoPago(prestamo.ToString()); if (oDatos.Tables[0].Rows.Count > 0) { frmEdicionCuotaFecha oEfecha = new frmEdicionCuotaFecha(prestamo, lblDescripcion.Text); oEfecha.ShowDialog(); } else { MessageBox.Show("Este prestamo no presenta cuotas pendientes", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Debes seleccionar algun prestamo", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void recargoToolStripMenuItem_Click(object sender, EventArgs e) { if (this.dtgPrestamos.SelectedRows.Count > 0) { int oPrestamo = Convert.ToInt32(this.dtgPrestamos.CurrentRow.Cells["ID"].Value); Prestamos_CuotasCL prestamos_CuotasCL = new Prestamos_CuotasCL(); DataSet dataSet = prestamos_CuotasCL.TraerPrestamoCuotas_NoPago(oPrestamo.ToString()); if (dataSet.Tables[0].Rows.Count > 0) { double oMontoCuota = Convert.ToDouble(this.dtgPrestamos.CurrentRow.Cells["Cuotas"].Value); double oSaldoPrestamo = Convert.ToDouble(this.dtgPrestamos.CurrentRow.Cells["Saldo"].Value); double oTotalPrestamo = Convert.ToDouble(this.dtgPrestamos.CurrentRow.Cells["Total"].Value); int oDia_pago = Convert.ToInt32(this.dtgPrestamos.CurrentRow.Cells["dia_pago"].Value); frmRecargoPrestamo frmRecargoPrestamo = new frmRecargoPrestamo(this, oPrestamo, oMontoCuota, oSaldoPrestamo, oTotalPrestamo, oDia_pago, this.lblDescripcion.Text); frmRecargoPrestamo.ShowDialog(); } else { MessageBox.Show("Este prestamo no presenta cuotas pendientes", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } else { MessageBox.Show("Debes seleccionar algun prestamo", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } }
// CARGAS LAS CUOTAS public void traerCuotas(int prestamo) { Prestamos_CuotasCL oCuotas = new Prestamos_CuotasCL(); DataSet oDatos = oCuotas.TraerPrestamoCuotas_NoPago(prestamo.ToString()); dCuotas = oDatos.Tables[0]; dtgCuotas.DataSource = dCuotas; }
// CARGAS LAS CUOTSA public void TraerCuotas(int prestamo) { var oCuotas = new Prestamos_CuotasCL(); var oPrestamo = new PrestamosCL(); var oDatos = oCuotas.TraerPrestamoCuotas_NoPago(prestamo.ToString()); var oDatosPrestamo = oPrestamo.TraerPrestamoSaldo(prestamo.ToString()); _prestamoSaldo = Convert.ToDouble(oDatosPrestamo.Tables[0].Rows[0].ItemArray[0]); _dCuotas = oDatos.Tables[0]; // OBTIENE EL PRIMER NUMERO DE CUOTA _primerNumeroCuota = Convert.ToInt32(_dCuotas.Rows[0]["num_cuota"].ToString()); dtgCuotas.DataSource = _dCuotas; }