private void AjouterEmploye(object employe) { WndAjoutEmploye dlg = new WndAjoutEmploye(NouvelEmploye); bool? res = dlg.ShowDialog(); if (res.Value) { DAL.AjouterEnBDDEmploye(NouvelEmploye); Employes = DAL.GetEmployesInformations(); NouvelEmploye = new Personne(); } }
private void SupprimerEmploye(object employe) { try { var e = (Personne)CollectionViewSource.GetDefaultView(Employes).CurrentItem; DAL.SupprimerEnBDDEmploye(e); Employes = DAL.GetEmployesInformations(); } catch (Exception) { MessageBox.Show("Vous ne pouvez pas supprimer cet employé car il est relié dans la base de donnée à une clé étrangère."); } }
public UCTrombi() { InitializeComponent(); lbxPhotos.DataContext = DAL.GetEmployesInformations(); }
public ContexteEmploye() { _nouvelEmploye = new Personne(); _employes = new ObservableCollection <Personne>(); _employes = DAL.GetEmployesInformations(); }
public VMEmployes() { _employes = DAL.GetEmployesInformations(); }
public VMTrombi() { _employes = DAL.GetEmployesInformations(); }