Esempio n. 1
0
 public FacadeBase()
 {
     _airlineDAO  = new AirlineDAOMSSQL();
     _countryDAO  = new CountryDAOMSSQL();
     _customerDAO = new CustomerDAOMSSQL();
     _flightDAO   = new FlightDAOMSSQL();
     _ticketDAO   = new TicketDAOMSSQL();
 }
Esempio n. 2
0
 public FacadeBase()
 {
     this._airlineDAO  = new AirlineDAOMSSQL();
     this._countryDAO  = new CountryDAOMSQQL();
     this._customerDAO = new CustomerDAOMSSQL();
     this._flightDAO   = new FlightDAOMSSQL();
     this._ticketDAO   = new TIcketDAOMSSQL();
 }
        public void Execute()
        {
            DAOFactory factory   = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
            IFlightDAO flightDao = factory.GetFlight();

            entList = flightDao.GetByDate(departure, arrival);
            //throw new System.NotImplementedException();
        }
Esempio n. 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;
 }
Esempio n. 5
0
 protected FacadeBase(bool test)
 {
     _airlineDAO  = new AirlineCompany();
     _countryDAO  = new Country();
     _customerDAO = customerDAO;
     _adminDAO    = adminDAO;
     _user        = user;
     _flightDAO   = flightDAO;
     _ticketDAO   = ticketDAO;
 }
Esempio n. 6
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();
 }
Esempio n. 7
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();
 }
Esempio n. 8
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();
 }
 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();
 }
Esempio n. 10
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");
        }
Esempio n. 11
0
 public void Execute()
 {
     try
     {
         DAOFactory factory   = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
         IFlightDAO flightDao = factory.GetFlight();
         i = flightDao.FindIdEntity(_id);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
 public void Execute()
 {
     try
     {
         DAOFactory factory   = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
         IFlightDAO flightDao = factory.GetFlight();
         flightDao.Update(_flight);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
Esempio n. 13
0
 public void Execute()
 {
     try
     {
         Console.WriteLine("id=" + _id);
         DAOFactory factory   = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
         IFlightDAO flightDao = factory.GetFlight();
         _id = flightDao.Add(_flight);
         Console.WriteLine("id=" + _id);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
 }
        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;
        }
Esempio n. 15
0
 /// <summary>
 /// Parameterized Constructor
 /// </summary>
 /// <param name="flightDAO"></param>
 public FlightManager(IFlightDAO flightDAO)
 {
     this.flightDAO = flightDAO;
 }
Esempio n. 16
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public FlightManager()
 {
     flightDAO = (IFlightDAO)AirTravelDAOFactory.GetInstance().Create("Flight");
 }
 private void InitializeDAOs()
 {
     _ticketDAO = new TicketDAOEF();
     _flightDAO = new FlightDAOEF();
 }
Esempio n. 18
0
 public Flights()
 {
     flightDAO = AirTravelDAOFactory.GetInstance().CreateFlightDAO();
 }