Esempio n. 1
0
 private void Clear()
 {
     if (SelectedItem != null)
     {
         SelectedItem = new StadeViewModel();
     }
 }
Esempio n. 2
0
 public StadesViewModel(List <Stade> stadesModels)
 {
     SelectedItem = new StadeViewModel();
     Stades       = new ObservableCollection <StadeViewModel>();
     foreach (Stade stade in stadesModels)
     {
         Stades.Add(new StadeViewModel(stade));
     }
 }
Esempio n. 3
0
 private void Remove()
 {
     if (SelectedItem != null)
     {
         if (PokemonBusinessLayer.BusinessManager.Instance.DeleteStade(SelectedItem.Stade))
         {
             Stades.Remove(SelectedItem);
             System.Windows.Forms.MessageBox.Show("Supression du stade effectuée", "Succeed");
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("Error lors de la supression du stade", "Failed");
         }
         SelectedItem = new StadeViewModel();
     }
 }