public ActionResult Delete(Int16 id) { HotelEventService cat = db.HotelEventServices.Where(x => x.EventServiceID == id).Single <HotelEventService>(); db.HotelEventServices.DeleteOnSubmit(cat); db.SubmitChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(HotelEventService_model cat) { HotelEventService tblcat = db.HotelEventServices.Where(x => x.EventServiceID == cat.EventServiceID).Single <HotelEventService>(); tblcat.HotelID = Convert.ToInt32(Session["HotelId"]); tblcat.EventName = cat.EventName; db.SubmitChanges(); return(View()); }
public ActionResult HotelEventService(HotelEventService_model cat) { HotelEventService tblcat = new HotelEventService(); tblcat.HotelID = Convert.ToInt32(Session["HotelId"]); tblcat.EventName = cat.EventName; db.HotelEventServices.InsertOnSubmit(tblcat); db.SubmitChanges(); return(View()); }