Ejemplo n.º 1
0
 public void GetAllCourses(int studentId)
 {
     if (studentId != 0)
     {
         coursegrid.ItemsSource = studentbl.GetCoursesByStudentID(studentId);
     }
     else
     {
         MessageBox.Show("Student Does not Exists");
     }
 }
Ejemplo n.º 2
0
 public void LoadMyCourses()//method to load my courses data grid on ViewMyCoursesWindow
 {
     try
     {
         List <EnrolledCourse> enrolledCourses = objStudentBL.GetCoursesByStudentID(student.StudentID);//id set to 1 just for testing
         if (enrolledCourses.Any())
         {
             ViewMyCoursesDG.ItemsSource = enrolledCourses;
         }
         else
         {
             throw new PrometheusException("No Courses Found!");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }