public ActionResult DeleteConfirmed(int id)
        {
            KhoSachcs khoSachcs = db.KhoSachcs.Find(id);

            db.KhoSachcs.Remove(khoSachcs);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "MaKho,TenKho,GhiChu")] KhoSachcs khoSachcs)
 {
     if (ModelState.IsValid)
     {
         db.Entry(khoSachcs).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(khoSachcs));
 }
        public ActionResult Create([Bind(Include = "MaKho,TenKho,GhiChu")] KhoSachcs khoSachcs)
        {
            if (ModelState.IsValid)
            {
                db.KhoSachcs.Add(khoSachcs);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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