private void Button_Click(object sender, RoutedEventArgs e)
        {
            addWorker add = new addWorker();

            add.Closed += (asd, dsa) => { Show(); Refresh(); };
            Hide();
            add.Show();
        }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (workerDataGrid.SelectedItem != null)
     {
         addWorker add = new addWorker(workerDataGrid.SelectedItem as Worker);
         add.Closed += (asd, dsa) => { Show(); Refresh(); };
         Hide();
         add.Show();
     }
     else
     {
         MessageBox.Show("Выберите сотрудника для внесения изменений");
     }
 }