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 Edit(int id) { HotelOtherService_model cat = db.HotelOtherServices.Where(x => x.OtherServiceID == id).Select(x => new HotelOtherService_model() { OtherServiceID = x.OtherServiceID, HotelID = x.HotelID, TexiService = x.TexiService, PickupPlace = x.PickupPlace, DestinationPlace = x.DestinationPlace, VehicleType = x.VehicleType, }).SingleOrDefault(); return(View(cat)); }
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()); }