Пример #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            EmployeeWindow addEmpWindow = new EmployeeWindow(_department, _employees, employeeList, false)
            {
                Owner = this
            };

            addEmpWindow.Show();
        }
Пример #2
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     if (employeeList.SelectedItem != null)
     {
         EmployeeWindow addEmpWindow = new EmployeeWindow(_department, _employees, employeeList, true)
         {
             Owner = this
         };
         addEmpWindow.Show();
     }
     else
     {
         MessageBox.Show("Выберите работника!", "Ошибка выбора работника", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }