public override Metrics TranslateToModel(METRIC entity) { try { Metrics metrics = null; if (entity != null) { metrics = new Metrics(); metrics.Id = entity.Metric_ID; metrics.Perspective = metricsPerspectiveTranslator.Translate(entity.METRIC_PERSPECTIVE); metrics.CompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE); metrics.Kpi = entity.Kpi; metrics.Measure = entity.Measure; metrics.DataSource = entity.Data_Source; metrics.ResponsibleDepartment = departmentTranslator.Translate(entity.DEPARTMENT); metrics.Target = entity.Target; metrics.Score = entity.Score; metrics.Period = PeriodTranslator.Translate(entity.PERIOD); metrics.JobRoleName = metrics.CompanyDepartmentJobRole.JobRole.Name; } return(metrics); } catch (Exception) { throw; } }
public override JobRoleHod TranslateToModel(JOB_ROLE_HOD entity) { try { JobRoleHod jobRoleHod = null; if (entity != null) { jobRoleHod = new JobRoleHod(); jobRoleHod.HodCompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE); jobRoleHod.StaffCompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE1); jobRoleHod.Period = periodTranslator.Translate(entity.PERIOD); //jobRoleHod.Period = new Period() { Id = entity.Period_Id }; } return(jobRoleHod); } catch (Exception) { throw; } }
public override JobRoleSupervisor TranslateToModel(JOB_ROLE_SUPERVISOR entity) { try { JobRoleSupervisor jobRoleSupervisor = null; if (entity != null) { jobRoleSupervisor = new JobRoleSupervisor(); jobRoleSupervisor.SupervisorCompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE1); jobRoleSupervisor.StaffCompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE); jobRoleSupervisor.Period = periodTranslator.Translate(entity.PERIOD); //jobRoleSupervisor.Period = new Period() { Id = entity.Period_Id }; } return(jobRoleSupervisor); } catch (Exception) { throw; } }
public override StaffCdjr TranslateToModel(STAFF_COMPANY_DEPARTMENT_JOB_ROLE entity) { try { StaffCdjr staffCdjr = null; if (entity != null) { staffCdjr = new StaffCdjr(); staffCdjr.Staff = staffTranslator.Translate(entity.STAFF); staffCdjr.CompanyDepartmentJobRole = companyDepartmentJobRoleTranslator.Translate(entity.COMPANY_DEPARTMENT_JOB_ROLE); staffCdjr.Period = periodTranslator.Translate(entity.PERIOD); } return(staffCdjr); } catch (Exception) { throw; } }