public ActionResult AddReply(ArticleReply model) { ArticleReplyRepository repo = new ArticleReplyRepository(); repo.Add(model); return(View("Article")); }
public ActionResult ReplyArticleComments(int ArticleComID, ArticleReply replya) { int aid = Convert.ToInt32(Session["aid"]); string replytext = Request.Form["textarea1"]; if (replytext == "") { return(Content("<script>;alert('回复不能为空');history.go(-1)</script>")); } else { int userid = Convert.ToInt32(Session["UserID"]); replya.ArticleComID = ArticleComID; replya.UserID = userid; replya.ReplyContent = replytext; replya.ReplyTime = DateTime.Now; articlereplymanager.AddArticleReply(replya); } return(RedirectToAction("ArticleDetails", "ArticleShow", new { id = aid })); }
public ArticleReply GetShiReplyById(int?id) { ArticleReply articleReply = iarticleReply.GetArticleReplyById(id); return(articleReply); }
public void AddArticleReply(ArticleReply articleReply) { iarticleReply.AddArticleReply(articleReply); }
public ArticleReply GetArticleReplyById(int?id) { ArticleReply articleReply = db.ArticleReply.Find(id); return(articleReply); }
public void AddArticleReply(ArticleReply articleReply) { db.ArticleReply.Add(articleReply); db.SaveChanges(); }