コード例 #1
0
ファイル: TarifaDAO.cs プロジェクト: andresliger/AgenciaMVC
        public Boolean registrarTarifa(String tipo, Decimal costo, String descripcion, Decimal porcentaje)
        {
            Boolean       success = false;
            FacadeAgencia fa      = new FacadeAgencia();
            TARIFA        tarifa  = new TARIFA();

            tarifa.AGENCIA_CODIGO     = 1;
            tarifa.TARIFA_TIPO        = tipo;
            tarifa.TARIFA_COSTO       = costo;
            tarifa.TARIFA_DESCRIPCION = descripcion;
            tarifa.TARIFA_PORCENTAJE  = porcentaje;
            success = fa.insertaTarifa(tarifa);
            return(success);
        }
コード例 #2
0
        public static Boolean registrarUsuario(String nombre, String telf, String email, String password)
        {
            Boolean       success = false;
            FacadeAgencia fa      = new FacadeAgencia();
            USUARIO       user    = new USUARIO();

            user.USUARIO_CONTRASENA = Utils.Encrypt.MD5HashMethod(password);
            user.USUARIO_NOMBRE     = nombre;
            user.USUARIO_TELEFONO   = telf;
            user.USUARIO_CORREO     = email;
            user.USUARIO_ROL        = "2";
            success = fa.insertaUsuario(user);
            return(success);
        }
コード例 #3
0
        public Boolean registrarVuelo(String origen, String destino, String numero, DateTime salida, DateTime llegada, int capacidad)
        {
            Boolean       success = false;
            FacadeAgencia fa      = new FacadeAgencia();
            VUELO         vuelo   = new VUELO();

            vuelo.AGENCIA_CODIGO    = 1;
            vuelo.VUELO_ORIGEN      = origen;
            vuelo.VUELO_DESTINO     = destino;
            vuelo.VUELO_NUMERO      = numero;
            vuelo.VUELO_SALIDA      = salida;
            vuelo.VUELO_LLEGADA     = llegada;
            vuelo.VUELO_CAPACIDAD   = capacidad;
            vuelo.VUELO_DISPONIBLES = capacidad;
            success = fa.insertaVuelo(vuelo);
            return(success);
        }
コード例 #4
0
ファイル: TarifaDAO.cs プロジェクト: andresliger/AgenciaMVC
 public Boolean validatePercents(Decimal last_value, Decimal new_value)
 {
     objF = new FacadeAgencia();
     return(objF.validatePercent(last_value, new_value));
 }
コード例 #5
0
        public List <VUELO_RESERVA> traerReservasPorUsuario(int cod)
        {
            FacadeAgencia fa = new FacadeAgencia();

            return(fa.mostrarVuelosReservaPorCodigoUsuario(cod));
        }
コード例 #6
0
 public LoginDAO()
 {
     objF     = new FacadeAgencia();
     usuarios = objF.mostrarUsuarios();
 }