// // GET: /FeedBack/ #region ajax public ActionResult InsertFeedBack(string entity) { JavaScriptSerializer serializer = new JavaScriptSerializer(); FeedBack model = serializer.Deserialize <FeedBack>(entity); model.CreateUserID = CurrentUser.UserID; bool flag = FeedBackBusiness.InsertFeedBack(model); JsonDictionary.Add("Result", flag?1:0); return(new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public JsonResult SaveFeedBack(string entity) { var result = false; string msg = "提交失败,请稍后再试!"; if (CurrentUser == null) { msg = "您尚未登录,请登录后在操作!"; } else { FeedBack model = JsonConvert.DeserializeObject <FeedBack>(entity); model.CreateUserID = CurrentUser.CreateUserID; result = FeedBackBusiness.InsertFeedBack(model); } JsonDictionary.Add("result", result); JsonDictionary.Add("errorMsg", msg); return(new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }