private void Dodavanje(object sender, RoutedEventArgs e) { ArtEd Editor = new ArtEd(); Editor.Owner = this; if (Editor.ShowDialog() == true) { Art.Add(Editor.DataContext as Artikal); } }
private void Izmena(object sender, RoutedEventArgs e) { if (dg.SelectedItem != null) { ArtEd Editor = new ArtEd(); Editor.Owner = this; Editor.DataContext = dg.SelectedItem; Editor.ShowDialog(); } }