// GET: NGACHLUONGs/Create
        public ActionResult Create()
        {
            NGACHLUONG obj = new NGACHLUONG();

            obj.NL_MA = CreateID.CreateID_ByteText();
            return(View(obj));
        }
        public ActionResult DeleteConfirmed(string id)
        {
            NGACHLUONG nGACHLUONG = db.NGACHLUONGs.Find(id);

            db.NGACHLUONGs.Remove(nGACHLUONG);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "NL_MA,NL_TEN")] NGACHLUONG nGACHLUONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nGACHLUONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(nGACHLUONG));
 }
        public ActionResult Create([Bind(Include = "NL_MA,NL_TEN")] NGACHLUONG nGACHLUONG)
        {
            if (ModelState.IsValid)
            {
                db.NGACHLUONGs.Add(nGACHLUONG);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(nGACHLUONG));
        }
        // GET: NGACHLUONGs/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            NGACHLUONG nGACHLUONG = db.NGACHLUONGs.Find(id);

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