예제 #1
0
        public JsonResult GetDataPoints(string city, string scaleUnit)
        {
            var apiHelper      = new ApiHelper(city, scaleUnit);
            var rootObjectItem = apiHelper.GetWeatherData();

            var weatherModel      = new WeatherDataModel();
            var weatherModelList  = weatherModel.GetWeaterForecastList(rootObjectItem);
            GraphicDataPoints gdp = new GraphicDataPoints();
            var result            = gdp.GetDataPointObject(weatherModelList);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public ActionResult GetGraphic(string city, string scaleUnit)
        {
            var apiHelper      = new ApiHelper(city, scaleUnit);
            var rootObjectItem = apiHelper.GetWeatherData();

            var weatherModel     = new WeatherDataModel();
            var weatherModelList = weatherModel.GetWeaterForecastList(rootObjectItem);

            ViewBag.WeatherList = weatherModelList;

            return(PartialView());
        }