public ActionResult DeleteConfirmed(string id)
        {
            Baohiem baohiem = db.Baohiems.Find(id);

            db.Baohiems.Remove(baohiem);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Mabaohiem,Tenbaohiem")] Baohiem baohiem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(baohiem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(baohiem));
 }
        public ActionResult Create([Bind(Include = "Mabaohiem,Tenbaohiem")] Baohiem baohiem)
        {
            if (ModelState.IsValid)
            {
                db.Baohiems.Add(baohiem);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(baohiem));
        }
        // GET: Admin/Baohiem_Ad/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Baohiem baohiem = db.Baohiems.Find(id);

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