From 679dbcb2b53e107e996ee30fbea3db3d1cea8930 Mon Sep 17 00:00:00 2001 From: nimaye Date: Wed, 12 Oct 2022 16:48:28 +0200 Subject: [PATCH] modification banque et manager --- Code/Model/Banque.cs | 4 ++-- Code/Model/Manager.cs | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Code/Model/Banque.cs b/Code/Model/Banque.cs index 4b4668e..730d78b 100644 --- a/Code/Model/Banque.cs +++ b/Code/Model/Banque.cs @@ -21,12 +21,12 @@ namespace Model ListeDesComptes = new List(); } - private void AjouterCompte(Compte compte) + public void AjouterCompte(Compte compte) { ListeDesComptes.Add(compte); } - private void SupprimerCompte(Compte compte) + public void SupprimerCompte(Compte compte) { ListeDesComptes.Remove(compte); } diff --git a/Code/Model/Manager.cs b/Code/Model/Manager.cs index fe2d1f1..9d54457 100644 --- a/Code/Model/Manager.cs +++ b/Code/Model/Manager.cs @@ -16,12 +16,6 @@ namespace Model public event PropertyChangedEventHandler? PropertyChanged; void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - - public Manager(IPersistanceManager persistance) - { - ListedesInscrits = new ReadOnlyCollection(TousLesInscrits); - persistance = persistance; - } public Inscrit SelectedInscrits { @@ -37,6 +31,21 @@ namespace Model } private Inscrit selectedInscrits; + public Manager(IReadOnlyCollection listedesInscrits, List tousLesInscrits, Inscrit selectedInscrits) + { + ListedesInscrits = listedesInscrits; + TousLesInscrits = tousLesInscrits; + this.selectedInscrits = selectedInscrits; + + } + + /*En attente de la persistance*/ + + /* public Manager(IPersistanceManager persistance) + { + ListedesInscrits = new ReadOnlyCollection(TousLesInscrits); + persistance = persistance; + }*/ }