Наследование: IAnalysisProvider
Пример #1
0
        private void AnalysisHistoryButton_Click(object sender, RoutedEventArgs e)
        {
            var analysisProvider = new AnalysisProvider(new DatabaseProvider());
            IList<Analysis> analyzes = analysisProvider.Load(CurrentState.CurrentPerson);
            if (analyzes.Count == 0)
            {
                MessageBox.Show("История анализов данного пациента пуста!", "Error!");
                return;
            }

            Switcher.PageSwitcher.Navigate(new AnalysisHistory());
        }
Пример #2
0
 private void LoadAllAnalyzes()
 {
     var analysisProvider = new AnalysisProvider(new DatabaseProvider());
     IList<Analysis> analyzes = analysisProvider.Load(CurrentState.CurrentPerson);
     AddToDictionary(analyzes);
 }
Пример #3
0
        private void SaveAnalysisButton_Click(object sender, RoutedEventArgs e)
        {
            var analysis = GetAnalysis();
            var analysisProvider = new AnalysisProvider(new DatabaseProvider());
            if (analysis.New)
            {
                CurrentState.CurrentAnalysis.New = false;
                analysisProvider.Save(ref analysis);
            }
            else
                analysisProvider.Update(analysis);

            ChangeOpacity(SaveAnalysisButton, 350);
        }