示例#1
0
        public ActionResult VideoUpdate(videotable p1)
        {
            var video = db.videotables.Find(p1.id);
            var zaman = p1.videotime;

            video.videotitle       = p1.videotitle;
            video.videodescription = p1.videodescription;
            video.videourl         = p1.videourl;
            video.videotime        = Convert.ToDateTime(zaman);
            db.SaveChanges();
            return(RedirectToAction("CocukYaziniTV", "Admin"));
        }
示例#2
0
        public ActionResult VideoAdd(string videotitle, string videodescription, string videotime, string videourl)
        {
            string rtime = videotime;
            //DateTime rtime = DateTime.ParseExact(releasetime, "yyyy/MM/dd", null);
            var add = new videotable
            {
                videotitle       = videotitle,
                videodescription = videodescription,
                videourl         = videourl,
                videotime        = Convert.ToDateTime(rtime),
            };

            db.videotables.Add(add);
            db.SaveChanges();
            return(Redirect(ControllerContext.HttpContext.Request.UrlReferrer.ToString()));
        }