예제 #1
0
        private void btnGuardar_Click(object sender, EventArgs e)
        {
            PagoCuotas();

            MessageBox.Show("Abono realizado con exito", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information);


            // CARGA EL PRESTAMO Y ESTABLECE EL SELECT EN EL PRESTAMO UTILIZADO
            Abonos.CargarPrestamos();
            Abonos.dtgPrestamos.CurrentCell = Abonos.dtgPrestamos.Rows[filaSelecionadaP].Cells[0];

            Abonos.Refresh();
            this.Dispose();
        }
예제 #2
0
        private void eliminarAbonoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listAbonosCuotas.CheckedItems.Count == 0)
            {
                MessageBox.Show("Debes marcar en la casila los abonos que deseas eliminar", "Informacion", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
            else
            {
                DialogResult opcion = MessageBox.Show("Desea eliminar los siguientes abonos marcados", "Informacion", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);


                double saldo = 0;

                // ELIMINA LOS ABONOS MARCADS CON EL CHECK
                if (opcion == DialogResult.OK)
                {
                    Abonos_CuotasCL oAbonos = new Abonos_CuotasCL();

                    Prestamos_CuotasCL oCuotas = new Prestamos_CuotasCL();

                    oCuotas.EditarPrestamoCuotas(cuota, Convert.ToDateTime(null), false, "eliminar");



                    foreach (ListViewItem item in listAbonosCuotas.Items)
                    {
                        if (item.Checked)
                        {
                            oAbonos.EliminarAbono_Cuotas_Id(lAbonos.Rows[item.Index].ItemArray[0].ToString());

                            saldo += Convert.ToDouble(lAbonos.Rows[item.Index].ItemArray[2]);
                        }
                    }
                }

                EditarSaldoPrestamo(saldo);

                LimpiarValores();

                CargarAbonos(cuota);

                abonos.CargarPrestamos();
            }
        }
예제 #3
0
        private void dtgClientes_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            this.Hide();

            if (clientes != null)
            {
                this.clientes.ActivarCajas(2);
                this.clientes.txtCedula.Text    = this.dtgClientes["Cedula", this.dtgClientes.CurrentCell.RowIndex].Value.ToString();
                this.clientes.txtNombre.Text    = this.dtgClientes["Nombre", this.dtgClientes.CurrentCell.RowIndex].Value.ToString();
                this.clientes.txtTelefono.Text  = this.dtgClientes["Telefono", this.dtgClientes.CurrentCell.RowIndex].Value.ToString();
                this.clientes.txtCelular.Text   = this.dtgClientes["Celular", this.dtgClientes.CurrentCell.RowIndex].Value.ToString();
                this.clientes.txtDireccion.Text = this.dtgClientes["Direccion", this.dtgClientes.CurrentCell.RowIndex].Value.ToString();
                this.clientes.ckMoroso.Checked  = Convert.ToBoolean(this.dtgClientes["Moroso", this.dtgClientes.CurrentCell.RowIndex].Value.ToString());
            }

            if (prestamos != null)
            {
                prestamos.txtCliente.Text = dtgClientes["Cedula", dtgClientes.CurrentCell.RowIndex].Value.ToString();
                prestamos.CargarClientes();
                prestamos.CargarPrestamos();
            }

            if (abonos != null)
            {
                abonos.txtCliente.Text = dtgClientes["Cedula", dtgClientes.CurrentCell.RowIndex].Value.ToString();
                abonos.CargarClientes();
                abonos.CargarPrestamos();
            }

            if (filtroPrestamos != null)
            {
                filtroPrestamos.txtCliente.Text = dtgClientes["Cedula", dtgClientes.CurrentCell.RowIndex].Value.ToString();
                filtroPrestamos.ComprobarPrestamos();
            }

            if (filtroPrestamos_Cuotas != null)
            {
                filtroPrestamos_Cuotas.txtCliente.Text = dtgClientes["Cedula", dtgClientes.CurrentCell.RowIndex].Value.ToString();
                filtroPrestamos_Cuotas.ComprobarPrestamos();
            }
        }