private void uxFileChange_Click(object sender, RoutedEventArgs e) { var window = new PartWindow(); window.Part = selectedPart; if (window.ShowDialog() == true) { App.PartRepository.Update(window.Part.ToRepositoryModel()); LoadParts(); } }
// ==== Click Handlers - Start ==== // ==== private void uxFileNew_Click(object sender, RoutedEventArgs e) { var window = new PartWindow(); if (window.ShowDialog() == true) { var uiPartModel = window.Part; var repositoryPartModel = uiPartModel.ToRepositoryModel(); App.PartRepository.Add(repositoryPartModel); LoadParts(); } }