示例#1
0
        public ActionResult GetWeather(int CityID, string API)
        {
            WeatherApiName oWeatherApiName = (WeatherApiName)Enum.Parse(typeof(WeatherApiName), API);

            oWeatherHelper = WeatherHelperFactory.GetWeatherHelper(oWeatherApiName);
            return(Json(oWeatherHelper.GetWeatherInformation(Server.MapPath(CITY_LIST_RELATIVE_PATH), CityID), JsonRequestBehavior.AllowGet));
        }