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); } }