Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            KhoahocGT khoahocGT = db.KhoahocGTs.Find(id);

            db.KhoahocGTs.Remove(khoahocGT);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,Picture,TenKH,GiaoVien,Thoigian,Noidung,Giaotrinh,hoatdong,hocphi")] KhoahocGT khoahocGT)
 {
     if (ModelState.IsValid)
     {
         db.Entry(khoahocGT).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(khoahocGT));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ID,Picture,TenKH,GiaoVien,Thoigian,Noidung,Giaotrinh,hoatdong,hocphi")] KhoahocGT khoahocGT)
        {
            if (ModelState.IsValid)
            {
                db.KhoahocGTs.Add(khoahocGT);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(khoahocGT));
        }
Example #4
0
        // GET: KhoahocGTs/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            KhoahocGT khoahocGT = db.KhoahocGTs.Find(id);

            if (khoahocGT == null)
            {
                return(HttpNotFound());
            }
            return(View(khoahocGT));
        }