Пример #1
0
        /// <summary>
        /// Constructor adds items to the top-level menu
        /// </summary>
        public WorldDBMenu(ICountryDAO countryDAO) : base()
        {
            // TODO 02a: Change this constructor to require country dao

            // TODO 02c: Assign the Interfaces to protected variables so we can use them later
            this.countryDAO = countryDAO;
        }
Пример #2
0
 public FacadeBase()
 {
     _airlineDAO  = new AirlineDAOMSSQL();
     _countryDAO  = new CountryDAOMSSQL();
     _customerDAO = new CustomerDAOMSSQL();
     _flightDAO   = new FlightDAOMSSQL();
     _ticketDAO   = new TicketDAOMSSQL();
 }
Пример #3
0
 public FacadeBase()
 {
     this._airlineDAO  = new AirlineDAOMSSQL();
     this._countryDAO  = new CountryDAOMSQQL();
     this._customerDAO = new CustomerDAOMSSQL();
     this._flightDAO   = new FlightDAOMSSQL();
     this._ticketDAO   = new TIcketDAOMSSQL();
 }
Пример #4
0
 public FacadeBase(IAirlineDAO airlineDAO, ICountryDAO countryDAO, ICustomerDAO customerDAO, IFlightDAO flightDAO, ITicketDAO ticketDAO, IAdministratorDAO administratorDAO)
 {
     _airlineDAO       = airlineDAO;
     _countryDAO       = countryDAO;
     _customerDAO      = customerDAO;
     _flightDAO        = flightDAO;
     _ticketDAO        = ticketDAO;
     _administratorDAO = administratorDAO;
 }
Пример #5
0
 protected FacadeBase(bool test)
 {
     _airlineDAO  = new AirlineCompany();
     _countryDAO  = new Country();
     _customerDAO = customerDAO;
     _adminDAO    = adminDAO;
     _user        = user;
     _flightDAO   = flightDAO;
     _ticketDAO   = ticketDAO;
 }
Пример #6
0
 public FacadeBase()
 {
     _adminDAO      = new AdministratorDAOMSSQL();
     _airlineDAO    = new AirlineDAOMSSQL();
     _customerDAO   = new CustomerDAOMSSQL();
     _userDAO       = new UserDAOMSSQL();
     _flightDAO     = new FlightDAOMSSQL();
     _ticketDAO     = new TicketDAOMSSQL();
     _countryDAO    = new CountryDAOMSSQL();
     _backgroundDAO = new MaintenanceDAOMSSQL();
 }
Пример #7
0
 protected FacadeBase()
 {
     _airlineDAO  = new AirlineDAOPGSQL();
     _countryDAO  = new CountryDAOPGSQL();
     _customerDAO = new CustomerDAOPGSQL();
     _adminDAO    = new AdminDAOPGSQL();
     _userDAO     = new UserDAOPGSQL();
     _flightDAO   = new FlightDAOPGSQL();
     _ticketDAO   = new TicketDAOPGSQL();
     _flightsTicketsHistoryDAO = new FlightsTicketsHistoryDAOPGSQL();
 }
Пример #8
0
 public FacadeBase()
 {
     _airlineDAO        = new AirlineDAO();
     _countryDAO        = new CountryDAO();
     _customerDAO       = new CustomerDAO();
     _flightDAO         = new FlightDAO();
     _ticketDAO         = new TicketDAO();
     _userRoleDAO       = new UserRoleDAO();
     _userRepositoryDAO = new UserRepositoryDAO();
     _adminDAO          = new AdminDAO();
 }
Пример #9
0
        public FacadeBase(bool testMode = false)
        {
            _ticketDAO   = new TicketDAOMSSQL(testMode);
            _customerDAO = new CustomerDAOMSSQL(testMode);
            _flightDAO   = new FlightDAOMSSQL(testMode);
            _countryDAO  = new CountryDAOMSSQL(testMode);

            log.Debug($"creating airlineDAO from type AirlineDAOMSSQL, testMode = {testMode}");
            _airlineDAO = new AirlineDAOMSSQL(testMode);
            log.Debug("AirlineDAOMSSQL created successfully");
        }
Пример #10
0
 public FacadeBase(bool testMode)
 {
     GlobalConfig.GetConfiguration(testMode);
     _airlineDAO  = new AirlineDAOPGSQL();
     _countryDAO  = new CountryDAOPGSQL();
     _customerDAO = new CustomerDAOPGSQL();
     _adminDAO    = new AdminDAOPGSQL();
     _userDAO     = new UserDAOPGSQL();
     _flightDAO   = new FlightDAOPGSQL();
     _ticketDAO   = new TicketDAOPGSQL();
 }
Пример #11
0
        static void Main(string[] args)
        {
            //IConfigurationBuilder builder = new ConfigurationBuilder()
            //    .SetBasePath(Directory.GetCurrentDirectory())
            //    .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            //IConfigurationRoot configuration = builder.Build();
            //string connectionString = configuration.GetConnectionString("World");


            ICityDAO     cityDAO     = null;
            ICountryDAO  countryDAO  = null;
            ILanguageDAO languageDAO = null;

            WorldGeographyCLI cli = new WorldGeographyCLI(cityDAO, countryDAO, languageDAO);

            cli.RunCLI();
        }
Пример #12
0
        public FacadeBase()
        {
            __airLineDAO = new AirLineDAOMSSQL();
            _airLineDAO  = __airLineDAO;

            __countryDAO = new CountryDAOMSSQL();
            _countryDAO  = __countryDAO;

            __customerDAO = new CustomerDAOMSSQL();
            _customerDAO  = __customerDAO;

            __flightDAO = new FlightDAOMSSQL();
            _flightDAO  = __flightDAO;

            __ticketDAO = new TicketDAOMSSQL();
            _ticketDAO  = __ticketDAO;

            __flightStatusDAO = new FlightStatusDAOMSSQL();
            _flightStatusDAO  = __flightStatusDAO;
        }
Пример #13
0
        public void SetUp()
        {
            transaction = new TransactionScope();

            DALFactory factory = DALFactory.GetInstance();
            db = factory.CreateDatabase();
            dao = factory.CreateCountryDAO(db);

            country = new Country {
                Id = 1,
                Name = "Österreich"
            };

            runDbCommands(db, new List<string> {
                "SET FOREIGN_KEY_CHECKS=0",
                "DELETE FROM `country`",
                "INSERT INTO `country` VALUES (1, 'Österreich')",
                "INSERT INTO `country` VALUES (2, 'Belgien')"
            });
        }
Пример #14
0
        static void Main(string[] args)
        {
            // Use this as is, it will allow you access to the data in appsettings.json file
            IConfigurationBuilder builder = new ConfigurationBuilder()
                                            .SetBasePath(Directory.GetCurrentDirectory())
                                            .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);

            IConfigurationRoot configuration = builder.Build();

            // Replace world with the key name used for your connection string in the appsettings.json file
            string connectionString = configuration.GetConnectionString("World");

            ICityDAO     cityDAO     = new CitySqlDAO(connectionString);
            ICountryDAO  countryDAO  = null;
            ILanguageDAO languageDAO = new LanguageSqlDAO(connectionString);

            WorldGeographyCLI cli = new WorldGeographyCLI(cityDAO, countryDAO, languageDAO);

            cli.RunCLI();
        }
Пример #15
0
        /// <summary>
        /// Constructor adds items to the top-level menu
        /// </summary>
        public WorldDBMenu(ICountryDAO countryDAO)
        {
            // TODO 05a: Change this constructor to require country dao
            // TODO 15a: Change this constructor to require country-language dao

            // TODO 05d: Assign the Interfaces to protected variables so we can use them later
            this.countryDAO = countryDAO;


            // Add options to this menu
            AddOption("List Countries", ListCountries)
            .AddOption("List Countries on a continent", ListCountriesForContinent)
            .AddOption("Select a country", SelectACountry)
            .AddOption("Quit", Exit);

            Configure(cfg =>
            {
                cfg.ItemForegroundColor         = ConsoleColor.Yellow;
                cfg.SelectedItemForegroundColor = ConsoleColor.Green;
            });
        }
Пример #16
0
 public UserBO(IUserDAO userDao, ICountryDAO countryDao, IMappingEngine mapper)
 {
     userDAO = userDao;
     countryDAO = countryDao;
     Mapper = mapper;
 }
Пример #17
0
 // DI: Step 2 - Add any necessary interfaces as parameters only if needed in this controller
 public WorldController(ICountryDAO countryDao, ICityDAO cityDao)
 {
     _countryDao = countryDao;
     _cityDao    = cityDao;
 }
Пример #18
0
 // TODO 02 (Controller): Derive the city controller from AppController so we have access to authProvider
 // Note that we have to inject an IAuthProvider and pass it to the base contructor
 public CityController(ICityDAO cityDAO, ICountryDAO countryDAO, IAuthProvider authProvider) : base(authProvider)
 {
     this.cityDAO    = cityDAO;
     this.countryDAO = countryDAO;
 }
 public WorldController(ICountryDAO countryDAL, ICityDAO cityDAL)
 {
     this.countryDAL = countryDAL;
     this.cityDAL    = cityDAL;
 }
Пример #20
0
 public CountryController(ICityDAO cityDao, ICountryDAO countryDao, ILanguageDAO languageDao)
 {
     this.cityDao     = cityDao;
     this.countryDao  = countryDao;
     this.languageDao = languageDao;
 }
 public CountryManager()
 {
     _CountryDAOLinq = new CountryDAOLinq();
 }
 public CityController(ICityDAO cityDAO, ICountryDAO countryDAO)
 {
     this.cityDAO    = cityDAO;
     this.countryDAO = countryDAO;
 }
Пример #23
0
 public Menu(ICurrencyDAO currencyDAO, ICountryDAO countryDAO, IHistoryDAO historyDAO)
 {
     this.currencyDAO = currencyDAO;
     this.countryDAO  = countryDAO;
     this.historyDAO  = historyDAO;
 }
Пример #24
0
 public CountryController(ICountryDAO countryDAO)
 {
     this.countryDAO = countryDAO;
 }
Пример #25
0
 public WorldGeographyCLI(ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO)
 {
     this.cityDAO     = cityDAO;
     this.languageDAO = languageDAO;
     this.countryDAO  = countryDAO;
 }
Пример #26
0
 public CountryService(ICountryDAO dao)
 {
     this.dao = dao;
 }
Пример #27
0
 public WorldController(ICountryDAO countryDao, ICityDAO cityDao)
 {
     this.countryDao = countryDao;
     this.cityDao    = cityDao;
 }
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public CountryMenu(Country country, ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO) :
     base(cityDAO, countryDAO, languageDAO)
 {
     // Save the country (which will be used for all country queries
     this.country = country;
 }
Пример #29
0
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public WorldDBMenu(ICityDAO cityDAO, ICountryDAO countryDAO, ILanguageDAO languageDAO) : base()
 {
     this.cityDAO     = cityDAO;
     this.languageDAO = languageDAO;
     this.countryDAO  = countryDAO;
 }
Пример #30
0
 public CountryManager()
 {
     _CountryDAOLinq = new CountryDAOLinq();
 }
 public CountryController(ICountryDAO countryDao)
 {
     this.countryDao = countryDao;
 }