public ViewStudentInformation GetStudentInformation(string regNo) { aStudentGateway = new StudentGateway(); return aStudentGateway.GetStudentInfo(regNo); }
public string GetStudentRegistationNO(Student aStudent) { string regNo = ""; int id; aStudentGateway = new StudentGateway(); id = aStudentGateway.GetStudentRegistationNO(aStudent); if (id < 10) regNo = "000" + id; if (id >= 10 && id < 100) regNo = "00" + id; if (id >= 100 && id < 1000) regNo = "0" + id; if (id >= 1000) regNo = id.ToString(); return regNo; }
public Student GetStudentInformation(string regNo, int depeartmentId) { aStudentGateway = new StudentGateway(); return aStudentGateway.GetStudentInformation(regNo, depeartmentId); }
public List<Course> GetStudentCourses(string regNo) { aStudentGateway = new StudentGateway(); return aStudentGateway.GetStudentCourses(regNo); }
private bool DoesThisEmailExist(Student aStudent) { aStudentGateway = new StudentGateway(); List<string> emails = new List<string>(); emails = aStudentGateway.GetStudentEmails(); foreach (string email in emails) { if (email == aStudent.Email) return true; } return false; }
public string SaveStudentCourse(StudentCourse aStudentCourse) { aStudentGateway = new StudentGateway(); return aStudentGateway.SaveStudentCourse(aStudentCourse); }
public string SaveStudent(Student aStudent) { aStudentGateway = new StudentGateway(); if (!DoesThisEmailExist(aStudent)) return aStudentGateway.SaveStudent(aStudent); else return "This Email Already Exist"; }