Ejemplo n.º 1
0
 public Flight GetFlightById(int id)
 {
     Flights_project.Flight         flight = new Flights_project.Flight();
     Flights_project.FlightDAOMSSQL dao    = new FlightDAOMSSQL();
     flight = dao.GetFlightById(id);
     return(flight);
 }
Ejemplo n.º 2
0
        public IList <Flight> GetFlightsByOriginCountry(int countryCode)
        {
            IList <Flight> flights;

            Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
            flights = dao.GetFlightsByOriginCountry(countryCode);
            return(flights);
        }
Ejemplo n.º 3
0
        public Dictionary <Flight, int> GetAllFlightsVacancy()
        {
            Dictionary <Flight, int> flightDic = new Dictionary <Flight, int>();

            Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
            flightDic = dao.GetAllFlightsVacancy();
            return(flightDic);
        }
Ejemplo n.º 4
0
        public IList <Flight> GetAllFlights()
        {
            IList <Flight> flights;

            Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
            flights = dao.GetAll();
            return(flights);
        }
Ejemplo n.º 5
0
 public IList <Flight> GetFlightsByLandingDate(DateTime landingDate)
 {
     if (landingDate < DateTime.Now)
     {
         IList <Flight> flights;
         Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
         flights = dao.GetFlightsByLandingDate(landingDate);
         return(flights);
     }
     else
     {
         throw new DateHasPassedExeption();
     }
 }
Ejemplo n.º 6
0
 public IList <Flight> GetFlightsByDepatrureDate(DateTime departureDate)
 {
     if (departureDate > DateTime.Now)
     {
         IList <Flight> flights;
         Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
         flights = dao.GetFlightsByDepatureDate(departureDate);
         return(flights);
     }
     else
     {
         throw new DateHasPassedExeption();
     }
 }