示例#1
0
 public void DeleteStudent(int id)
 {
     try
     {
         dl.DeletePerson(id);
         dl.DeleteStudent(id);
         dl.DeleteStudentFromAllCourses(id);
     }
     catch (DO.BadPersonIdCourseIDException ex)
     {
         throw new BO.BadStudentIdCourseIDException("Student ID and Course ID is Not exist", ex);
     }
     catch (DO.BadPersonIdException ex)
     {
         throw new BO.BadStudentIdException("Person id does not exist or he is not a student", ex);
     }
 }