internal void Update(SocieteView currentView) { if (currentView == null) { throw new ArgumentNullException("currentView"); } if (currentView.Id == 0) { throw new InvalidOperationException("Opération invalide!"); } _service.SocieteUpdate(currentView.Id, currentView.RaisonSocial, currentView.Activite, currentView.Adresse, currentView.CodePostal, currentView.Ville, currentView.Pays, currentView.NumeroEmployeur, currentView.CleEmployeur, currentView.MatriculFiscal, currentView.MatriculCle, currentView.MatriculCodeTva, currentView.MatriculCategorie, currentView.MatriculEtablissement, currentView.CodeBureau, currentView.ConnectionView.ServerName, currentView.ConnectionView.DatabaseName, currentView.ConnectionView.User, currentView.ConnectionView.Password, currentView.ConnectionView.Type, currentView.CnssTypeMatricule ); var context = Program.Context; // si la societe modifier est la societe courante if (context?.Societe?.Id == currentView.Id) { context.Societe = _service.Societe; } }