private void AddPartButton_Click(object sender, RoutedEventArgs e) { var partId = GetPartIds(Model.Parts).GetNextId(); AddEditPart addPartWindow = new AddEditPart(partId); addPartWindow.Owner = Window.GetWindow(this); Opacity = 0.75; addPartWindow.ShowDialog(); }
private void ModifyPartButton_Click(object sender, RoutedEventArgs e) { if (SelectedPart != null) { AddEditPart modifyPartWindow = new AddEditPart(SelectedPart.PartId); modifyPartWindow.Owner = Window.GetWindow(this); Opacity = 0.75; modifyPartWindow.ShowDialog(); } else { MessageBox.Show( "You must select a part to modify.", "No Part Selected", MessageBoxButton.OK, MessageBoxImage.Information ); } }