protected void OnItemDataBoundCuentas(object sender, RepeaterItemEventArgs e)
    {
        HyperLink _hyCuentaTransferencia      = (HyperLink)e.Item.FindControl("_hyNumeroCuenta");
        HyperLink _hyPropietarioTransferencia = (HyperLink)e.Item.FindControl("_hyPropietario");
        MCuenta   _obCuenta = (MCuenta)e.Item.DataItem;

        if (_obCuenta != null)
        {
            if (_hyCuentaTransferencia != null)
            {
                _hyCuentaTransferencia.NavigateUrl = $"TransferenciaCuentasTerceros.aspx?nc={_obCuenta.NumeroCuenta}";
            }
            else
            {
                throw new Exception("No se logro encontrar información de la cuenta");
            }
            if (_hyPropietarioTransferencia != null)
            {
                _hyPropietarioTransferencia.NavigateUrl = $"TransferenciaCuentasTerceros.aspx?nc={_obCuenta.NumeroCuenta}";
            }
            else
            {
                throw new Exception("No se logro encontrar información del propietario");
            }
        }
        else
        {
            throw new Exception("No se lograron encontrar los datos cargados");
        }
    }
 public int BuscarInformacionMovimientos(string _stNumeroCuenta, string _stPeriodoBusqueda)
 {
     try {
         BLLConsultaCuentaEncabezado _obConsultaEncabezado = new BLLConsultaCuentaEncabezado();
         int _inEstadoEjecucion = _obConsultaEncabezado.BuscarInformacionCuenta(_stNumeroCuenta);
         if (_inEstadoEjecucion > 0)
         {
             return(_inEstadoEjecucion);
         }
         Cuenta = _obConsultaEncabezado.Cuenta;
         Cuenta.MovimientosCuenta = new List <MMovimientoCuenta>();
         DExecute       _obExecute       = new DExecute();
         DProcedimiento _obProcedimiento = new DProcedimiento {
             NombreProcedimiento = "dbo.PRC_LISTA_INFO_CUENTA_DETALLE",
             Parametros          = new List <DParametro> {
                 new DParametro {
                     Nombre = "@NumeroCuenta",
                     Valor  = _stNumeroCuenta,
                     Tipo   = DbType.String
                 },
                 new DParametro {
                     Nombre = "@PeriodoBusqueda",
                     Valor  = _stPeriodoBusqueda,
                     Tipo   = DbType.Date
                 }
             }
         };
         _obExecute.abrirConexion();
         DataTable _dtInformacionMovimientos = _obExecute.Consultar(_obProcedimiento);
         _obExecute.cerrarConexion();
         if (_dtInformacionMovimientos.Rows.Count > 0)
         {
             foreach (DataRow _drInfoMovimiento in _dtInformacionMovimientos.Rows)
             {
                 Cuenta.MovimientosCuenta.Add(new MMovimientoCuenta {
                     Fecha         = DateTime.Parse(_drInfoMovimiento["FechaMovimiento"].ToString()),
                     Documento     = _drInfoMovimiento["DocumentoMovimiento"].ToString(),
                     Descripcion   = _drInfoMovimiento["DescripcionMovimiento"].ToString(),
                     DebitoCredito = Convert.ToDouble(_drInfoMovimiento["DebitoCredito"].ToString()),
                     Saldo         = Convert.ToDouble(_drInfoMovimiento["SaldoCuenta"].ToString()),
                     Agencia       = _drInfoMovimiento["AgenciaMovimiento"].ToString()
                 });
             }
             return(0);
         }
         else
         {
             return(5);
         }
     }
     catch (Exception ex) {
         throw ex;
     }
 }
Esempio n. 3
0
        public int BuscarInformacionCuenta(string _stNumeroCuenta)
        {
            try {
                DExecute       _obExecute       = new DExecute();
                DProcedimiento _obProcedimiento = new DProcedimiento {
                    NombreProcedimiento = "dbo.PRC_LISTA_INFO_CUENTA_ENCABEZADO",
                    Parametros          = new List <DParametro> {
                        new DParametro {
                            Nombre = "@NumeroCuenta",
                            Valor  = _stNumeroCuenta,
                            Tipo   = DbType.String
                        }
                    }
                };

                _obExecute.abrirConexion();
                DataTable _dtInformacionCuetna = _obExecute.Consultar(_obProcedimiento);
                _obExecute.cerrarConexion();
                if (_dtInformacionCuetna.Rows.Count > 0)
                {
                    foreach (DataRow _drInfoCuenta in _dtInformacionCuetna.Rows)
                    {
                        Cuenta = new MCuenta {
                            NumeroCuenta              = _drInfoCuenta["NumeroCuenta"].ToString(),
                            Propietario               = _drInfoCuenta["Propietario"].ToString(),
                            TipoCuenta                = _drInfoCuenta["TipoCuenta"].ToString(),
                            Estado                    = _drInfoCuenta["Estado"].ToString(),
                            FechaCreacion             = DateTime.Parse(_drInfoCuenta["FechaCreacion"].ToString()),
                            TipoInteres               = _drInfoCuenta["TipoInteres"].ToString(),
                            TipoMoneda                = _drInfoCuenta["TipoMoneda"].ToString(),
                            TotalDisponible           = Convert.ToDouble(_drInfoCuenta["TotalDisponible"].ToString()),
                            SaldoEfectivo             = Convert.ToDouble(_drInfoCuenta["SaldoEfectivo"].ToString()),
                            SaldoCheque               = Convert.ToDouble(_drInfoCuenta["SaldoCheque"].ToString()),
                            SaldoReserva              = Convert.ToDouble(_drInfoCuenta["SaldoReserva"].ToString()),
                            SaldoContable             = Convert.ToDouble(_drInfoCuenta["SaldoContable"].ToString()),
                            SaldoInicial              = Convert.ToDouble(_drInfoCuenta["SaldoInicial"].ToString()),
                            InteresMes                = Convert.ToDouble(_drInfoCuenta["InteresMes"].ToString()),
                            DepositoATM               = Convert.ToDouble(_drInfoCuenta["DepositoATM"].ToString()),
                            SaldoBloqueado            = Convert.ToDouble(_drInfoCuenta["SaldoBloqueado"].ToString()),
                            Reserva24Horas            = Convert.ToDouble(_drInfoCuenta["Reserva24Horas"].ToString()),
                            Reserva48Horas            = Convert.ToDouble(_drInfoCuenta["Reserva48Horas"].ToString()),
                            Reserva72Horas            = Convert.ToDouble(_drInfoCuenta["Reserva72Horas"].ToString()),
                            ReservaGirosExterior      = Convert.ToDouble(_drInfoCuenta["ReservaGirosExterior"].ToString()),
                            InteresPorSobregiro       = Convert.ToDouble(_drInfoCuenta["InteresPorSobregiro"].ToString()),
                            SobregiroAutorizado       = Convert.ToDouble(_drInfoCuenta["SobregiroAutorizado"].ToString()),
                            TasaDeSobregiro           = Convert.ToDouble(_drInfoCuenta["TasaDeSobregiro"].ToString()),
                            InteresSobregiroAcumulado = Convert.ToDouble(_drInfoCuenta["InteresSobregiroAcumulado"].ToString()),
                            ExpiracionSobregiro       = DateTime.Parse(_drInfoCuenta["ExpiracionSobregiro"].ToString()),
                            SobregiroDisponible       = Convert.ToDouble(_drInfoCuenta["SobregiroDisponible"].ToString()),
                            MovimientosCuenta         = null
                        };
                    }
                    return(0);
                }
                else
                {
                    return(5);
                }
            }
            catch (Exception ex) {
                throw ex;
            }
        }
Esempio n. 4
0
 public BLLConsultaCuentaEncabezado(MCuenta _obCuenta)
 {
     Cuenta = _obCuenta;
 }
Esempio n. 5
0
 public BLLConsultaCuentaEncabezado()
 {
     Cuenta = null;
 }
 public BLLConsultaCuentaDetalle(MCuenta _obCuenta)
 {
     Cuenta = _obCuenta;
 }
 public BLLConsultaCuentaDetalle()
 {
     Cuenta = null;
 }