public ActionResult DeleteConfirmed(int id) { tbl_RoomCharges tbl_RoomCharges = db.tbl_RoomCharges.Find(id); db.tbl_RoomCharges.Remove(tbl_RoomCharges); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(tbl_RoomCharges tbl_RoomCharges) { if (ModelState.IsValid) { db.Entry(tbl_RoomCharges).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_CatID = new SelectList(db.tbl_Category, "Cat_Id", "Cat_Name", tbl_RoomCharges.FK_CatID); ViewBag.FK_TypeID = new SelectList(db.tbl_Type, "Type_Id", "Type_Name", tbl_RoomCharges.FK_TypeID); return(View(tbl_RoomCharges)); }
public ActionResult Create(tbl_RoomCharges tbl_RoomCharges) { if (ModelState.IsValid) { db.tbl_RoomCharges.Add(tbl_RoomCharges); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FK_CatID = new SelectList(db.tbl_Category, "Cat_Id", "Cat_Name", tbl_RoomCharges.FK_CatID); ViewBag.FK_TypeID = new SelectList(db.tbl_Type, "Type_Id", "Type_Name", tbl_RoomCharges.FK_TypeID); return(View(tbl_RoomCharges)); }
// GET: Admin/RoomCharges/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_RoomCharges tbl_RoomCharges = db.tbl_RoomCharges.Find(id); if (tbl_RoomCharges == null) { return(HttpNotFound()); } return(View(tbl_RoomCharges)); }
// GET: Admin/RoomCharges/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_RoomCharges tbl_RoomCharges = db.tbl_RoomCharges.Find(id); if (tbl_RoomCharges == null) { return(HttpNotFound()); } ViewBag.FK_CatID = new SelectList(db.tbl_Category, "Cat_Id", "Cat_Name", tbl_RoomCharges.FK_CatID); ViewBag.FK_TypeID = new SelectList(db.tbl_Type, "Type_Id", "Type_Name", tbl_RoomCharges.FK_TypeID); return(View(tbl_RoomCharges)); }