public ActionResult RoadConditions()
        {
            var webClient = new MessageWebService();
            var result    = webClient.GetRoadConditions();

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

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public IHttpActionResult GetRoadConditions()
        {
            var webClient = new MessageWebService();
            var result    = webClient.GetRoadConditions();

            if (result == null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }
        public ActionResult RoadConditions()
        {
            var user = UserManager.FindById(User.Identity.GetUserId());

            if (user != null)
            {
                StartLocation = user.StartLocation;
            }

            var webClient = new MessageWebService(StartLocation);
            var result    = webClient.GetRoadConditions();

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

            return(Json(result, JsonRequestBehavior.AllowGet));
        }