Exemple #1
0
 private void btnCheckStudent_Click(object sender, RoutedEventArgs e)
 {
     if (classSchedule.SelectedAppointment != null)
     {
         ScheduleAppointment appointment        = classSchedule.SelectedAppointment as ScheduleAppointment;
         CheckStudentWindow  checkStudentWindow = new CheckStudentWindow();
         checkStudentWindow.ClassId     = appointment.ClassId;
         checkStudentWindow.ScheduleId  = appointment.ScheduleId;
         checkStudentWindow.Appointment = appointment;
         if (checkStudentWindow.ShowDialog() == true)
         {
         }
     }
 }
Exemple #2
0
        private void CheckStudent(object parameter)
        {
            IEnumerable appointments = parameter as IEnumerable;

            if (appointments != null)
            {
                foreach (ScheduleAppointment appointment in appointments.OfType <ScheduleAppointment>())
                {
                    CheckStudentWindow checkStudentWindow = new CheckStudentWindow();
                    checkStudentWindow.ClassId    = appointment.ClassId;
                    checkStudentWindow.ScheduleId = appointment.ScheduleId;
                    if (checkStudentWindow.ShowDialog() == true)
                    {
                    }
                }
            }
        }