Ejemplo n.º 1
0
        protected void ObtenerCobro(string Identificacion, Int32 IdCredito, int Cuota)
        {
            decimal TotalPagar = 0;
            PagosCP _PagosCP   = new PagosCP();

            _PagosCP = bd.ObtenerCobro(Identificacion, IdCredito, Cuota);
            if (_PagosCP.Pagos.Count >= 1)
            {
                txtNombreCliente.Text  = _PagosCP._ClienteSolicitud[0].Nombre;
                txtProducto.Text       = _PagosCP.Pagos[0].NombreProducto;
                txtCredito.Text        = Convert.ToString(_PagosCP.Pagos[0].IdCredito);
                txtSaldoCorte.Text     = Convert.ToString(_PagosCP.Pagos[0].SaldoActual);
                txtSaldoPendiente.Text = Convert.ToString(_PagosCP.Pagos[0].Diferencia);
                txtStatus.Text         = Convert.ToString(_PagosCP.Pagos[0].Status);
                txtInteresMora.Text    = Convert.ToString(_PagosCP.Pagos[0].InteresMora);
                llenaComboCuota(txtIdentificación.Text, _PagosCP.Pagos[0].IdCredito);
                cb_NumCuota.SelectedValue = Convert.ToString(_PagosCP.Pagos[0].Cuota);
                txtMontoCuota.Text        = Convert.ToString(_PagosCP.Pagos[0].Capital);
                txtInteresCuota.Text      = Convert.ToString(_PagosCP.Pagos[0].Interes);
                txtTotalPagar.Text        = Convert.ToString(_PagosCP.Pagos[0].MontoCuota + _PagosCP.Pagos[0].Diferencia);
            }
            else
            {
                Response.Write("<script>alert('No se ha encontrado pagos pendientes para este Cliente');</script>");
                VaciarCampos();
            }
        }
Ejemplo n.º 2
0
        public PagosCP ObtenerCobro(string Identificacion, int Credito, int Cuota)
        {
            try
            {
                PagosCP   _PagosCp = new PagosCP();
                DataTable dtPagos  = new DataTable();
                dtPagos = prObtenerCobro(Identificacion, Credito, Cuota);

                List <Pagos> lis_Pagos = dtPagos.AsEnumerable().Select(r => new Pagos()
                {
                    IdCredito      = r.Field <int?>("IdCredito") ?? 0,
                    Cuota          = r.Field <int?>("Cuota") ?? 0,
                    FechaCredito   = r.Field <DateTime?>("FechaCredito"),
                    FechaPago      = r.Field <DateTime?>("FechaPago"),
                    Capital        = r.Field <decimal?>("Capital") ?? 0,
                    Interes        = r.Field <decimal?>("Interes") ?? 0,
                    Status         = r.Field <string>("Descripcion") ?? string.Empty,
                    NombreProducto = r.Field <string>("NombreProducto") ?? string.Empty,
                    Diferencia     = r.Field <decimal?>("Diferencia") ?? 0,
                    SaldoActual    = r.Field <decimal?>("SaldoActual") ?? 0,
                    SaldoAnterior  = r.Field <decimal?>("SaldoAnterior") ?? 0,
                    InteresMora    = r.Field <decimal?>("InteresMora") ?? 0,
                    MontoCuota     = r.Field <decimal?>("MontoCuota") ?? 0
                }).ToList();

                List <Solicitudes> lis_Persona = dtPagos.AsEnumerable().Select(r => new Solicitudes()
                {
                    Nombre = r.Field <string>("Nombre") ?? string.Empty
                }).ToList();

                _PagosCp._ClienteSolicitud = lis_Persona;
                _PagosCp.Pagos             = lis_Pagos;
                return(_PagosCp);
            }
            catch (Exception ex)
            {
                log.Error(ex.Message);
            }
            return(null);
        }
Ejemplo n.º 3
0
        public PagosCP ObtenerCobro(string Identificacion, int Credito, int Cuota)
        {
            PagosCP _ObtenerCobro = bdPagos.ObtenerCobro(Identificacion, Credito, Cuota);

            return(_ObtenerCobro);
        }