private void ShowTalons_Click(object sender, RoutedEventArgs e) { PATIENT p = (PATIENT)ResSet.SelectedItem; PastVisits wind = new PastVisits(user, datetime1); wind.Show(); Close(); }
private void Show_Click(object sender, RoutedEventArgs e) { if (ResSet.SelectedItem != null) { PATIENT p = (PATIENT)ResSet.SelectedItem; PastVisits wind = new PastVisits(p, user, datetime1); wind.Show(); Close(); } else { MessageBox.Show("Выберите пациента"); } }