public EmployeeManager() { InitializeComponent(); AddElement test = new AddElement(); test.AddEmployee("Jan", "Nowak", "500 111 122", "666 333 994", "*****@*****.**", "Kierownik", 4213, new DateTime(2010, 07, 01)); test.AddEmployee("Jurek", "Owsiak", "345 152 836", "154 752 175", "*****@*****.**", "Sprzedawca", 2031, new DateTime(2012, 08, 10)); test.AddEmployee("Adam", "Małysz", "111 222 543", "513 684 399", "*****@*****.**", "Kierowca", 3500, new DateTime(2008, 08, 08)); test.AddEmployee("Rysiek", "Lubicz", "951 628 006", "730 920 820", "*****@*****.**", "Aktor", 9000, new DateTime(1991, 06, 01)); test.AddEmployee("Lech", "Wałęsa", "123 543 789", "435 410 002", "*****@*****.**", "Elektryk", 10000, new DateTime(1989, 02, 01)); }
private void butAddEmployee_Click(object sender, EventArgs e) { AddElement Add = new AddElement(); Add.AddEmployee(txtBoxFirstName.Text, txtBoxLastName.Text, txtBoxMobilePhone.Text, txtBoxOfficePhone.Text, txtBoxMail.Text, txtBoxPosition.Text,Convert.ToDecimal(txtBoxSallary.Text), Convert.ToDateTime(dateTimePickerEmploymentDate.Value.Date)); this.DialogResult = System.Windows.Forms.DialogResult.OK; }