public ActionResult Edit([Bind(Include = "IdProduit,IdVille,NbPlaces,Adresse,Description")] Produits produits) { if (ModelState.IsValid) { db.Entry(produits).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdVille = new SelectList(db.Villes, "idVille", "name", produits.IdVille); return(View(produits)); }
public ActionResult Edit([Bind(Include = "idVille,name,CodeIso3,district,population,isCapital")] Villes villes) { if (ModelState.IsValid) { db.Entry(villes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CodeIso3 = new SelectList(db.Pays, "CodeIso3", "Name", villes.CodeIso3); return(View(villes)); }
public ActionResult Edit([Bind(Include = "CodeIso3,Name,surfacearea,indepyear,population,lifeexpectancy,gnp,gnpold,localName,CodeIso2,idRegion,idgovform,idheadofstate")] Pays pays) { if (ModelState.IsValid) { db.Entry(pays).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idRegion = new SelectList(db.Regions, "idRegion", "name", pays.idRegion); return(View(pays)); }
public ActionResult Edit([Bind(Include = "idRegion,name,idContinent")] Regions regions) { if (ModelState.IsValid) { db.Entry(regions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idContinent = new SelectList(db.Continents, "idContinent", "name", regions.idContinent); return(View(regions)); }