Пример #1
0
 public ActionResult Edit([Bind(Include = "id,NomComplet,Login,Password")] Utilisateur utilisateur)
 {
     if (ModelState.IsValid)
     {
         db.Entry(utilisateur).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(utilisateur));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id,Nom,Prenom,Email,CIN,sexe,DateNaissance,LieuNaissance,Nationalite,SecondeNationalite,Matricule,NbrEnfants")] Agent agent)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agent).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(agent));
 }