Exemplo n.º 1
0
        public void Update(Personne personne, string user = "")
        {
            donneTypeDePersonne(ref this._typePersonne, personne);

            //Si la personne possède une adresse, on doit également la mettre à jour
            //EntityFramework ne gère pas la mise à jour des enfants

            if (personne.adresse != null)
            {
                _adresseService.Update(personne.adresse);
            }

            _personneRepository.Update(personne);

            _applicationTraceService.create(new ApplicationTrace
            {
                utilisateur = user,
                action      = Parametres.Action.Modification.ToString(),
                description = String.Format("Mise à jour de {0} {1} {2} en tant que {3}", getCiv(personne.civ), personne.nom, personne.prenom, _typePersonne),
            });
        }