private void OnAddAction(object o)
        {
            EventClick.GetClick().Handler += CloseAddView;
            Planete PlaneteAjout           = new Planete();

            add      = new Fajout(PlaneteAjout);
            add.Name = "Ajout";
            add.ShowDialog();
            AlreadyExiste = false;


            if (add.ViewModelAjout.CLickOnAdd == true)
            {
                foreach (Planete p in Univers)
                {
                    if (add.ViewModelAjout.Planete.Nom.ToLower().Equals(p.Nom.ToLower()))
                    {
                        AlreadyExiste = true;
                    }
                }

                if (AlreadyExiste)
                {
                    Info info = new Info("La planète fait déjà parti de l'univers et n'as donc pas été ajouté");
                    info.ShowDialog();
                }
                else
                {
                    string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
                    string path       = (System.IO.Path.GetDirectoryName(executable));
                    AppDomain.CurrentDomain.SetData("DataDirectory", path);
                    SqlConnection conn = new SqlConnection(connectionString);

                    conn.Open();
                    Planete planeteAdd = add.ViewModelAjout.Planete;
                    string  SQLcmdAdd  = "INSERT INTO [UniversDATABase].[Planete] VALUES (@PNom,@PVol,@PMas,@PAnn,@PDec,@PSat,@PRev,@PIma);";

                    var command = new SqlCommand(SQLcmdAdd, conn);
                    command.Parameters.AddWithValue("@PNom", planeteAdd.Nom);
                    command.Parameters.AddWithValue("@PVol", planeteAdd.Volume);
                    command.Parameters.AddWithValue("@PMas", planeteAdd.Masse);
                    command.Parameters.AddWithValue("@PAnn", planeteAdd.Anneaux);
                    command.Parameters.AddWithValue("@PDec", planeteAdd.AnnéeDecouverte);
                    command.Parameters.AddWithValue("@PSat", planeteAdd.NbreSatellite);
                    command.Parameters.AddWithValue("@PRev", planeteAdd.PeriodeRevo);
                    command.Parameters.AddWithValue("@PIma", planeteAdd.PlanIm);
                    command.ExecuteReader();
                    conn.Close();

                    NotifyPropertyChanged("Univers");
                }
                Refresh();
            }
        }
        private void OnEditCommand(object o)
        {
            EventClick.GetClick().Handler += CloseEditView;

            edit = new Fajout(Planete);                  // Factorisation de code. on utilise la même fenetre que pour l'ajout de planete
            edit.ViewModelAjout.AddOrModify = "Valider"; // changement du contenu bouton
            edit.Name = "Edit";
            edit.ShowDialog();
            if (edit.ViewModelAjout.CLickOnAdd == true)
            {
                NotifyPropertyChanged("Planete");
                Planete modifAApliquer = edit.ViewModelAjout.Planete;

                string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
                string path       = (System.IO.Path.GetDirectoryName(executable));
                AppDomain.CurrentDomain.SetData("DataDirectory", path);
                SqlConnection conn = new SqlConnection(connectionString);
                conn.Open();
                string SQLcmdAdd = "UPDATE [UniversDATABase].[Planete] SET PlaneteVolume = @PVol,PlaneteMasse = @PMas,PlaneteAnneaux = @PAnn, PlaneteDecouverte = @PDec, PlaneteNBSat = @PSat, PlanetePeriodeRevo = @PRev, PlanetePathIm = @PIma WHERE PlaneteNom = @PNom";

                var command = new SqlCommand(SQLcmdAdd, conn);
                command.Parameters.AddWithValue("@PNom", modifAApliquer.Nom);
                command.Parameters.AddWithValue("@PVol", modifAApliquer.Volume);
                command.Parameters.AddWithValue("@PMas", modifAApliquer.Masse);
                command.Parameters.AddWithValue("@PAnn", modifAApliquer.Anneaux);
                command.Parameters.AddWithValue("@PDec", modifAApliquer.AnnéeDecouverte);
                command.Parameters.AddWithValue("@PSat", modifAApliquer.NbreSatellite);
                command.Parameters.AddWithValue("@PRev", modifAApliquer.PeriodeRevo);
                command.Parameters.AddWithValue("@PIma", modifAApliquer.PlanIm);

                command.ExecuteReader();
                conn.Close();

                NotifyPropertyChanged("Planete");
                NotifyPropertyChanged("Univers");
            }
            Refresh();
        }