Exemple #1
0
 public Pracodawca AddPracownik(Pracownik _pracownik)
 {
     if (_pracownik != null)
     {
         listaPracownikow.Add(_pracownik);
     }
     else
     {
         throw new System.ArgumentException("Argument jest niepoprawny.");
     }
     return(this);
 }
Exemple #2
0
        static void Main(string[] args)
        {
            Pracownik tester = new Pracownik();

            tester.SetIDPracownik(453678635)
            .SetImieNazwisko("Rafał Ściblak")
            .SetNumerTelefonu(506190432)
            .SetWiek(25)
            .SetWynagrodzenie(5000);

            Pracodawca pracodawca = new Pracodawca();

            pracodawca.AddPracownik(tester);

            Console.WriteLine(pracodawca.GetListaPracownikow().ElementAt(0).GetImieNazwisko());
            Console.ReadKey();
        }