コード例 #1
0
        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"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }
コード例 #4
0
        // 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));
        }