예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BAOCAOMUONSACH bAOCAOMUONSACH = db.BAOCAOMUONSACHes.Find(id);

            db.BAOCAOMUONSACHes.Remove(bAOCAOMUONSACH);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 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));
 }
예제 #3
0
        // 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));
        }
예제 #4
0
        // 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));
        }