public ActionResult Delete(Int16 id) { HotelOtherService cat = db.HotelOtherServices.Where(x => x.OtherServiceID == id).Single <HotelOtherService>(); db.HotelOtherServices.DeleteOnSubmit(cat); db.SubmitChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(HotelOtherService_model cat) { HotelOtherService tblcat = db.HotelOtherServices.Where(x => x.OtherServiceID == cat.OtherServiceID).Single <HotelOtherService>(); tblcat.TexiService = cat.TexiService; tblcat.HotelID = Convert.ToInt32(Session["HotelId"]); tblcat.PickupPlace = cat.PickupPlace; tblcat.DestinationPlace = cat.DestinationPlace; tblcat.VehicleType = cat.VehicleType; db.SubmitChanges(); return(View()); }
public ActionResult HotelOtherService(HotelOtherService_model cat) { HotelOtherService tblcat = new HotelOtherService(); tblcat.HotelID = Convert.ToInt32(Session["HotelId"]); tblcat.TexiService = cat.TexiService; tblcat.PickupPlace = cat.PickupPlace; tblcat.DestinationPlace = cat.DestinationPlace; tblcat.VehicleType = cat.VehicleType; db.HotelOtherServices.InsertOnSubmit(tblcat); db.SubmitChanges(); return(View()); }