Esempio n. 1
0
        private void dgvTratoInicial_DoubleClick(object sender, EventArgs e)
        {
            if (dgvTratoInicial.CurrentRow.Cells[6].Value.ToString() == "Pendiente")
            {
                Pagos p = new Pagos();
                p.FolioContrato = cto.FolioContrato;
                p.Consec        = Convert.ToInt32(dgvTratoInicial.CurrentRow.Cells[8].Value.ToString());

                p.ConsultaPago(p);
                p.ImportePendiente(p, cto, p.idTippag, p.NoEnganche);

                if (p.Importe == p.MontoPagado)
                {
                    p.EngContrato(p);
                    MessageBox.Show("Se actualizo la información del pago");
                    Consultar();
                }
                else
                {
                    MessageBox.Show("INFORMACIÓN ENGANCHE NO. " + p.NoEnganche.ToString() + System.Environment.NewLine
                                    + "TOTAL A PAGAR: " + p.Importe.ToString("N2") + System.Environment.NewLine
                                    + "MONTO PAGADO: " + p.MontoPagado.ToString("N2") + System.Environment.NewLine
                                    + "PENDIENTE POR PAGAR: " + (p.Importe - p.MontoPagado).ToString("N4"));
                }
            }
        }
Esempio n. 2
0
        private void PagPendientes(Pagos p)
        {
            p.ConsultaEng(p);


            if (p.EngConsec > 0)
            {
                p.Consec = p.EngConsec;

                p.ConsultaPago(p);
                p.ImportePendiente(p, cto, p.idTippag, p.NoEnganche);

                if (p.Importe == p.MontoPagado)
                {
                    p.EngContrato(p);
                    pendiente = false;

                    PagPendientes(p);
                }
                else
                {
                    pendiente = true;
                }
            }
            else
            {
                pendiente = false;
            }
        }