Esempio n. 1
0
        public Aeronave GetAeronave()
        {
            Entities db   = new Entities();
            var      mant = db.MANTENCION_AERO.Where(x => x.ID_MANTENCION == this.IdMantencion).First();

            return(Aeronave.AeronaveBDaAPP(mant.AERONAVES));
        }
Esempio n. 2
0
        public static List <Aeronave> getAllAeronavesFromDB()
        {
            Entities        db         = new Entities();
            var             lista      = db.AERONAVES.ToList();
            List <Aeronave> listaFinal = new List <Aeronave>();

            foreach (var item in lista)
            {
                listaFinal.Add(Aeronave.AeronaveBDaAPP(item));
            }
            return(listaFinal);
        }
Esempio n. 3
0
        public static Vuelo VueloBDaVueloAPP(VUELOS vuelo)
        {
            int    numeroVuelo = decimal.ToInt32(vuelo.N_VUELO);
            string condicion   = vuelo.CONDICION_VUELO;
            int    totalTiempo = decimal.ToInt32(vuelo.TOTAL_TIEMPO_VUELO);
            string origen      = vuelo.ORIGEN_VUELO;
            string destino     = vuelo.DESTINO_VUELO;

            AERONAVES      ae       = vuelo.AERONAVES;
            Aeronave       aeronave = Aeronave.AeronaveBDaAPP(ae);
            List <Usuario> usuarios = new List <Usuario>();

            foreach (var item in vuelo.USUARIO)
            {
                usuarios.Add(Usuario.UsuarioBDaUsuarioAPP(item));
            }

            return(new Vuelo(numeroVuelo, condicion, totalTiempo, origen, destino, aeronave, usuarios));
        }
Esempio n. 4
0
        public static Aeronave GetAeronave(string matricula)
        {
            Entities db = new Entities();

            return(Aeronave.AeronaveBDaAPP(db.AERONAVES.Where(x => x.MATRICULA == matricula).First()));
        }