Beispiel #1
0
        public List<Enrollment> GetStudentEnrolledSchedulesByQuarter(string studentId, string year, string quarter)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);

            return service.GetStudentEnrolledSchedulesByQuarter(studentId, year, quarter, ref errors);
        }
Beispiel #2
0
        public Enrollment GetEnrollmentDetail(string studentId, int scheduleId)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);

            return service.GetEnrollmentDetail(studentId, scheduleId, ref errors);
        }
Beispiel #3
0
        public List<Enrollment> GetAllStudentEnrolledSchedules(string studentId)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);

            return service.GetAllStudentEnrolledSchedules(studentId, ref errors);
        }
Beispiel #4
0
        public string AddEnrollment(Enrollment enrollment)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);
            service.AddEnrollment(enrollment.StudentId, enrollment.ScheduleId, ref errors);

            if (errors.Count == 0)
            {
                return "ok";
            }

            return "error";
        }
Beispiel #5
0
        public List<Student> GetStudentsByScheduleId(int scheduleId)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);

            return service.GetStudentsByScheduleId(scheduleId, ref errors);
        }
Beispiel #6
0
        public string UpdateEnrollment(Enrollment er)
        {
            var errors = new List<string>();
            var repository = new EnrollmentRepository(this.entities);
            var service = new EnrollmentService(repository);

            service.UpdateEnrollment(er, ref errors);

            if (errors.Count == 0)
            {
                return "ok";
            }

            return "error";
        }