public ActionResult DeleteConfirmed(string id) { DangKyCaBiet dangKyCaBiet = db.DangKyCaBiets.Find(id); db.DangKyCaBiets.Remove(dangKyCaBiet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MaSach,SoDangKy,NgayVaoSo,MaKho")] DangKyCaBiet dangKyCaBiet) { if (ModelState.IsValid) { db.Entry(dangKyCaBiet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dangKyCaBiet)); }
public ActionResult Create([Bind(Include = "MaSach,SoDangKy,NgayVaoSo,MaKho")] DangKyCaBiet dangKyCaBiet) { if (ModelState.IsValid) { db.DangKyCaBiets.Add(dangKyCaBiet); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dangKyCaBiet)); }
// GET: DangKyCaBiets/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DangKyCaBiet dangKyCaBiet = db.DangKyCaBiets.Find(id); if (dangKyCaBiet == null) { return(HttpNotFound()); } return(View(dangKyCaBiet)); }