private void WindowSelectionDiseases_Loaded(object sender, RoutedEventArgs e) { var list = logic.Read(new DiseaseBindingModel { DoctorId = doctorId }); if (list != null) { ComboBoxDiseaseName.ItemsSource = list; } }
private void WindowSelectionDiseasesForReceiptList_Loaded(object sender, RoutedEventArgs e) { var list = logic.Read(new DiseaseBindingModel { DoctorId = doctorId }); if (list != null) { ComboBoxDiseaseName.ItemsSource = list; } if (id != null) { ComboBoxDiseaseName.SelectedItem = SetValue(id.Value); } }
private void LoadData() { try { var list = logic.Read(new DiseaseBindingModel { DoctorId = id }); if (list != null) { dataGrid.ItemsSource = list; dataGrid.Columns[0].Visibility = Visibility.Hidden; dataGrid.Columns[1].Visibility = Visibility.Hidden; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void WindowDisease_Loaded(object sender, RoutedEventArgs e) { if (id.HasValue) { try { var view = logic.Read(new DiseaseBindingModel { Id = id })?[0]; if (view != null) { TextBoxName.Text = view.DiseaseName; TextBoxDifficulty.Text = view.Difficulty.ToString(); TextBoxClass.Text = view.Class; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } } }