示例#1
0
        public override TeacherAvailability TranslateToModel(TEACHER_AVAILABILITY entity)
        {
            try
            {
                TeacherAvailability model = null;
                if (entity != null)
                {
                    model         = new TeacherAvailability();
                    model.Id      = entity.Teacher_Availability_Id;
                    model.Person  = _personTranslator.Translate(entity.TEACHER.PERSON);
                    model.WeekDay = _weekDayTranslator.Translate(entity.WEEK_DAY);
                    model.Period  = _periodTranslator.Translate(entity.PERIOD);
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
        public override EmployerDesiredTime TranslateToModel(EMPLOYER_DESIRED_TIME entity)
        {
            try
            {
                EmployerDesiredTime model = null;
                if (entity != null)
                {
                    model    = new EmployerDesiredTime();
                    model.Id = entity.Employer_Student_Category_Id;
                    model.EmployerStudentCategory = _employerStudentCategoryTranslator.Translate(entity.EMPLOYER_STUDENT_CATEGORY);
                    model.WeekDay = _weekDayTranslator.Translate(entity.WEEK_DAY);
                    model.Period  = _periodTranslator.Translate(entity.PERIOD);
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }