예제 #1
0
        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;
            }
        }
예제 #2
0
        public override Inps TranslateToModel(INPS entity)
        {
            try
            {
                Inps nps = null;
                if (entity != null)
                {
                    nps                       = new Inps();
                    nps.Id                    = entity.Inps_ID;
                    nps.Type                  = inpsTypeTranslator.Translate(entity.INPS_TYPE);
                    nps.Staff                 = staffTranslator.Translate(entity.STAFF);
                    nps.Kpi                   = entity.Kpi;
                    nps.Measure               = entity.Measure;
                    nps.DataSource            = entity.Data_Source;
                    nps.ResponsibleDepartment = departmentTranslator.Translate(entity.DEPARTMENT);
                    nps.Target                = entity.Target;
                    nps.Score                 = entity.Score;
                    nps.Period                = PeriodTranslator.Translate(entity.PERIOD);
                }

                return(nps);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #3
0
        public override CompanyDepartment TranslateToModel(COMPANY_DEPARTMENT entity)
        {
            try
            {
                CompanyDepartment companyDepartment = null;
                if (entity != null)
                {
                    companyDepartment             = new CompanyDepartment();
                    companyDepartment.Company     = companyTranslator.Translate(entity.COMPANY);
                    companyDepartment.Department  = departmentTranslator.Translate(entity.DEPARTMENT);
                    companyDepartment.Description = entity.Description;
                }

                return(companyDepartment);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #4
0
        public override CompanyDepartmentJobRole TranslateToModel(COMPANY_DEPARTMENT_JOB_ROLE entity)
        {
            try
            {
                CompanyDepartmentJobRole companyDepartmentJobRole = null;
                if (entity != null)
                {
                    companyDepartmentJobRole             = new CompanyDepartmentJobRole();
                    companyDepartmentJobRole.Id          = entity.Company_Department_Job_Role_ID;
                    companyDepartmentJobRole.Company     = companyTranslator.Translate(entity.COMPANY_DEPARTMENT.COMPANY);
                    companyDepartmentJobRole.Department  = departmentTranslator.Translate(entity.COMPANY_DEPARTMENT.DEPARTMENT);
                    companyDepartmentJobRole.JobRole     = jobRoleTranslator.Translate(entity.JOB_ROLE);
                    companyDepartmentJobRole.Description = entity.Description;
                }

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