public ActionResult Edit([Bind(Include = "Id,ClientName")] Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Edit([Bind(Include = "Id,Category,Cost")] Cargo cargo) { if (ModelState.IsValid) { db.Entry(cargo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cargo)); }
public ActionResult Edit([Bind(Include = "Id,RouteName,Cost,DeliveryPeriod")] Route route) { if (ModelState.IsValid) { db.Entry(route).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(route)); }
public ActionResult Edit([Bind(Include = "Id,RouteId,CargoId,ClientId,Count,Status")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CargoId = new SelectList(db.Cargos, "Id", "Category", order.CargoId); ViewBag.ClientId = new SelectList(db.Clients, "Id", "ClientName", order.ClientId); ViewBag.RouteId = new SelectList(db.Routes, "Id", "RouteName", order.RouteId); return(View(order)); }