Inheritance: IAnalysisProvider
コード例 #1
0
ファイル: UserLoaded.xaml.cs プロジェクト: Confirmit/Students
        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);
        }