public override void OnActionExecuting(ActionExecutingContext filterContext) { if (!filterContext.Controller.ViewData.ModelState.IsValid) { IslemSonucu sonuc = new IslemSonucu { BasariliMi = false, Mesaj = "Girmiş olduğunuz değerler uygun değildir. Sayfayı yenileyip tekrar deneyin.", }; filterContext.Result = new JsonResult() { Data = sonuc.JsonaCevir(), JsonRequestBehavior = JsonRequestBehavior.AllowGet, }; } base.OnActionExecuting(filterContext); }
public JsonResult JSonuc(IslemSonucu sonuc) { return Json(sonuc.JsonaCevir(), JsonRequestBehavior.AllowGet); }
public JsonResult JSonuc(IslemSonucu sonuc) { return(Json(sonuc.JsonaCevir(), JsonRequestBehavior.AllowGet)); }