Example #1
0
 public Student GetStudentById(int id)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetStudentById(id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 private bool IsStudentExist(string studentEmail)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentExist(studentEmail));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
 public List <Student> GetAllStudent()
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetAllStudent());
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #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;
     }
 }
Example #5
0
 public DataTable GetStudentResultReportByStudentId(int studentId)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.GetStudentResultReportByStudentId(studentId));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #6
0
 private bool IsStudentResultExist(Student studentResult)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentResultExist(studentResult));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #7
0
 public bool UpdateStudentResult(Student student)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.UpdateStudentResult(student));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #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;
     }
 }
Example #9
0
 private bool IsStudentEnrollCourseExist(Student enrollCourse)
 {
     try
     {
         StudentGetway studentGetway = new StudentGetway();
         return(studentGetway.IsStudentEnrollCourseExist(enrollCourse));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #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;
     }
 }
Example #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;
     }
 }
Example #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;
     }
 }
Example #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();
 }
Example #15
0
 public StudentController()
 {
     studentGetway = new StudentGetway();
     db            = new StudentDb();
 }