Exemplo n.º 1
0
 public string EnrollInCourse(Student aStudent)
 {
     if (aStudentGateway.IsExitsEnroll(aStudent))
     {
         return("This student Already enroll in this course");
     }
     return(aStudentGateway.EnrollInCourse(aStudent));;
 }
Exemplo n.º 2
0
 public ArrayList EnrollInCourse(StudentCourse studentCourse)
 {
     if (IsCourseEnrollable(studentCourse))
     {
         int affectedRow = _studentGateway.EnrollInCourse(studentCourse);
         if (affectedRow > 0)
         {
             return new ArrayList {
                        true, "alert-success", "Success!", "The student enrolled in the course."
             }
         }
         ;
         return(new ArrayList {
             false, "alert-danger", "Error!", "The student not enrolled in the course."
         });
     }
     return(new ArrayList {
         false, "alert-danger", "Error!", "The course already assigned to the student."
     });
 }