示例#1
0
        public ActionResult Detail(string parkCode, string choiceTemp)
        {
            if (!String.IsNullOrEmpty(choiceTemp))
            {
                Session["temperature"] = choiceTemp;
            }
            Park          onePark  = new Park();
            WeatherChoice weathers = new WeatherChoice();

            weathers.ChoiceTemp = Session["temperature"] as string;
            onePark             = dal.GetSinglePark(parkCode);
            onePark.Weather     = dal.GetAllWeather(parkCode);

            if (onePark == null)
            {
                return(HttpNotFound());
            }

            var tuple = new Tuple <Park, WeatherChoice>(onePark, weathers);

            return(View("Detail", tuple));
        }