コード例 #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);
 }
コード例 #2
0
        public IList <Flight> GetFlightsByOriginCountry(int countryCode)
        {
            IList <Flight> flights;

            Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
            flights = dao.GetFlightsByOriginCountry(countryCode);
            return(flights);
        }
コード例 #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);
        }
コード例 #4
0
        public IList <Flight> GetAllFlights()
        {
            IList <Flight> flights;

            Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL();
            flights = dao.GetAll();
            return(flights);
        }
コード例 #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();
     }
 }
コード例 #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();
     }
 }