コード例 #1
0
        public static IAirTravelManager Create(string manager)
        {
            IAirTravelManager airtravelManager = null;

            switch (manager)
            {
            case "Airline":
                airtravelManager = new AirLineManager();
                break;

            case "City":
                airtravelManager = new CityManager();
                break;

            case "Flight":
                airtravelManager = new FlightManager();
                break;

            case "Route":
                airtravelManager = new RouteManager();
                break;

            case "Schedule":
                airtravelManager = new ScheduleManager();
                break;
            }

            return(airtravelManager);
        }
コード例 #2
0
        public List <HappyTrip.Model.Entities.AirTravel.Airline> GetAllAirlinesCollecction()
        {
            AirLineManager am = new AirLineManager();

            AllAirlines = new List <Entities.AirTravel.Airline>();
            AllAirlines = am.GetAirLines().ToList();
            AllAirlines.Sort();
            return(AllAirlines);
        }