public ActionResult DakaPinglun(int bijiid, int dakarenid, int peibanshi, int kongjianid, int bookid, int pinglunren, string pingluncontent) { Message msg = new Message(); BijiPinglun pinglun = new BijiPinglun(); pinglun.DakaBiji = bijiid; pinglun.DakaRen = dakarenid; pinglun.Peibanshi = peibanshi; pinglun.Kongjian = kongjianid; pinglun.ProductBook = bookid; pinglun.PinglunRen = pinglunren; pinglun.PinglunContent = pingluncontent; pinglun.CreateTime = DateTime.Now; try { unitOfWork._bijiPinglunsRepository.Insert(pinglun); unitOfWork.Save(); msg.MessageStatus = "true"; msg.MessageInfo = "评论成功"; } catch (Exception) { msg.MessageStatus = "false"; msg.MessageInfo = "评论失败"; throw; } string json = JsonHelper.JsonSerializerBySingleData(msg); return(Content(json)); }
public JsonResult PinglunBiji(int DakaRen, int PinglunRen, int Kongjian, int Peibanshi, int ProductBook, int DakaBiji, string Pinglun) { BijiPinglun pinglun = new BijiPinglun(); pinglun.DakaRen = DakaRen; pinglun.PinglunContent = Pinglun; pinglun.PinglunRen = PinglunRen; pinglun.DakaBiji = DakaBiji; pinglun.Kongjian = Kongjian; pinglun.Peibanshi = Peibanshi; pinglun.ProductBook = ProductBook; pinglun.CreateTime = DateTime.Now; Message msg = new Message(); try { unitOfWork._bijiPinglunsRepository.Insert(pinglun); unitOfWork.Save(); msg.MessageStatus = "true"; msg.MessageInfo = "评论成功"; } catch { msg.MessageStatus = "false"; msg.MessageInfo = "评论失败"; } return(Json(msg, JsonRequestBehavior.AllowGet)); }
public JsonResult PinglunBiji(int BijiZuozhe, int Canyuren, int Dushuying, int Peiduren, int Shumu, int Biji, string Pinglun) { BijiPinglun pinglun = new BijiPinglun(); pinglun.BijiZuozhe = BijiZuozhe; pinglun.PinglunContent = Pinglun; pinglun.Pinglunren = Canyuren; pinglun.PinglunBiji = Biji; pinglun.Dushuying = Dushuying; pinglun.Peiduren = Peiduren; pinglun.Shumu = Shumu; pinglun.CreateTime = DateTime.Now; Message msg = new Message(); try { unitOfWork.bijiPinglunsRepository.Insert(pinglun); unitOfWork.Save(); msg.MessageStatus = "true"; msg.MessageInfo = "评论成功"; } catch { msg.MessageStatus = "false"; msg.MessageInfo = "评论失败"; } return(Json(msg, JsonRequestBehavior.AllowGet)); }