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()); }
private void LoadAllAnalyzes() { var analysisProvider = new AnalysisProvider(new DatabaseProvider()); IList<Analysis> analyzes = analysisProvider.Load(CurrentState.CurrentPerson); AddToDictionary(analyzes); }
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); }