public ActionResult Edit([Bind(Include = "IDService,VehicleID,DateOfService,Price")] Service service) { if (ModelState.IsValid) { db.Entry(service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { idVehicle = service.VehicleID })); } return(View(service)); }
public ActionResult Edit([Bind(Include = "IDItem,ServiceID,Details")] ItemService itemService) { if (ModelState.IsValid) { db.Entry(itemService).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", new { idService = itemService.ServiceID })); } ViewBag.ServiceID = new SelectList(db.Services, "IDService", "IDService", itemService.ServiceID); return(View(itemService)); }