private void BtnAddUser_Click(object sender, RoutedEventArgs e) { AddWorkerWindow AddWor = new AddWorkerWindow(null); NavigationService.Navigate(new AddWorkerWindow(null)); UpdateUsers(); }
private void BtnEditUser_Click(object sender, RoutedEventArgs e) { if (dataGridView1.SelectedItem is Workers currentUsers) { AddWorkerWindow AddS = new AddWorkerWindow(currentUsers); NavigationService.Navigate(new AddWorkerWindow(currentUsers)); UpdateUsers(); } else { MessageBox.Show("Выберите работника"); } }