Exemplo n.º 1
0
        public override Appraisal TranslateToModel(APPRAISAL_HEADER entity)
        {
            try
            {
                Appraisal model = null;
                if (entity != null)
                {
                    model                  = new Appraisal();
                    model.Id               = entity.Appraisal_Header_ID;
                    model.Period           = periodTranslator.Translate(entity.PERIOD);
                    model.Staff            = staffTranslator.Translate(entity.STAFF);
                    model.Supervisor       = staffTranslator.Translate(entity.STAFF1);
                    model.AppraisalDate    = entity.Appraisal_Date;
                    model.ResponseDate     = entity.Staff_Response_Date;
                    model.Hod              = staffTranslator.Translate(entity.STAFF2);
                    model.HodAppraisalDate = entity.Hod_Appraisal_Date;
                    model.Status           = statusTranslator.Translate(entity.STATUS);
                }

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 3
0
        public override StaffLocation TranslateToModel(STAFF_LOCATION entity)
        {
            try
            {
                StaffLocation staffLocation = null;
                if (entity != null)
                {
                    staffLocation          = new StaffLocation();
                    staffLocation.Staff    = staffTranslator.Translate(entity.STAFF);
                    staffLocation.Location = locationTranslator.Translate(entity.LOCATION);
                    staffLocation.Period   = periodTranslator.Translate(entity.PERIOD);
                }

                return(staffLocation);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 4
0
        public override StaffLevel TranslateToModel(STAFF_JOB_ROLE_LEVEL entity)
        {
            try
            {
                StaffLevel staffLevel = null;
                if (entity != null)
                {
                    staffLevel        = new StaffLevel();
                    staffLevel.Staff  = staffTranslator.Translate(entity.STAFF);
                    staffLevel.Level  = levelTranslator.Translate(entity.JOB_ROLE_LEVEL);
                    staffLevel.Period = periodTranslator.Translate(entity.PERIOD);
                }

                return(staffLevel);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 5
0
        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;
            }
        }
Exemplo n.º 6
0
        public override StaffLearning TranslateToModel(STAFF_LEARNING entity)
        {
            try
            {
                StaffLearning staffLearning = null;
                if (entity != null)
                {
                    staffLearning               = new StaffLearning();
                    staffLearning.Staff         = staffTranslator.Translate(entity.STAFF);
                    staffLearning.Period        = periodTranslator.Translate(entity.PERIOD);
                    staffLearning.TrainingScore = entity.Training_Score;
                    staffLearning.PercentScore  = entity.Percentage_Score;
                }

                return(staffLearning);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 7
0
        public override LoginDetail TranslateToModel(STAFF_LOGIN staffLoginEntity)
        {
            try
            {
                LoginDetail staffLogin = null;
                if (staffLoginEntity != null)
                {
                    staffLogin              = new LoginDetail();
                    staffLogin.Staff        = staffTranslator.Translate(staffLoginEntity.STAFF);
                    staffLogin.Username     = staffLoginEntity.Username;
                    staffLogin.Password     = staffLoginEntity.Password;
                    staffLogin.IsLocked     = staffLoginEntity.Is_Locked;
                    staffLogin.IsActivated  = staffLoginEntity.Is_Activated;
                    staffLogin.IsFirstLogon = staffLoginEntity.Is_First_Logon;
                }

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