private void uxMfgNew_Click(object sender, RoutedEventArgs e) { var window = new ManufacturerWindow(); if (window.ShowDialog() == true) { var uiModel = window.Manufacturer; var repositoryModel = uiModel.ToRepositoryModel(); App.InventoryRepository.Add(repositoryModel); LoadManufacturers(); } }
private void uxMfgChange_Click(object sender, RoutedEventArgs e) { var window = new ManufacturerWindow(); window.Manufacturer = selectedManufacturer.Clone(); if (true == window.ShowDialog()) { App.InventoryRepository.Update(window.Manufacturer.ToRepositoryModel()); LoadManufacturers(); } }