Пример #1
0
        private void AjouterEmploye(object o)
        {
            WndAjoutEmploye dlg = new WndAjoutEmploye(NouvelEmploye);
            bool?           res = dlg.ShowDialog();

            if (res.Value)
            {
                Employes.Add(NouvelEmploye);
                NouvelEmploye = new Employe();
            }
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
        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();
            }
        }