public ActionResult CTVT_DTCreate(CTVT_DT vtdt)
        {
            if (ModelState.IsValid)
            {
                db.CTVT_DTs.InsertOnSubmit(vtdt);
                db.SubmitChanges();
            }

            return(RedirectToAction("CTVT_DT"));
        }
        public ActionResult CTVT_DTEdit(int id)
        {
            CTVT_DT vtdt = db.CTVT_DTs.SingleOrDefault(n => n.MaCTVT_DT == id);

            ViewBag.MaCTVT_DT = vtdt.MaCTVT_DT;
            if (vtdt == null)
            {
                Response.StatusCode = 404;
                return(null);
            }
            return(View(vtdt));
        }
        public ActionResult CTVT_DTDeleteConfirm(int id)
        {
            CTVT_DT vtdt = db.CTVT_DTs.SingleOrDefault(n => n.MaCTVT_DT == id);

            ViewBag.MaCTVT_DT = vtdt.MaCTVT_DT;
            if (vtdt == null)
            {
                Response.StatusCode = 404;
                return(null);
            }
            db.CTVT_DTs.DeleteOnSubmit(vtdt);
            db.SubmitChanges();
            return(RedirectToAction("CTVT_DT"));
        }
        public ActionResult CTVT_DTEdit(CTVT_DT vtdt)
        {
            var v = db.CTVT_DTs.SingleOrDefault(n => n.MaCTVT_DT == vtdt.MaCTVT_DT);

            if (ModelState.IsValid)
            {
                v.Ma_VT       = vtdt.Ma_VT;
                v.LT          = vtdt.LT;
                v.DiaDiemThi  = vtdt.DiaDiemThi;
                v.ThoiGianThi = vtdt.ThoiGianThi;
                v.DiaDiemTap  = vtdt.DiaDiemTap;
                v.ThoiGianTap = vtdt.ThoiGianTap;
                v.Ma_VT       = vtdt.Ma_VT;

                db.SubmitChanges();
            }
            return(RedirectToAction("CTVT_DT"));
        }