private void Departments_Click(object sender, RoutedEventArgs e) { DepartmentWindow departmentWindow = new DepartmentWindow(this, this, empList, depList); departmentWindow.Show(); Hide(); }
public void Add(DepartmentWindow window) { if (window.depName.Text != "") { Name = window.depName.Text; } else { Name = "Пусто"; } if (window.depYear.SelectedItem != null) { Year = int.Parse(window.depYear.Text); } Activity = window.depActivity.Text; if (window.depBoss.SelectedItem != null) { boss = (Employee)window.depBoss.SelectedItem; boss.dep = this; BossIndex = window.empList.empManager.IndexOf(boss); } }