private void btnAddWork_Click(object sender, RoutedEventArgs e) { AddTypeOfWorkWindow window = new AddTypeOfWorkWindow(); window.ShowDialog(); btnRefresh_Click(sender, e); }
private void btnEditWork_Click(object sender, RoutedEventArgs e) { TypeOfWorkDto item = dgTypeOfWork.SelectedItem as TypeOfWorkDto; if (item == null) { MessageBox.Show("Выберите запись для редактирования", "Редактирование типов работ"); } AddTypeOfWorkWindow window = new AddTypeOfWorkWindow(); window.Load(item); window.ShowDialog(); btnRefresh_Click(sender, e); }