public ActionResult DeleteConfirmed(int id) { Foyd_ber_kitoblar foyd_ber_kitoblar = db.Foyd_ber_kitoblars.Find(id); db.Foyd_ber_kitoblars.Remove(foyd_ber_kitoblar); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Foyd_ber_kitoblarId,XodimId,KitobxonId,KitobId,berilgan_vaqti,qaytarilish_vaqti")] Foyd_ber_kitoblar foyd_ber_kitoblar) { if (ModelState.IsValid) { db.Entry(foyd_ber_kitoblar).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KitobId = new SelectList(db.Kitobs, "KitobId", "nomi", foyd_ber_kitoblar.KitobId); ViewBag.KitobxonId = new SelectList(db.Kitobxons, "KitobxonId", "familiya", foyd_ber_kitoblar.KitobxonId); ViewBag.XodimId = new SelectList(db.Xodims, "XodimId", "familiya", foyd_ber_kitoblar.XodimId); return(View(foyd_ber_kitoblar)); }
// GET: /Foyd_ber_kitoblar/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Foyd_ber_kitoblar foyd_ber_kitoblar = db.Foyd_ber_kitoblars.Find(id); if (foyd_ber_kitoblar == null) { return(HttpNotFound()); } return(View(foyd_ber_kitoblar)); }
// GET: /Foyd_ber_kitoblar/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Foyd_ber_kitoblar foyd_ber_kitoblar = db.Foyd_ber_kitoblars.Find(id); if (foyd_ber_kitoblar == null) { return(HttpNotFound()); } ViewBag.KitobId = new SelectList(db.Kitobs, "KitobId", "nomi", foyd_ber_kitoblar.KitobId); ViewBag.KitobxonId = new SelectList(db.Kitobxons, "KitobxonId", "familiya", foyd_ber_kitoblar.KitobxonId); ViewBag.XodimId = new SelectList(db.Xodims, "XodimId", "familiya", foyd_ber_kitoblar.XodimId); return(View(foyd_ber_kitoblar)); }