public ActionResult DeleteConfirmed(int id) { BAOCAOMUONSACH bAOCAOMUONSACH = db.BAOCAOMUONSACHes.Find(id); db.BAOCAOMUONSACHes.Remove(bAOCAOMUONSACH); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MaBaoCaoMuon,MaLoaiSach,SoLuotMuon,TiLe")] BAOCAOMUONSACH bAOCAOMUONSACH) { if (ModelState.IsValid) { db.Entry(bAOCAOMUONSACH).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaLoaiSach = new SelectList(db.LOAI_SACH, "MaLoaiSach", "TenLoaiSach", bAOCAOMUONSACH.MaLoaiSach); return(View(bAOCAOMUONSACH)); }
// GET: BAOCAOMUONSACHes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BAOCAOMUONSACH bAOCAOMUONSACH = db.BAOCAOMUONSACHes.Find(id); if (bAOCAOMUONSACH == null) { return(HttpNotFound()); } return(View(bAOCAOMUONSACH)); }
// GET: BAOCAOMUONSACHes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BAOCAOMUONSACH bAOCAOMUONSACH = db.BAOCAOMUONSACHes.Find(id); if (bAOCAOMUONSACH == null) { return(HttpNotFound()); } ViewBag.MaLoaiSach = new SelectList(db.LOAI_SACH, "MaLoaiSach", "TenLoaiSach", bAOCAOMUONSACH.MaLoaiSach); return(View(bAOCAOMUONSACH)); }