public ActionResult DeleteConfirmed(int id) { DM_KHACHSAN dM_KHACHSAN = db.DM_KHACHSAN.Find(id); db.DM_KHACHSAN.Remove(dM_KHACHSAN); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MAKS,TENCOSO,SOPHONG,SOGIUONG,DIACHI,SDT,EMAIL,GHICHU,MALOAI_KS,TRANGTHAI")] DM_KHACHSAN dM_KHACHSAN) { if (ModelState.IsValid) { db.Entry(dM_KHACHSAN).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MALOAI_KS = new SelectList(db.LOAIKHACHSANs, "MALOAI_KS", "GHICHU", dM_KHACHSAN.MALOAI_KS); return(View(dM_KHACHSAN)); }
// GET: admin/DM_KHACHSAN/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DM_KHACHSAN dM_KHACHSAN = db.DM_KHACHSAN.Find(id); if (dM_KHACHSAN == null) { return(HttpNotFound()); } return(View(dM_KHACHSAN)); }
// GET: admin/DM_KHACHSAN/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DM_KHACHSAN dM_KHACHSAN = db.DM_KHACHSAN.Find(id); if (dM_KHACHSAN == null) { return(HttpNotFound()); } ViewBag.MALOAI_KS = new SelectList(db.LOAIKHACHSANs, "MALOAI_KS", "GHICHU", dM_KHACHSAN.MALOAI_KS); return(View(dM_KHACHSAN)); }