예제 #1
0
        private bool TransferirEntreCuenta(Banca cuenta, string moneda, double cantidad)
        {
            Cuenta CuentaOrigen;
            Cuenta CuentaDestino;
            double CantidadTransferida;

            switch (moneda)
            {
            case ControladorFachada.peso_moneda:
                CuentaOrigen        = cuenta.CuentaEnPesos;
                CuentaDestino       = cuenta.CuentaEnDolares;
                CantidadTransferida = PesoADolar(cantidad);
                break;

            case ControladorFachada.dolar_moneda:
                CuentaOrigen        = cuenta.CuentaEnDolares;
                CuentaDestino       = cuenta.CuentaEnPesos;
                CantidadTransferida = DolarAPesos(cantidad);
                break;

            default:
                return(false);
            }
            if (CuentaOrigen.DebitarSaldo(cantidad) == true)
            {
            }
            else
            {
                return(false);
            }
            CuentaDestino.AcreditarSaldo(CantidadTransferida);
            return(true);
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (CuentaDestino.Length != 0)
            {
                hash ^= CuentaDestino.GetHashCode();
            }
            if (Nombre.Length != 0)
            {
                hash ^= Nombre.GetHashCode();
            }
            if (CodEmail != 0)
            {
                hash ^= CodEmail.GetHashCode();
            }
            if (IdPersona != 0)
            {
                hash ^= IdPersona.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
 public bool Borrar(CuentaDestino entidad)
 {
     throw new NotImplementedException();
 }