示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }