예제 #1
0
        public async Task <ActionResult> Edit([Bind(Include = "Masach,Tensach,MaLoaiSach,Mota,Hinhminhhoa,MaCD,MaNXB,Ngaycapnhat")] SACH sACH)
        {
            if (ModelState.IsValid)
            {
                db.Entry(sACH).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.MaCD = new SelectList(db.CHUDEs, "MaCD", "TenCD", sACH.MaCD);

            ViewBag.MaNXB = new SelectList(db.NXBs, "MaNXB", "TenNXB", sACH.MaNXB);
            return(View(sACH));
        }