public ActionResult DeleteConfirmed(int id, int idht) { QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht); db.QUANLYHTs.Remove(qUANLYHT); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,IDHT,GHICHU")] QUANLYHT qUANLYHT) { if (ModelState.IsValid) { db.Entry(qUANLYHT).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID = new SelectList(db.CBQUANLies, "ID", "TENCB", qUANLYHT.ID); ViewBag.IDHT = new SelectList(db.HOITHAOs, "IDHT", "TENHT", qUANLYHT.IDHT); return(View(qUANLYHT)); }
// GET: Admin/QUANLYHTs/Details/5 public ActionResult Details(int?id, int?idht) { if (id == null || idht == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht); if (qUANLYHT == null) { return(HttpNotFound()); } return(View(qUANLYHT)); }
// GET: Admin/QUANLYHTs/Edit/5 public ActionResult Edit(int?id, int?idht) { if (id == null || idht == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } QUANLYHT qUANLYHT = db.QUANLYHTs.Find(id, idht); if (qUANLYHT == null) { return(HttpNotFound()); } ViewBag.ID = new SelectList(db.CBQUANLies, "ID", "TENCB", qUANLYHT.ID); ViewBag.IDHT = new SelectList(db.HOITHAOs, "IDHT", "TENHT", qUANLYHT.IDHT); return(View(qUANLYHT)); }