public ActionResult Edit([Bind(Include = "CarID,CarVin,CarMark,CarModel,CarType,CarPrice,CarRegisterDate")] Car car) { if (ModelState.IsValid) { db.Entry(car).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(car)); }
public ActionResult Edit([Bind(Include = "LocationCode,Name,Description,Latitude,Longitude")] Location location) { if (ModelState.IsValid) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(location)); }
public ActionResult Edit([Bind(Include = "BookingID,BookingTime,RentingStart,RentingEnd,PickUP_LocationCode,Contact_PhoneNumber")] Booking booking) { if (ModelState.IsValid) { db.Entry(booking).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PickUP_LocationCode = new SelectList(db.Locations, "LocationCode", "Name", booking.PickUP_LocationCode); return(View(booking)); }
public ActionResult Edit([Bind(Include = "BookingBookingID,OlCarID,ReturnDate,ReturnStatus")] Order_Line order_Line) { if (ModelState.IsValid) { db.Entry(order_Line).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BookingBookingID = new SelectList(db.Bookings, "BookingID", "Contact_PhoneNumber", order_Line.BookingBookingID); ViewBag.OlCarID = new SelectList(db.Cars, "CarID", "CarVin", order_Line.OlCarID); return(View(order_Line)); }