Пример #1
0
        public IList <ICompetency> GetAllCompetency(out IList <CodeMessage> messages)
        {
            using (new OperationContextScope((IContextChannel)_smsEndPointClient.InnerChannel))
            {
                if (ServiceHeaders != null)
                {
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = Utility.SetMessageProperty(ServiceHeaders);
                }

                SmsService.GetAllCompetenciesResponse response = _smsEndPointClient.getAllCompetencies(new SmsService.getAllCompetenciesRequest());

                IList <ICompetency> listReturn = new List <ICompetency>();
                if (Utility.ResolveCodeMessage(DataIntegrationMapper.ToGenericResponse(response), out messages))
                {
                    foreach (SmsService.competencyDto competency in response.comptencies)
                    {
                        ICompetency competencyEntity = Helper.Translator.BaseToEntity <Competency>(DataIntegrationMapper.ToServiceLookup <SmsService.competencyDto>(competency));

                        competencyEntity.CompetencyId            = competency.comeptencyId.ToString();
                        competencyEntity.Description             = competency.comeptencyDescription;
                        competencyEntity.Name                    = competency.comeptencyName;
                        competencyEntity.ManagerId               = competency.competencyManagerId.ToString();
                        competencyEntity.ManagerIdSpecified      = competency.competencyManagerIdSpecified;
                        competencyEntity.RecordStatusId          = competency.recordStatusId.ToString();
                        competencyEntity.RecordStatusIdSpecified = competency.recordStatusIdSpecified;
                        competencyEntity.Description             = competency.comeptencyDescription;

                        listReturn.Add(competencyEntity);
                    }
                }

                return(listReturn);
            }
        }
Пример #2
0
        public Boolean HasSkill(ICompetency competency)
        {
            foreach (Skill skill in skills)
            {
                if (skill.Equals(competency))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #3
0
 public bool Equals(ICompetency comp)
 {
     return(this.NameProperty == comp.NameProperty);
 }