public Instructor GetInstructorInfo(string id)
 {
     var errors = new List<string>();
     var repository = new InstructorRepository();
     var service = new InstructorService(repository);
     return service.GetInstructorInfo(id, ref errors);
 }
        public string InsertInstructor(Instructor instructor)
        {
            var errors = new List<string>();
            var repository = new InstructorRepository();
            var service = new InstructorService(repository);
            service.InsertInstructor(instructor, ref errors);
            if (errors.Count == 0)
            {
                return "ok";
            }

            return "error";
        }
        public string DeleteInstructor(string id)
        {
            var errors = new List<string>();
            var repository = new InstructorRepository();
            var service = new InstructorService(repository);
            service.DeleteInstructor(id, ref errors);

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

            return "error";
        }
Exemplo n.º 4
0
        public string AssignGrade(Schedule schedule, string studentId, int instructorId, string grade)
        {
            var errors = new List<string>();
            var repository = new InstructorRepository(this.entities);
            var service = new InstructorService(repository);
            service.AssignGrade(schedule, studentId, instructorId, grade, ref errors);

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

            return "error";
        }
Exemplo n.º 5
0
 public List<Instructor> GetInstructorList()
 {
     var errors = new List<string>();
     var repository = new InstructorRepository(this.entities);
     var service = new InstructorService(repository);
     return service.GetInstructorList(ref errors);
 }
Exemplo n.º 6
0
        public string UpdateInstructor(Instructor instructor)
        {
            var errors = new List<string>();
            var repository = new InstructorRepository(this.entities);
            var service = new InstructorService(repository);
            service.UpdateInstructor(instructor, ref errors);

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

            return "error";
        }
Exemplo n.º 7
0
        public string RespondToPreReqOverride(int scheduleId, string studentId)
        {
            var errors = new List<string>();
            var repository = new InstructorRepository(this.entities);
            var service = new InstructorService(repository);
            service.RespondToPreReqOverride(scheduleId, studentId, ref errors);

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

            return "error";
        }