diff --git a/Modèle/Expert.cs b/Modèle/Expert.cs index 74a5d8a..79a950d 100644 --- a/Modèle/Expert.cs +++ b/Modèle/Expert.cs @@ -105,5 +105,10 @@ namespace Modèle { requins.Add(req); } + + public override void ChangerMotDePasse(string nvMdp) + { + MotDePasse = nvMdp; + } } } diff --git a/Modèle/Personne.cs b/Modèle/Personne.cs index d440c76..4dff978 100644 --- a/Modèle/Personne.cs +++ b/Modèle/Personne.cs @@ -25,5 +25,7 @@ namespace Modèle public abstract override string ToString(); public abstract void AjouterRequin(Requin req, ObservableCollection requins); + + public abstract void ChangerMotDePasse(string nvMdp); } } diff --git a/Modèle/Utilisateur.cs b/Modèle/Utilisateur.cs index b2bf463..3b58107 100644 --- a/Modèle/Utilisateur.cs +++ b/Modèle/Utilisateur.cs @@ -39,5 +39,10 @@ namespace Modèle requins.Add(req); NbSubmit++; } + + public override void ChangerMotDePasse(string nvMdp) + { + MotDePasse = nvMdp; + } } } diff --git a/WpfApp1/AddAShark.xaml.cs b/WpfApp1/AddAShark.xaml.cs index 0c3512d..e93e022 100644 --- a/WpfApp1/AddAShark.xaml.cs +++ b/WpfApp1/AddAShark.xaml.cs @@ -54,7 +54,6 @@ namespace WpfApp1 private void submit_Click(object sender, RoutedEventArgs e) { - int testCons = 0; Conservation cons = new Conservation(); List lesZones = new List(); string nom = name.LeContenu.Text; @@ -108,7 +107,7 @@ namespace WpfApp1 lesZones.Add(Zone.PACIFIQUE); } - if (testCons == 0 || lesZones.Count() == 0 || string.IsNullOrWhiteSpace(nom) || string.IsNullOrWhiteSpace(sciNam) || string.IsNullOrWhiteSpace(descri) + if (lesZones.Count() == 0 || string.IsNullOrWhiteSpace(nom) || string.IsNullOrWhiteSpace(sciNam) || string.IsNullOrWhiteSpace(descri) || string.IsNullOrWhiteSpace(photo) || string.IsNullOrWhiteSpace(video) || string.IsNullOrWhiteSpace(map) || string.IsNullOrWhiteSpace(fun)) { MessageBox.Show("Veuillez remplir toutes les informations"); @@ -123,7 +122,7 @@ namespace WpfApp1 } else if (MgrUser.SelectedUser is Expert exp) { - exp.AjouterRequin(requin, Mgr.RequinsAdd); + exp.AjouterRequin(requin, Mgr.Requins); } Close(); diff --git a/WpfApp1/ChangerMotDePasse.xaml b/WpfApp1/ChangerMotDePasse.xaml index e219229..988656a 100644 --- a/WpfApp1/ChangerMotDePasse.xaml +++ b/WpfApp1/ChangerMotDePasse.xaml @@ -8,7 +8,7 @@ Title="ChangerMotDePasse" Height="450" Width="800"> - + @@ -20,25 +20,32 @@ - - + + + + + + + + - - + + - - + + +