//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}"); } }
/// <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 CapstoneCLI(ISiteDAO siteDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, ICampgroundDAO campgroundDAO) { this.campgroundDAO = campgroundDAO; this.siteDAO = siteDAO; this.reservationDAO = reservationDAO; this.parkDAO = parkDAO; }
//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"); }
public ParkService(IParkDAO parkDAO, ICampgroundDAO campgroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO) { this.ParkDAO = parkDAO; this.CampgroundDAO = campgroundDAO; this.SiteDAO = siteDAO; this.ReservationDAO = reservationDAO; }
public MainMenuCLI(IParkDAO parkDAO, ICampGroundDAO campGroundDAO, ICampSiteDAO campSiteDAO, IReservationDAO reservationDAO) { this.parkDAO = parkDAO; this.campGroundDAO = campGroundDAO; this.campSiteDAO = campSiteDAO; this.reservationDAO = reservationDAO; }
/// <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; }
public ProjectCLI(ICampgroundDAO campgroundDAO, IParkDAO parkDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) { this.campgroundDAO = campgroundDAO; this.parkDAO = parkDAO; this.reservationDAO = reservationDAO; this.siteDAO = siteDAO; }
public ParksReservationCLI(IParkDAO parkDAO, ICampGroundDAO campGroundDAO, ISiteDAO siteDAO, IReservationDAO reservationDAO) { this.reservationDAO = reservationDAO; this.parkDAO = parkDAO; this.siteDAO = siteDAO; this.campGroundDAO = campGroundDAO; }
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; }
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; }
//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; }
/// <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; }
//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; }
/// <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"); }
public SiteMenu(IList <Campground> campgroundsList, Park parkSelection, IParkDAO parkDAO, ICampgroundDAO campgroundDAO, IReservationDAO reservationDAO, ISiteDAO siteDAO) : base(parkDAO, campgroundDAO, reservationDAO, siteDAO) { this.campgrounds = campgroundsList; this.park = parkSelection; this.Title = $"{park.Name} National Park Campgrounds"; this.menuOptions.Add("1", "Search for Available Reservation"); this.menuOptions.Add("Q", "Go Back"); }
//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 void Initialize() { _db = new ParkDAO(_connectionString); _userMgr = new UserManager(new UserSecurityDAO(_connectionString)); // Initialize a new transaction scope. This automatically begins the transaction. _tran = new TransactionScope(); }
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; }
/// <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; }
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; }
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; }
/// <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.... }
/// <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; }
/// <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; }
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"); }
/// <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; }
/// <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 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(); }