Exemplo n.º 1
0
        private void RequiringExemptionExamSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (RequiringExemptionExams.SelectedValue != null)
            {
                Exam    ex = (Exam)RequiringExemptionExams.SelectedValue;
                Student st = (Student)RequiringExemption.SelectedValue;
                PreviousAttempts.ItemsSource = ex.AttemptsBy((Student)RequiringExemption.SelectedValue);

                RequiringGiveExemptionButton.IsEnabled = st.CanGetExemption(ex);
            }
            else
            {
                PreviousAttempts.ItemsSource           = null;
                RequiringGiveExemptionButton.IsEnabled = false;
            }
        }