public ActionResult ReplyComments(int vcid) { if (ModelState.IsValid) { string replytext = Request.Form["textarea1"]; VideoCommentBack vcbmodel = new VideoCommentBack(); if (replytext == null) { return(Content("<script>;alert('回复内容不为空');</script>")); } else { vcbmodel.VCB_Content = replytext; vcbmodel.VCB_Time = System.DateTime.Now; vcbmodel.VC_ID = vcid; vcbmodel.UserInfo_ID = Convert.ToInt32(Session["user_ID"]); var success = VideoCommentBackBll.Add(vcbmodel); if (success == true) { return(Content("<script>;alert('回复成功!');</script>")); } } } return(View()); }
public ActionResult DeleteConfirmed(int id) { VideoCommentBack videoCommentBack = db.VideoCommentBack.Find(id); db.VideoCommentBack.Remove(videoCommentBack); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: VideoCommentBacks/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VideoCommentBack videoCommentBack = db.VideoCommentBack.Find(id); if (videoCommentBack == null) { return(HttpNotFound()); } return(View(videoCommentBack)); }