예제 #1
0
        private void EditBreeder()
        {
            var window = new BreederWindow();

            window.Breeder = selectedBreeder.Clone();

            if (window.ShowDialog() == true)
            {
                App.DogRepository.Update(window.Breeder.ToRepositoryModel());
                LoadBreeders();
            }
        }
예제 #2
0
        private void uxFileNew_Click(object sender, RoutedEventArgs e)
        {
            var window = new BreederWindow();

            if (window.ShowDialog() == true)
            {
                var uiBreederModel = window.Breeder;

                var repositoryModel = uiBreederModel.ToRepositoryModel();

                App.DogRepository.Add(repositoryModel);

                LoadBreeders();
            }
        }