private void SearchVisitsHistory_Click(object sender, RoutedEventArgs e) { WindowDoctorSearchVisits searchVisits = new WindowDoctorSearchVisits(ClassSqlAppointment.GetAllAppoitments()); searchVisits.ShowDialog(); HistoryOfVisits.ItemsSource = searchVisits.RefreshDataGrid(); }
private void ConfirmResult_Click(object sender, RoutedEventArgs e) { if (lastSelectedAppointmentHistoryVistis != null) { ClassSqlAppointment.UpdateAppointment(lastSelectedAppointmentHistoryVistis.AppointmendtId, ResultOfVisit.Text, TopicResult.Text); Refresh(); } }
private void Refresh() { Visits.ItemsSource = ClassSqlAppointment.AppointmentsForDataGrid(((ClassTerm)DateVisitComboBox.SelectedItem).Date); HistoryofPacient.ItemsSource = ClassSqlAppointment.GetAllApoitmentsForPatien(lastSelectedAppointmentHistoryVistis); Visits.SelectedIndex = lastSelectedIndexVisits; HistoryofPacient.SelectedIndex = lastSelectedIndexHistoryVistis; }
private void Vistis_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (Visits.SelectedItem != null) { lastSelectedAppointmentVisits = (ClassAppointment)Visits.SelectedItem; lastSelectedIndexVisits = Visits.SelectedIndex; HistoryofPacient.ItemsSource = null; HistoryofPacient.ItemsSource = ClassSqlAppointment.GetAllApoitmentsForPatien((ClassAppointment)Visits.SelectedItem); } }
public WindowDoctorVisits() { InitializeComponent(); #region Load Date to Combo try { DateVisitComboBox.ItemsSource = ClassSqlAppointment.AppointmentsDateForCombobox(); DateVisitComboBox.SelectedIndex = DateVisitComboBox.Items.Count - 1; } catch (Exception ex) { MessageBox.Show(ex.Message); } Visits.ItemsSource = null; if (DateVisitComboBox.Items.Count != 0) { Visits.ItemsSource = ClassSqlAppointment.AppointmentsForDataGrid(((ClassTerm)DateVisitComboBox.SelectedItem).Date); } }
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { Visits.ItemsSource = ClassSqlAppointment.AppointmentsForDataGrid(((ClassTerm)DateVisitComboBox.SelectedItem).Date); }
public WindowDoctorHistoryOfVisits() { InitializeComponent(); HistoryOfVisits.ItemsSource = ClassSqlAppointment.GetAllAppoitments(); HistoryOfVisits.SelectedIndex = 0; }