Пример #1
0
 /// <summary>
 /// /
 /// </summary>
 /// <param name="park"></param>
 /// <param name="campgroundDAO"></param>
 /// <param name="siteDAO"></param>
 /// <param name="reservationDAO"></param>
 public CampgroundCLI(Park park, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
 {
     this.park           = park;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="selectedPark"></param>
 /// <param name="campgroundDAO"></param>
 /// <param name="siteDAO"></param>
 /// <param name="reservationDAO"></param>
 public ParkCLI(Park selectedPark, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
 {
     this.park           = selectedPark;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
 }
Пример #3
0
        //Constructor to call in IDAO, Generate List using GetParks(), and Create our menu with parks list
        public ViewParksMenu(IParkDAO parkdao, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) : base()
        {
            this.parkdao        = parkdao;
            this.campgroundDAO  = campgroundDAO;
            this.reservationDAO = reservationDAO;
            this.siteDAO        = siteDAO;

            //parkdao, campgroundDAO, reservationDAO, siteDAO,

            try
            {
                parkList = parkdao.GetParks();

                this.Title = "****View Parks****";
                for (int i = 0; i < parkList.Count; i++)
                {
                    this.menuOptions.Add($"{i + 1}", $"{parkList[i].Name}");
                }
                this.menuOptions.Add("Q", "Quit");
            }
            catch (Exception ex)
            {
                Console.WriteLine($"There was an error: {ex.Message}");
            }
        }
 //public CampGroundMenu(int selectedPark)
 public CampGroundMenu(Park parkSelection, IParkDAO parkDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) : base(parkDAO, campgroundDAO, reservationDAO, siteDAO)
 {
     this.parkSelection = parkSelection;
     this.Title         = $"Campground in {parkSelection.Name}";
     this.menuOptions.Add("1", "View Campgrounds");
     this.menuOptions.Add("Q", "Return to previous screen");
 }
 /// <summary>
 /// CLI constructor
 /// </summary>
 /// <param name="parkDAO">Park SQL DAO</param>
 /// <param name="campgroundDAO">Campground SQL DAO</param>
 /// <param name="siteDAO">Site SQL DAO</param>
 /// <param name="reservationDAO">Reservation SQL DAO</param>
 public NationalParkCLI(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
 {
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
 }
 public ProjectCLI(ICampgroundDAO campgroundDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO)
 {
     this.campgroundDAO  = campgroundDAO;
     this.parkDAO        = parkDAO;
     this.reservationDAO = reservationDAO;
     this.siteDAO        = siteDAO;
 }
Пример #7
0
 public ParkService(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
 {
     this.ParkDAO        = parkDAO;
     this.CampgroundDAO  = campgroundDAO;
     this.SiteDAO        = siteDAO;
     this.ReservationDAO = reservationDAO;
 }
Пример #8
0
 public CapstoneCLI(ISiteDAO siteDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, ICampgroundDAO campgroundDAO)
 {
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
     this.parkDAO        = parkDAO;
 }
Пример #9
0
 /// <summary>
 /// Constructor adds items to the top-level menu.
 /// </summary>
 public MainMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO) : base("Main Menu")
 {
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
 }
Пример #10
0
 public CampgroundMenu(int chosen, ICampgroundDAO campDAO, IParkDAO parkDAO, ISiteDAO siteDAO, IReservationDAL resDal) : base("Campground")
 {
     this.chosen = chosen;
     CampDAO     = campDAO;
     ParkDAO     = parkDAO;
     SiteDAO     = siteDAO;
     ResDal      = resDal;
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="parkDAO">DAO for parks table</param>
        /// <param name="campgroundDAO">DAO for campgrounds table</param>
        /// <param name="siteDAO">DAO for sites table</param>
        /// <param name="reservationDAO">DAO for reservation table</param>
        /// <param name="park">Object for a park that the user selected earlier</param>
        public CampgroundMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO, Park park) :
            base(parkDAO, campgroundDAO, siteDAO, reservationDAO)
        {
            MyPark = park;

            this.menuOptions.Add("1", "Search for Available Reservation");
            this.menuOptions.Add("2", "Return to Previous Menu");
        }
 //the id of the selected park
 public CampgroundSubMenu(Park park, IParkDAO parkDAO, Campground campground, ICampgroundDAO campgroundDAO) :
     base("Sub-Menu 1")
 {
     // Store any values passed in....
     this.park          = park;
     this.campground    = campground;
     this.campgroundDAO = campgroundDAO;
 }
Пример #13
0
 /// <summary>
 /// Default constructor, pass in our DAO objects
 /// </summary>
 /// <param name="parkDAO">DAO for parks, created at start</param>
 /// <param name="campgroundDAO">DAO for campgrounds, created at start</param>
 /// <param name="siteDAO">DAO for campsites, created at start</param>
 /// <param name="reservationDAO">DAO for reservations, created at start</param>
 public CLIMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
 {
     this.menuOptions = new Dictionary <string, string>();
     MyParksDAO       = parkDAO;
     MyCampgroundDAO  = campgroundDAO;
     MySiteDAO        = siteDAO;
     MyReservationDAO = reservationDAO;
 }
Пример #14
0
 public CLI(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO, ISearchDAO searchDAO)
 {
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
     this.searchDAO      = searchDAO;
 }
Пример #15
0
 //private Campground Camp;
 //private Park Park;
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public ViewParksMenu(IParkDAO parkDao, ICampgroundDAO campDAO, ISiteDAO siteDAO, IReservationDAL reservationDAL) :
     base("ViewParksMenu")
 {
     ParkDAO        = parkDao;
     CampDAO        = campDAO;
     SiteDAO        = siteDAO;
     ReservationDAL = reservationDAL;
 }
Пример #16
0
 //This is our constructor (reognize by having the same name as the class) and the string is the only argument that it accepts
 public CLIMenu(string connectionString)
 {
     // Initializing our properties to be used through the class (they need the connection string to conect to the database)
     parkDAO        = new ParkSqlDAO(connectionString);
     campDAO        = new CampgroundSqlDAO(connectionString);
     siteDAO        = new SiteSqlDAO(connectionString);
     reservationDAO = new ReservationSqlDAO(connectionString);
 }
 public CampGroundCLI(IParksDAO parksDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO)
     : base(parksDAO, campgroundDAO, siteDAO, reservationDAO)
 {
     this.parksDAO       = parksDAO;
     this.campgroundDAO  = campgroundDAO;
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
 }
Пример #18
0
 public ParkInfoMenu(int chosen, ICampgroundDAO campp, IParkDAO parkDAO, ISiteDAO siteDAO, IReservationDAL reservationDAL) : base("Park Information")
 {
     this.chosen    = chosen;
     campDAO        = campp;
     ParkDAO        = parkDAO;
     SiteDAO        = siteDAO;
     ReservationDAL = reservationDAL;
 }
Пример #19
0
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public SubMenu1(ISiteDAO siteDAO, IReservationDAO reservationDAO, IParkDAO parkDAO, ICampgroundDAO campgroundDAO /** DAOs may be passed in... ***/) :
     base("Sub-Menu 1")
 {
     this.siteDAO        = siteDAO;
     this.reservationDAO = reservationDAO;
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     // Store any values or DAOs passed in....
 }
Пример #20
0
 /// <summary>
 /// Constructor adds items to the top-level menu. YOu will likely have parameters for one or more DAO's here...
 /// </summary>
 public MainMenu(IParkDAO parkDAO, ICampgroundDAO campDAO, ISiteDAO siteDAO, IReservationDAL resDal) : base("Main Menu")
 {
     //Camp = camp;
     //Park = park;
     this.parkDAO = parkDAO;
     this.campDAO = campDAO;
     this.siteDAO = siteDAO;
     this.resDal  = resDal;
 }
Пример #21
0
 public ReservationMenu(int campchoice, int chosen, IParkDAO parkDAO, ICampgroundDAO campDAO, ISiteDAO siteDAO, IReservationDAL resDal) : base("Reservations Menu")
 {
     this.campchoice = campchoice;
     this.chosen     = chosen;
     ParkDAO         = parkDAO;
     CampDAO         = campDAO;
     SiteDAO         = siteDAO;
     ResDal          = resDal;
 }
 /// <summary>
 /// Constructor for ParkInfoMenu takes all the DAOs and the park selected from the Main menu
 /// </summary>
 public ParkInfoMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO, Park park) :
     base("ParkInfoMenu")
 {
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     this.reservationDAO = reservationDAO;
     this.siteDAO        = siteDAO;
     this.park           = park;
 }
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public SubMenu1(Park park, IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO) :
     base("Sub-Menu 1")
 {
     this.park           = park;
     this.ParkDAO        = parkDAO;
     this.CampgroundDAO  = campgroundDAO;
     this.SiteDAO        = siteDAO;
     this.ReservationDAO = reservationDAO;
 }
Пример #24
0
 public MainMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) : base("Main Menu")
 {
     // Set any private variables here.
     this.parkDAO        = parkDAO;
     this.campgroundDAO  = campgroundDAO;
     this.reservationDAO = reservationDAO;
     this.siteDAO        = siteDAO;
     //this.campground = campground;
 }
Пример #25
0
        /// <summary>
        /// Constructor adds items to the top-level menu. YOu will likely have parameters for one or more DAO's here...
        /// </summary>
        public MainMenu(ICampgroundDAO campgroundDAO, ICampsiteDAO campsiteDAO, IParkDAO parkDAO, IReservationDAO reservationDAO) : base("Main Menu")
        {
            this.campgroundDAO  = campgroundDAO;
            this.campsiteDAO    = campsiteDAO;
            this.parkDAO        = parkDAO;
            this.reservationDAO = reservationDAO;

            //this.cityDAO = cityDAO;
            //this.countryDAO = countryDAO;
        }
Пример #26
0
        public MenuCLI(IParkDAO parkDAO, ISiteDAO siteDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO)
        {
            this.parkDAO        = parkDAO;
            this.siteDAO        = siteDAO;
            this.campgroundDAO  = campgroundDAO;
            this.reservationDAO = reservationDAO;

            // Start main menu
            RunParkMenu();
        }
Пример #27
0
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public ParkCampgroundsMenu(ICampgroundDAO campgroundDAO, ICampsiteDAO campsiteDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, Campground campground) :
     base("Sub-Menu 1")
 {
     // Store any values or DAOs passed in....
     this.campgroundDAO  = campgroundDAO;
     this.campsiteDAO    = campsiteDAO;
     this.parkDAO        = parkDAO;
     this.reservationDAO = reservationDAO;
     this.campground     = campground;
 }
Пример #28
0
        public IList <Site> DoCampSiteSearch(ICampgroundDAO campgroundDAO, int campgroundID_input, DateTime arrivalDate, DateTime departDate)
        {
            IList <Reservation> allReservationsinCampground = campgroundDAO.GetAllReseravations(campgroundID_input, arrivalDate, departDate);

            IList <Site> allSitesinCampground = campgroundDAO.GetAllSites(campgroundID_input);

            IList <Site> AvailableSites = campgroundDAO.AvailbleSites(allReservationsinCampground, allSitesinCampground);

            return(AvailableSites);
        }
 /// <summary>
 /// Constructor adds items to the top-level menu
 /// </summary>
 public ParkInfoMenu(ICampgroundDAO campgroundDAO, ICampsiteDAO campsiteDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, Park park) :
     base("ParkInfoMenu")
 {
     // Store any values or DAOs passed in....
     this.campgroundDAO  = campgroundDAO;
     this.campsiteDAO    = campsiteDAO;
     this.parkDAO        = parkDAO;
     this.reservationDAO = reservationDAO;
     this.park           = park;
 }
 public ParksMenu(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) : base(parkDAO, campgroundDAO, reservationDAO, siteDAO)
 {
     this.Title = "List of park names";
     parks      = parkDAO.GetParks();
     for (int i = 0; i < parks.Count; i++)
     {
         this.menuOptions.Add($"{i + 1}", $"{parks[i].Name}");
     }
     this.menuOptions.Add("Q", "Quit");
 }