private void EditButton_Click(object sender, RoutedEventArgs e) { if (EquipmentDataGrid.SelectedItem is Equipment eq) { var id = eq.Id; var createWindow = new EditWindow(id); createWindow.ShowDialog(); } }
private void CreateButton_Click(object sender, RoutedEventArgs e) { var createWindow = new EditWindow(0); createWindow.ShowDialog(); }