Exemple #1
0
        public ActionResult TrainingVideoEdit(int id)
        {
            TrainingVideo c = new TrainingVideo();

            c.TrainingVideoID = id;
            c.SelectByID();


            Staff s = new Models.Staff();

            ViewBag.dts = s.selectall();

            VideoCategory vc = new Models.VideoCategory();

            ViewBag.dtvc = vc.selectall();

            return(View(c));
        }
Exemple #2
0
        public ActionResult TrainingVideoUpdate(FormCollection collection)
        {
            TrainingVideo d = new TrainingVideo();

            d.TrainingVideoID = Convert.ToInt32(collection["TrainingVideoID"]);
            d.SelectByID();
            d.UploadTime = Convert.ToDateTime(DateTime.Now.ToString());


            d.VideoTitle      = collection["VideoTitle"];
            d.VideoURL        = collection["VideoURL"];
            d.StaffID         = Convert.ToInt32(collection["StaffID"]);
            d.VideoCategoryID = Convert.ToInt32(collection["VideoCategoryID"]);
            d.HelpfulCount    = Convert.ToInt32(collection["HelpfulCount"]);
            d.TotalCount      = Convert.ToInt32(collection["TotalCount"]);
            d.update();

            return(RedirectToAction("TrainingVideoList"));
        }