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); }
public IList <Flight> GetFlightsByOriginCountry(int countryCode) { IList <Flight> flights; Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL(); flights = dao.GetFlightsByOriginCountry(countryCode); return(flights); }
public Dictionary <Flight, int> GetAllFlightsVacancy() { Dictionary <Flight, int> flightDic = new Dictionary <Flight, int>(); Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL(); flightDic = dao.GetAllFlightsVacancy(); return(flightDic); }
public IList <Flight> GetAllFlights() { IList <Flight> flights; Flights_project.FlightDAOMSSQL dao = new FlightDAOMSSQL(); flights = dao.GetAll(); return(flights); }
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(); } }
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(); } }