public ActionResult SubmitUploadForm(AdjustrefundUploadViewModel formData) { AdjustRefundUploadService service = new AdjustRefundUploadService(); //AdjustrefundUploadViewModel model = service.SubmitMergeFormData(formData); ValidationResult result = service.SubmitForm(formData, ModelState); return(Json( new { success = !result.ErrorFlag, responseText = result.Message, errorList = result.ModelStateErrorList }, JsonRequestBehavior.AllowGet )); }
public ActionResult SubmitForm(AdjustrefundUploadViewModel formData) { AdjustRefundUploadService service = new AdjustRefundUploadService(); ValidationResult result = service.SubmitForm(formData, ModelState); //return Json( // new { success = !result.ErrorFlag, responseText = result.Message, errorList = result.ModelStateErrorList }, // JsonRequestBehavior.AllowGet //); return(new JsonResult() { Data = new { success = !result.ErrorFlag, responseText = result.Message, errorList = result.ModelStateErrorList, dataCallback = result.AdditionalInfo1 }, JsonRequestBehavior = JsonRequestBehavior.AllowGet, //MaxJsonLength = Int32.MaxValue // Use this value to set your maximum size for all of your Requests }); }