Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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";
        }
Esempio n. 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);
        }
Esempio n. 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";
        }