private void UpdateBtn_Click(object sender, RoutedEventArgs e) { try { var contract = (Contract)contractDataGrid.SelectedItem; var updateContractWindow = new UpdateContractWindow(contract); updateContractWindow.Closed += UpdateContractWindow_Closed; updateContractWindow.ShowDialog(); } catch (Exception exception) { MessageBox.Show($"Error - {exception.Message}", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void UpdateContractButton_Click(object sender, RoutedEventArgs e) { Window updatecontractwindow = new UpdateContractWindow(); updatecontractwindow.ShowDialog(); }