Esempio n. 1
0
 public static Personne VersPersonne(this PersonneModification e)
 {
     if (e == null)
     {
         return(null);
     }
     return(new Personne
     {
         dateDeDeces = e.dateDeDeces,
         dateDeNaissance = e.dateDeNaissance,
         homme = e.homme,
         nom = e.nom,
         prenom = e.prenom
     });
 }
Esempio n. 2
0
        public ActionResult Modifier(int id, PersonneModification pm)
        {
            if (ModelState.IsValid)
            {
                Personne po = new PersonneServiceAPI().Donner(id);
                Personne p  = pm.VersPersonne();
                p.dateAjout = po.dateAjout;
                p.idArbre   = po.idArbre;
                p.idMere    = po.idMere;
                p.idPere    = po.idPere;
                p.id        = id;
                p.dateAjout = po.dateAjout;

                if (new PersonneServiceAPI().Modifier(id, p))
                {
                    return(RedirectToAction("DonnerPourArbre", new { id = po.idArbre }));
                }
            }
            return(View(pm));
        }
Esempio n. 3
0
        /*[FxiltreProprietaireArbre]*/
        public ActionResult Modifier(int id)
        {
            PersonneModification pm = new PersonneModification(new PersonneServiceAPI().Donner(id));

            return(View(pm));
        }