Beispiel #1
0
 public Student GetStudentById(int id)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetStudentById(id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
 private bool IsStudentExist(string studentEmail)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentExist(studentEmail));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #3
0
 public List <Student> GetAllStudent()
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetAllStudent());
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
 public bool DeleteStudentResult(int id, int sid, int cid)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.DeleteStudentResult(id, sid, cid));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #5
0
 public DataTable GetStudentResultReportByStudentId(int studentId)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetStudentResultReportByStudentId(studentId));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #6
0
 private bool IsStudentResultExist(Student studentResult)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentResultExist(studentResult));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #7
0
 public bool UpdateStudentResult(Student student)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.UpdateStudentResult(student));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #8
0
 public Student GetAllStudentEnrollCourseById(int id, int sid, int cid)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetAllStudentEnrollCourseById(id, sid, cid));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #9
0
 private bool IsStudentEnrollCourseExist(Student enrollCourse)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentEnrollCourseExist(enrollCourse));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #10
0
 public bool UpdateStudent(Student student)
 {
     try
     {
         if (IsStudentEmailExist(student.Email, student.Id))
         {
             throw new Exception("This email already exist.");
         }
         else
         {
             StudentGetway studentGetway = new StudentGetway();
             return(studentGetway.UpdateStudent(student));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #11
0
 public bool SaveStudent(Student student)
 {
     try
     {
         if (IsStudentExist(student.Email))
         {
             throw new Exception("Student already exist.");
         }
         else
         {
             StudentGetway studentGetway = new StudentGetway();
             return(studentGetway.SaveStudent(student));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #12
0
 public bool StudentResult(Student studentResult)
 {
     try
     {
         if (IsStudentResultExist(studentResult))
         {
             throw new Exception("Student result already saved.");
         }
         else
         {
             StudentGetway studentGetway = new StudentGetway();
             return(studentGetway.StudentResult(studentResult));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #13
0
 public bool UpdateEnrollment(Student enrollCourse)
 {
     try
     {
         if (IsStudentEnrollCourseExist(enrollCourse))
         {
             throw new Exception("Student already enrolled in this course.");
         }
         else
         {
             StudentGetway studentGetway = new StudentGetway();
             return(studentGetway.UpdateEnrollment(enrollCourse));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 public StudentManager()
 {
     studentGetway = new StudentGetway();
 }
Beispiel #15
0
 public StudentController()
 {
     studentGetway = new StudentGetway();
     db            = new StudentDb();
 }