Exemple #1
0
        // Unenrolls the student from the given course.
        protected void RemoveEnrollmentImageButton_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton unenrollStudentImageButton = sender as ImageButton;
            Enrollment  enrollment = studentController.FindEnrollmentById(int.Parse(unenrollStudentImageButton.CommandArgument));

            studentController.DeleteEnrollment(enrollment);
            Response.Redirect(string.Format("StudentManagement?student={0}&unenrolledCourse={1}", Request.QueryString["student"], enrollment.Course.Title));
        }