public void whenGetAllParksIsRunReturnsListOfParks() { IList <Park> parks = new List <Park>(); parks = _parkDAL.GetAllParks(); Assert.IsNotNull(parks); }
public ActionResult Index() { List <NationalPark> parks = parkDAL.GetAllParks(); Survey survey = new Survey(parks); return(View("Index", survey)); }
public ActionResult Index() { if (Session["isFahrenheit"] == null) { Session["isFahrenheit"] = true; } return(View("Index", parkDAL.GetAllParks())); }
public ActionResult TakeSurvey() { List <ParkModel> parks = parkDAL.GetAllParks(); SurveyFormModel emptySurvey = new SurveyFormModel(); emptySurvey.AvailableParks = parks; return(View("TakeSurvey", emptySurvey)); }
// GET: Home public ActionResult Index() { if (Session["isCelsius"] == null) { Session["isCelsius"] = false; } List <Park> model = parkDAL.GetAllParks(); return(View("Index", model)); }
public IActionResult TakeSurvey() { var parks = parkDAL.GetAllParks(); var options = parks.Select <Park, SelectListItem>(park => new SelectListItem() { Text = park.ParkName, Value = park.ParkCode }); ViewBag.Parks = options; Survey survey = new Survey(); return(View(survey)); }
public ActionResult ChoosePark() { List <ParkModel> parks = parkDAL.GetAllParks(); parks.ForEach(park => park.Image = parkDAL.GetImageByParkId(park.ParkId)); return(View("ChoosePark", parks)); }
/// <summary> /// Home page /// </summary> /// <returns></returns> public ActionResult Index() { // Get all parks from DB IList <Park> parks = _parkDAL.GetAllParks(); return(View("Index", parks)); }
// GET: Home public ActionResult Index() { List <ParkModel> parks = dal.GetAllParks(); Session["TempChoice"] = GetTempChoice(); return(View("Index", parks)); }
public IActionResult Index() { HttpContext.Session.SetString("SessionTemperatureKey", "Fahrenheit"); List <Park> parksList = parkDAL.GetAllParks(); return(View(parksList)); }
// GET: / // GET: Home/ // GET: Home/Index public ActionResult Index() { Session["tempSetting"] = "Fahrenheit"; List <ParkModel> allParks = parkDAL.GetAllParks(); return(View("Index", allParks)); }
public IActionResult Index(Park park) { var parks = parkDAL.GetAllParks(); park.Parks = parks; return(View(parks)); }
public IActionResult Index() { IndexViewModel allParks = new IndexViewModel(); allParks.Parks = _parkDAL.GetAllParks(); return(View(allParks)); }
// GET: Home Page <--list of Parks public ActionResult Home() { List <Park> model = new List <Park>(); //add dal that gets list of parks and puts into model model = dal.GetAllParks(); return(View("Home", model)); }
public ActionResult Index() { List <Park> parks = parkDal.GetAllParks(); if (parks == null) { return(HttpNotFound()); } return(View("Index", parks)); }
public Dictionary <string, string> GetParkNameAndCode() { Dictionary <string, string> output = new Dictionary <string, string>(); List <Park> parks = dal.GetAllParks(); foreach (Park park in parks) { output[park.imgName] = park.parkName; } return(output); }
public IActionResult Results() { Dictionary <string, int> surveysAndTheirCounts = surveyDAL.GetFavoriteParkBySurveyCount(); SurveyResultsViewModel srvm = new SurveyResultsViewModel() { Results = surveysAndTheirCounts, Parks = parkDAL.GetAllParks() }; return(View(srvm)); }
public ActionResult SurveyView() { SurveyModel survey = new SurveyModel(); List <ParkModel> parks = parkDal.GetAllParks(); survey.Parks = parks; //surveyDal.MakePost(survey); return(View("SurveyView", survey)); }
/// <summary> /// Survey Index page /// </summary> /// <returns></returns> public ActionResult Index() { List <Park> parks = _parkDAL.GetAllParks(); //Select List For Park names and Code List <SelectListItem> parkItems = new List <SelectListItem>(); // Makes a new List of only Park.Name to use for the form drop foreach (Park p in parks) { parkItems.Add(new SelectListItem { Text = p.ParkName, Value = p.ParkCode }); } //Put SelectLsit in TempData to access in the View TempData["Parks"] = parkItems; //Select List For State TempData["States"] = States; //Select List For Activity Level TempData["ActivityLevel"] = new List <SelectListItem>() { new SelectListItem { Text = "Extremely Active", Value = "extremelyActive" }, new SelectListItem { Text = "Active", Value = "active" }, new SelectListItem { Text = "Sedentary", Value = "sedentary" }, new SelectListItem { Text = "Inactive", Value = "inactive" } }; return(View("Index")); }
// GET: Home public ActionResult Index() { List <Park> parks = dal.GetAllParks(); return(View("Index", parks)); }
public ActionResult Index() { var parks = _dal.GetAllParks(); return(View(parks)); }
public IHttpActionResult GetParks() { List <ParkModel> parks = parkDAL.GetAllParks(); return(Ok(parks)); }
public ActionResult Index() { List <NationalPark> parks = parkDAL.GetAllParks(); return(View("Index", parks)); }
public IActionResult ParksList() { var parks = parkDAL.GetAllParks(); return(View(parks)); }
// GET: Home public ActionResult Index(List <ParkModel> parks) { var p = dal.GetAllParks(); return(View("Index", p)); }
// GET: NationalPark public ActionResult Index() { List <NationalParkModel> list = parkDAL.GetAllParks(); return(View("Index", list)); }
/// <summary> /// Gets a list of all the parks in the system. /// </summary> /// <returns>Returns a list of all parks in alphabetical order</returns> public List <Park> GetParksList() { List <Park> list = _db.GetAllParks(); return(list); }
// GET: Home public ActionResult Index() { List <Park> model = dal.GetAllParks(); return(View("Index", model)); }
// GET: Home public ActionResult Index() { return(View("Index", parkDAL.GetAllParks())); }
// GET: Park public ActionResult Index() { var parks = _parkDal.GetAllParks(); return View("Index", parks); }