示例#1
0
        public ActionResult Detail(string id)
        {
            if (id == null)
            {
                id = "CVNP";
            }
            ParkSqlDAL ParkSql = new ParkSqlDAL(connectionString);



            var tempValue = Session["tempValue"];

            if (tempValue == null)
            {
                tempValue = 0;
            }
            WeatherSqlDAL sqlweather = new WeatherSqlDAL(connectionString);
            ParkModel     park       = ParkSql.SelectedParkDecriptiveDetails(id);

            park.WeatherList = sqlweather.SpecificParkWeather(id);

            Session["tempValue"]   = tempValue;
            park.TempValueProperty = (int)tempValue;

            ViewBag.WeatherData = park.WeatherList;

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