public ActionResult DeleteConfirmed(int id)
        {
            dmLoaiDieuChinh dmloaidieuchinh = db.dmLoaiDieuChinh.Find(id);

            db.dmLoaiDieuChinh.Remove(dmloaidieuchinh);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //
        // GET: /dmLoaiDieuChinh/Details/5

        public ActionResult Details(int id = 0)
        {
            dmLoaiDieuChinh dmloaidieuchinh = db.dmLoaiDieuChinh.Find(id);

            if (dmloaidieuchinh == null)
            {
                return(HttpNotFound());
            }
            return(View(dmloaidieuchinh));
        }
 public ActionResult Edit(dmLoaiDieuChinh dmloaidieuchinh)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dmloaidieuchinh).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idLoaiTangGiam = new SelectList(db.dmLoaiTangGiam, "id", "Ma", dmloaidieuchinh);
     return(View(dmloaidieuchinh));
 }
        //
        // GET: /dmLoaiDieuChinh/Edit/5

        public ActionResult Edit(int id = 0)
        {
            dmLoaiDieuChinh dmloaidieuchinh = db.dmLoaiDieuChinh.Find(id);

            if (dmloaidieuchinh == null)
            {
                return(HttpNotFound());
            }
            ViewBag.idLoaiTangGiam = new SelectList(db.dmLoaiTangGiam, "id", "Ma", dmloaidieuchinh);
            return(View(dmloaidieuchinh));
        }
        public ActionResult Create(dmLoaiDieuChinh dmloaidieuchinh)
        {
            if (ModelState.IsValid)
            {
                db.dmLoaiDieuChinh.Add(dmloaidieuchinh);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.idLoaiTangGiam = new SelectList(db.dmLoaiTangGiam, "id", "Ma", dmloaidieuchinh);
            return(View(dmloaidieuchinh));
        }