public override TeachingCost TranslateToModel(TEACHING_COST entity)
        {
            try
            {
                TeachingCost model = null;
                if (entity != null)
                {
                    model    = new TeachingCost();
                    model.Id = entity.Teaching_Cost_Id;
                    model.StudentCategory       = _studentCategoryTranslator.Translate(entity.STUDENT_CATEGORY);
                    model.QualificationCategory = _qualificationCategoryTranslator.Translate(entity.QUALIFICATION_CATEGORY);
                    model.NoOfPeriod            = entity.No_Of_Period;
                    model.Amount      = entity.Amount;
                    model.DateEntered = entity.Date_Entered;

                    //if (entity.QUALIFICATION_CATEGORY != null && entity.QUALIFICATION_CATEGORY.QUALIFICATION != null && entity.QUALIFICATION_CATEGORY.QUALIFICATION.Count > 0)
                    //{
                    //    model.Qualifications = _qualificationTranslator.Translate(entity.QUALIFICATION_CATEGORY.QUALIFICATION.ToList());
                    //}
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public override TeacherStudentCategory TranslateToModel(TEACHER_STUDENT_CATEGORY entity)
        {
            try
            {
                TeacherStudentCategory model = null;
                if (entity != null)
                {
                    model                 = new TeacherStudentCategory();
                    model.Id              = entity.Teacher_Student_Category_Id;
                    model.Person          = _personTranslator.Translate(entity.TEACHER.PERSON);
                    model.StudentCategory = _studentCategoryTranslator.Translate(entity.STUDENT_CATEGORY);
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
        public override EmployerStudentCategory TranslateToModel(EMPLOYER_STUDENT_CATEGORY entity)
        {
            try
            {
                EmployerStudentCategory model = null;
                if (entity != null)
                {
                    model                 = new EmployerStudentCategory();
                    model.Id              = entity.Employer_Student_Category_Id;
                    model.Person          = _personTranslator.Translate(entity.EMPLOYER.PERSON);
                    model.StudentCategory = _studentCategoryTranslator.Translate(entity.STUDENT_CATEGORY);
                    model.TeacherType     = _teacherTypeTranslator.Translate(entity.TEACHER_TYPE);
                    model.NoOfStudent     = entity.No_Of_Student;
                }

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