public ActionResult Edit([Bind(Include = "Id,name,Plan")] Trip trip) { if (ModelState.IsValid) { db.Entry(trip).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trip)); }
public ActionResult Edit([Bind(Include = "Id,login,password,role,name")] Users users) { if (ModelState.IsValid) { db.Entry(users).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(users)); }
public ActionResult Edit([Bind(Include = "Id,name,State")] Buss buss) { if (ModelState.IsValid) { db.Entry(buss).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(buss)); }
public ActionResult Edit([Bind(Include = "Id,Day,Id_trip,Id_driver,Id_worker,Id_buss")] TripPlan tripPlan) { if (ModelState.IsValid) { db.Entry(tripPlan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id_buss = new SelectList(db.Buss, "Id", "name", tripPlan.Id_buss); ViewBag.Id_trip = new SelectList(db.Trip, "Id", "name", tripPlan.Id_trip); ViewBag.Id_driver = new SelectList(db.Users, "Id", "login", tripPlan.Id_driver); ViewBag.Id_worker = new SelectList(db.Users, "Id", "login", tripPlan.Id_worker); return(View(tripPlan)); }