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 Edit(int id) { HotelEventService_model cat = db.HotelEventServices.Where(x => x.EventServiceID == id).Select(x => new HotelEventService_model() { EventServiceID = x.EventServiceID, HotelID = x.HotelID, EventName = x.EventName }).SingleOrDefault(); return(View(cat)); }
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()); }