Exemple #1
0
        public string VideoReply(VideoReply rep)//回复评论
        {
            string content = Request["Reply1"];
            int    Com_id  = Convert.ToInt32(Request["Com_id"]);

            if (content == "")
            {
                return("kong");
            }
            if (Session["userid"] != null)
            {
                if (ModelState.IsValid)
                {
                    rep.VideoComment_id    = Com_id;
                    rep.VideoReply_content = content;
                    rep.User_id            = Convert.ToInt32(Session["userid"].ToString());
                    rep.Video_id           = (int)Session["Video_id"];
                    rep.Addtime            = System.DateTime.Now;
                    db.VideoReply.Add(rep);
                    db.SaveChanges();
                    return("aa");
                }
                else
                {
                    return("bb");
                }
            }
            else
            {
                return("nn");
            }
        }
Exemple #2
0
        public string Reply(VideoReply msr)
        {
            string pingluntextarea = Request["pingluntextarea2"];
            var    se    = TempData["Vi_id2"];
            int    Vi_id = Convert.ToInt32(se);
            //int Ms_id = Convert.ToInt32(Request["Ms_id2"]);
            int commentid = Convert.ToInt32(Request["Commentid"]);

            //if (pingluntextarea =="")
            //{
            //    return "kong";
            //}
            if (ModelState.IsValid)
            {
                msr.Vi_id        = Vi_id;
                msr.content      = pingluntextarea;
                msr.Vi_commentid = commentid;
                msr.User_id      = Convert.ToInt32(Session["Users_id"].ToString());
                msr.Addtime      = System.DateTime.Now;
                db.VideoReply.Add(msr);
                db.SaveChanges();
                //return Content("<script>;alert('回复成功!');history.go(-1)</script>");
                return("aa");
            }
            else
            {
                //return Content("bb");
                //return RedirectToAction("Display", "MusicScore");
                return("bb");
            }
            //return RedirectToAction("Display", "MusicScore");
        }
Exemple #3
0
        public ActionResult Reply(VideoReply videoReply)
        {
            string Commenttextareas = Request["Commenttextareas"];
            int    vid    = Convert.ToInt32(Request["vid"]);
            int    vcid   = Convert.ToInt32(Request["vcid"]);
            int    UserID = Convert.ToInt32(Session["UserID"].ToString());
            Users  users  = db.Users.Find(UserID);
            int    id     = vid;

            if (ModelState.IsValid)
            {
                videoReply.VCID      = vcid;
                videoReply.UserID    = Convert.ToInt32(Session["UserID"].ToString());
                videoReply.VRContent = Commenttextareas;
                videoReply.VRTime    = System.DateTime.Now;
                db.VideoReply.Add(videoReply);
                db.SaveChanges();
            }

            return(RedirectToAction("PlayVideo", "Videos", new { id }));
        }