Exemple #1
0
        public static ICareerLevel CareerLevelToEntity(EmsService.careerLevelDTO careerLevel)
        {
            ICareerLevel entityObject = BaseToEntity <CareerLevel>(DataIntegrationMapper.ToServiceBase <EmsService.careerLevelDTO>(careerLevel));

            entityObject.CareerLevelId      = careerLevel.careerLvl.ToString();
            entityObject.CareerLevelGroupId = careerLevel.careerLvlGrp.ToString();
            entityObject.CareerTitle        = careerLevel.careerTitle;
            entityObject.IndustryExperience = careerLevel.indExp;
            entityObject.RoleExperience     = careerLevel.roleExp;
            entityObject.Route = careerLevel.route;
            return(entityObject);
        }
Exemple #2
0
        public static Entity DepartmentToEntity <Entity>(EmsService.departmentInfoDTO source) where Entity : IDepartment, new()
        {
            Entity entityObject = LookupToEntity <Entity>(DataIntegrationMapper.ToServiceLookup <EmsService.departmentInfoDTO>(source));

            entityObject.Id           = source.deptId.ToString();
            entityObject.DepartmentId = entityObject.Id;
            entityObject.Name         = source.deptName;
            entityObject.LocationId   = source.locationId;
            entityObject.ManagerId    = source.managerId;
            entityObject.Status       = source.status.ToString();

            return(entityObject);
        }
Exemple #3
0
        public static IJob JobToEntity(EmsService.jobInfoDTO job)
        {
            IJob entityObject = BaseToEntity <Job>(DataIntegrationMapper.ToServiceBase <EmsService.jobInfoDTO>(job));

            entityObject.Code                = job.code;
            entityObject.CreateBy            = job.createBy;
            entityObject.CreateDate          = job.createDate;
            entityObject.CreateDateSpecified = job.createDateSpecified;
            entityObject.MaxSalary           = job.maxSalary;
            entityObject.MaxSalarySpecified  = job.maxSalarySpecified;
            entityObject.MinSalary           = job.minSalary;
            entityObject.minSalarySpecified  = job.minSalarySpecified;
            entityObject.Status              = job.status;
            entityObject.Title               = job.title;
            entityObject.UpdateBy            = job.updateBy;
            entityObject.UpdateDate          = job.updateDate;
            entityObject.UpdateDateSpecified = job.updateDateSpecified;
            entityObject.UpdateReason        = job.updateReason;
            return(entityObject);
        }
Exemple #4
0
        public static Entity EmployeeToEntity <Entity>(EmsService.employeeInfoDTO source) where Entity : IEmployee, new ()
        {
            Entity entityObject = BaseToEntity <Entity>(DataIntegrationMapper.ToServiceBase <EmsService.employeeInfoDTO>(source));

            entityObject.FullName      = Common.Helper.Utility.GenerateFullName(source.accountInfoDTO.firstName, source.accountInfoDTO.middleName, source.accountInfoDTO.lastName);
            entityObject.FirstName     = source.accountInfoDTO.firstName;
            entityObject.MiddleName    = source.accountInfoDTO.middleName;
            entityObject.LastName      = source.accountInfoDTO.lastName;
            entityObject.ExternalEmail = source.accountInfoDTO.externalEmail;

            entityObject.CareerPathId            = source.careerPathId.ToString();
            entityObject.CompetencyGroupId       = source.cmptncyGrpId.ToString();
            entityObject.CompetencyId            = source.cmptncyId.ToString();
            entityObject.CommisionPct            = source.commisionPct.ToString();
            entityObject.CorporateLocationNumber = source.corpLocNo;
            entityObject.Email            = source.email;
            entityObject.EmployeeStatus   = source.empStatusId.ToString();
            entityObject.EmployeeTypeId   = source.empTypeId.ToString();
            entityObject.HireDate         = source.hireDate;
            entityObject.EmployeeId       = source.id.ToString();
            entityObject.ManagerId        = source.managerId.ToString();
            entityObject.Number           = source.number;
            entityObject.OfficeLocationId = source.officeLocId.ToString();
            entityObject.ProjectManagerId = source.projMgrId.ToString();
            entityObject.RecordStatus     = source.recordStatus.ToString();
            entityObject.Rohq             = source.rohq;
            entityObject.Salary           = source.salary.ToString();
            entityObject.SeatNumber       = source.seatNo;

            if (source.departmentInfoDTO != null)
            {
                entityObject.DepartmentId     = source.departmentInfoDTO.deptId.ToString();
                entityObject.DepartmentObject = DepartmentToEntity <Department>(source.departmentInfoDTO);
            }

            return(entityObject);
        }
Exemple #5
0
        public static IPerson PersonToEntity(UmsService.accountInfoDTO person)
        {
            IPerson entityObject = BaseToEntity <Person>(DataIntegrationMapper.ToServiceBase <UmsService.accountInfoDTO>(person));

            entityObject.PersonId                   = person.id.ToString();
            entityObject.PersonStatus               = person.status;
            entityObject.ActivationToken            = person.activationToken;
            entityObject.Address                    = person.address;
            entityObject.Age                        = person.age.ToString();
            entityObject.AgeSpecified               = person.ageSpecified;
            entityObject.Birthday                   = person.birthDate;
            entityObject.BirthdaySpecified          = person.birthDateSpecified;
            entityObject.CivilStatus                = person.civilStatus;
            entityObject.CountryId                  = person.countryId.ToString();
            entityObject.CountryIdSpecified         = person.countryIdSpecified;
            entityObject.ExternalEmail              = person.externalEmail;
            entityObject.HomeNumber                 = person.homeNo;
            entityObject.FirstName                  = person.firstName;
            entityObject.LastName                   = person.lastName;
            entityObject.MiddleName                 = person.middleName;
            entityObject.PassportExpiry             = person.passportExpiry;
            entityObject.PassportExpirySpecified    = person.passportExpirySpecified;
            entityObject.PassportNumber             = person.passportNo;
            entityObject.PrimaryNumber              = person.primaryNo;
            entityObject.RecordStatus               = person.recordStatus;
            entityObject.RecordStatusSpecified      = person.recordStatusSpecified;
            entityObject.SecondaryNumber            = person.secondaryNo;
            entityObject.Sex                        = person.sex;
            entityObject.SocialSecurityNumber       = person.socialSecNo;
            entityObject.StartDateExpiry            = person.startDateExp;
            entityObject.StartDateExpirySpecified   = person.startDateExpSpecified;
            entityObject.UpdateReason               = person.updateReason;
            entityObject.YearsItExperience          = person.yrsItExp;
            entityObject.YearsItExperienceSpecified = person.yrsItExpSpecified;
            return(entityObject);
        }