public ActionResult DeleteConfirmed(int id) { PinjamTabel pinjamTabel = db.PinjamTabel.Find(id); db.PinjamTabel.Remove(pinjamTabel); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,WaktuPinjam,WaktuKembali,ISBN")] PinjamTabel pinjamTabel) { if (ModelState.IsValid) { db.Entry(pinjamTabel).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ISBN = new SelectList(db.BukuTabel, "ISBN", "NamaPengarang", pinjamTabel.ISBN); return(View(pinjamTabel)); }
// GET: PinjamTabels/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PinjamTabel pinjamTabel = db.PinjamTabel.Find(id); if (pinjamTabel == null) { return(HttpNotFound()); } return(View(pinjamTabel)); }
// GET: PinjamTabels/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PinjamTabel pinjamTabel = db.PinjamTabel.Find(id); if (pinjamTabel == null) { return(HttpNotFound()); } ViewBag.ISBN = new SelectList(db.BukuTabel, "ISBN", "NamaPengarang", pinjamTabel.ISBN); return(View(pinjamTabel)); }