private void boutonAjouter_Click(object sender, RoutedEventArgs e)
        {
            Salarie sal = new Salarie()
            {
                NumSalarie = "7896", Nom = "coucou", Prenom = "test"
            };

            DataBase.Salaries.Add(sal);
        }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Salarie sal = new Salarie()
            {
                NumSalarie = "1234", Nom = "toto", Prenom = "titi"
            };

            if (!DataBase.Salaries.Contains(sal))
            {
                DataBase.Salaries.Add(sal);
            }
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            Salarie sal = obj as Salarie;

            if (sal == null)
            {
                return(false);
            }
            else
            {
                return(Equals(sal));
            }
        }
Пример #4
0
 public bool Equals(Salarie sal)
 {
     return(this.NumSalarie == sal.NumSalarie);
 }