public ActionResult Edit([Bind(Include = "Id,Nom,Prenom")] 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,Name")] Subject subject) { if (ModelState.IsValid) { db.Entry(subject).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(subject)); }
public ActionResult Edit([Bind(Include = "Id,Libelle,Prix")] Produit produit) { if (ModelState.IsValid) { db.Entry(produit).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(produit)); }
public ActionResult Edit([Bind(Include = "Id,Name,SubjectId")] Topic topic) { if (ModelState.IsValid) { db.Entry(topic).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.SubjectId = new SelectList(db.Subjects, "Id", "Name", topic.SubjectId); return(View(topic)); }
public ActionResult Edit([Bind(Include = "Id,TopicId,Title,A,B,C,D,E,TrueAnswer,Point")] Question question) { if (ModelState.IsValid) { db.Entry(question).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TopicId = new SelectList(db.Topics, "Id", "Name", question.TopicId); return(View(question)); }