public ActionResult Edit([Bind(Include = "Product_TypeID,Name")] Product_Type product_Type) { if (ModelState.IsValid) { db.Entry(product_Type).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product_Type)); }
public ActionResult Edit([Bind(Include = "CountryID,Name")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Edit([Bind(Include = "MotorID,Name")] Motor motor) { if (ModelState.IsValid) { db.Entry(motor).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(motor)); }
public ActionResult Edit([Bind(Include = "StateID,Name,CountryID")] State state) { if (ModelState.IsValid) { db.Entry(state).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CountryID = new SelectList(db.Country, "CountryID", "Name", state.CountryID); return(View(state)); }
public ActionResult Edit([Bind(Include = "CityID,Name,StateID")] City city) { if (ModelState.IsValid) { db.Entry(city).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.StateID = new SelectList(db.State, "StateID", "Name", city.StateID); return(View(city)); }
public ActionResult Edit([Bind(Include = "SupplierID,Name,Description,Address,Lat,Long,CityID")] Supplier supplier) { if (ModelState.IsValid) { db.Entry(supplier).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CityID = new SelectList(db.City, "CityID", "Name", supplier.CityID); return(View(supplier)); }
public ActionResult Edit([Bind(Include = "ProductID,Description,Price,Product_TypeID")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Product_TypeID = new SelectList(db.Product_Type, "Product_TypeID", "Name", product.Product_TypeID); return(View(product)); }
public ActionResult Edit([Bind(Include = "DerivationID,Description,MotorID,FuelID,Mnemonic_Bodystyle")] Derivation derivation) { if (ModelState.IsValid) { db.Entry(derivation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Mnemonic_Bodystyle = new SelectList(db.CarBuild, "Mnemonic_Bodystyle", "Mnemonic_Vehicle", derivation.Mnemonic_Bodystyle); ViewBag.FuelID = new SelectList(db.Fuel, "FuelID", "Name", derivation.FuelID); ViewBag.MotorID = new SelectList(db.Motor, "MotorID", "Name", derivation.MotorID); return(View(derivation)); }