public ActionResult xoaNhaxuatban(string id) { Doanquanlythuvien.Models.NXB xB = dc.NXBs.Find(id); dc.NXBs.Remove(xB); dc.SaveChanges(); return(RedirectToAction("IndexNXB")); }
public ActionResult themNhaxuatban(Doanquanlythuvien.Models.NXB xB) { if (ModelState.IsValid) { dc.NXBs.Add(xB); dc.SaveChanges(); } return(RedirectToAction("IndexNXB")); }
public ActionResult suaNhaxuatban(Doanquanlythuvien.Models.NXB xB) { Doanquanlythuvien.Models.NXB nXB = dc.NXBs.Find(xB.MaNXB); if (nXB != null) { nXB.MaNXB = xB.MaNXB; nXB.TenNXB = xB.TenNXB; dc.SaveChanges(); } return(RedirectToAction("IndexNXB")); }
public ActionResult xemnxb(string id) { Doanquanlythuvien.Models.NXB xB = dc.NXBs.Find(id); return(View(xB)); }
public ActionResult Formsuanhaxuatban(string id) { Doanquanlythuvien.Models.NXB xB = dc.NXBs.Find(id); return(View(xB)); }