private void AjouterEmploye(object o) { WndAjoutEmploye dlg = new WndAjoutEmploye(NouvelEmploye); bool? res = dlg.ShowDialog(); if (res.Value) { Employes.Add(NouvelEmploye); NouvelEmploye = new Employe(); } }
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 AjouterEmploye(Object o) { //if (!string.IsNullOrEmpty(NouvelEmploye.Nom) && !string.IsNullOrEmpty(NouvelEmploye.Prenom)) //{ // Employes.Add(NouvelEmploye); // DAL.AjouterEmploye(NouvelEmploye); // NouvelEmploye = new Employe(); //} WndAjoutEmploye dlg = new WndAjoutEmploye(NouvelEmploye); bool? res = dlg.ShowDialog(); if (res.Value) { Employes.Add(NouvelEmploye); NouvelEmploye = new Employe(); } }