Esempio n. 1
0
        private void uxAdd_Click(object sender, RoutedEventArgs e)
        {
            var window = new AddReadingWindow();

            if (window.ShowDialog() == true)
            {
                var uiReadingModel         = window.Reading;
                var repositoryReadingModel = uiReadingModel.ToRepositoryModel();
                App.ReadingRepository.Add(repositoryReadingModel);
                LoadReading();
            }
        }
Esempio n. 2
0
        private void ModifyReading()
        {
            var window = new AddReadingWindow();

            window.Reading = selectedReading.Clone();

            if (window.ShowDialog() == true)
            {
                App.ReadingRepository.Update(window.Reading.ToRepositoryModel());
                LoadReading();
            }
        }