public String Reply(ReplyRedSpots repredspots, string essaycontent, int forumid) { int userid = Convert.ToInt32(Session["User_id"]); //var replylist = CommentRedSpotsManage.FindRedRep(commid); if (essaycontent != null) //{ // return Content("<script>;alert('回复内容不能为空!');history.go(-1)</script>"); //} //else { repredspots.CommentRedSpots_id = forumid; repredspots.User_id = userid; repredspots.Content = essaycontent; repredspots.ReplyTime = DateTime.Now; CommentRedSpotsManage.addReplyRedSpots(repredspots); return("cg"); } else { return("cc"); } }
public void addReplyRedSpots(ReplyRedSpots repredspots) { db.ReplyRedSpots.Add(repredspots); db.SaveChanges(); }
public static void addReplyRedSpots(ReplyRedSpots repredspots) { commred.addReplyRedSpots(repredspots); }