public ActionResult DeleteConfirmed(int id)
        {
            LOAI_DOCGIA lOAI_DOCGIA = db.LOAI_DOCGIA.Find(id);

            db.LOAI_DOCGIA.Remove(lOAI_DOCGIA);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "MaLoaiDG,TenLoaiDG")] LOAI_DOCGIA lOAI_DOCGIA)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lOAI_DOCGIA).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lOAI_DOCGIA));
 }
        public ActionResult Create([Bind(Include = "MaLoaiDG,TenLoaiDG")] LOAI_DOCGIA lOAI_DOCGIA)
        {
            if (ModelState.IsValid)
            {
                db.LOAI_DOCGIA.Add(lOAI_DOCGIA);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lOAI_DOCGIA));
        }
        // GET: LOAI_DOCGIA/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LOAI_DOCGIA lOAI_DOCGIA = db.LOAI_DOCGIA.Find(id);

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