public ActionResult GetJSON(Leerling leerling) { Klimatogram klimatogram = leerling.Klimatogram; object klim = klimatogram.MaakJsonObject(); return(Json(klim, JsonRequestBehavior.AllowGet)); }
public ActionResult KiesLocatie(Leerling leerling, Land land, KlimatogramKiezenLocatieViewModel kVM) { if (!ModelState.IsValid) { return(null); } Klimatogram klimatogram = land.GeefKlimatogram(kVM.Locatie); if (kVM.Locatie == null || klimatogram == null) { TempData["Error"] = "Er zijn geen gegevens beschikbaar voor de geselecteerde locatie."; return(JavaScript("window.location = '" + Url.Action("Index") + "'")); } if (HttpContext != null && HttpContext.Session != null) { HttpContext.Session["klimatogram"] = klimatogram; } leerling.Klimatogram = klimatogram; object klim = klimatogram.MaakJsonObject(); return(Json(klim, JsonRequestBehavior.AllowGet)); }