private void EditBrandButton_Click(object sender, RoutedEventArgs e) { if (BrandDataGrid.SelectedItem is Brand br) { var id = br.Id; var createWindow = new EditBrand(id); createWindow.ShowDialog(); } }
private void CreateBrandButton_Click(object sender, RoutedEventArgs e) { var createWindow = new EditBrand(0); createWindow.ShowDialog(); }