You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ConsEco/Code/Model/Manager.cs

51 lines
1.3 KiB

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class Manager : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
public IPersistanceManager Pers { get; private set; }
public Inscrit SelectedInscrits
{
get => selectedInscrits;
set
{
if (selectedInscrits != value)
{
selectedInscrits = value;
OnPropertyChanged(nameof(SelectedInscrits));
}
}
}
private Inscrit selectedInscrits;
void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
public Manager(IPersistanceManager persistance)
{
SelectedInscrits = persistance.LoadInscrit();
Pers = persistance;
}
public void supprimerInscritBdd(Inscrit i)
{
Pers.SupprimerInscritBdd(i);
}
/* public void supprimerInscritBdd(Inscrit i)
{
}*/
}
}