Example #1
0
        public IList <ICareerLevel> GetAllCareerLevel()
        {
            using (new OperationContextScope((IContextChannel)_emsEndPointClient.InnerChannel))
            {
                if (ServiceHeaders != null)
                {
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = Utility.SetMessageProperty(ServiceHeaders);
                }
                EmsService.SearchAccountResponse response = _emsEndPointClient.getAllCareerLevels(new EmsService.getAllCareerLevelsRequest());

                IList <ICareerLevel> listReturn = new List <ICareerLevel>();
                foreach (EmsService.careerLevelDTO item in response.careerLevels)
                {
                    ICareerLevel itemToTransform = Translator.BaseToEntity <CareerLevel>(DataIntegrationMapper.ToServiceBase <EmsService.careerLevelDTO>(item));

                    itemToTransform.CareerLevelId      = item.id.ToString();
                    itemToTransform.CareerLevelGroupId = item.careerLvlGrp.ToString();
                    itemToTransform.CareerTitle        = item.careerTitle;
                    itemToTransform.IndustryExperience = item.indExp;
                    itemToTransform.RoleExperience     = item.roleExp;
                    itemToTransform.Route = item.route;
                    listReturn.Add(itemToTransform);
                }

                return(listReturn);
            }
        }
Example #2
0
        public IList <IDepartment> GetAllDepartment()
        {
            using (new OperationContextScope((IContextChannel)_cmsEndPointClient.InnerChannel))
            {
                if (ServiceHeaders != null)
                {
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = Utility.SetMessageProperty(ServiceHeaders);
                }
                CmsService.RetrieveAllDepartmentResponse response = _cmsEndPointClient.getAllDepartments(new CmsService.getAllDepartmentsRequest());

                IList <IDepartment> listReturn = new List <IDepartment>();
                foreach (CmsService.departmentInfoDTO item in response.departmentList)
                {
                    IDepartment itemToTransform = Translator.BaseToEntity <Department>(DataIntegrationMapper.ToServiceBase <CmsService.departmentInfoDTO>(item));
                    //IDepartment department = Translator.LookupToEntity<Department>(DataIntegrationMapper.ToOfficeLocationDto(item));
                    itemToTransform.Status     = item.status.ToString();
                    itemToTransform.LocationId = item.locationId.ToString();
                    itemToTransform.ManagerId  = item.managerId.ToString();
                    listReturn.Add(itemToTransform);
                }

                return(listReturn);
            }
        }