예제 #1
0
        public IPerson GetAccount(string key, string value)
        {
            using (new OperationContextScope((IContextChannel)_umsEndPointClient.InnerChannel))
            {
                if (ServiceHeaders != null)
                {
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = Utility.SetMessageProperty(ServiceHeaders);
                }

                UmsService.GetAccountResponse response = _umsEndPointClient.getAccount(new UmsService.getAccountRequest()
                {
                    key = key, value = value
                });
                IPerson person = Translator.PersonToEntity(DataIntegrationMapper.ToAccountInfoDto(response));
                //Helper.Translator.PersonToEntity(
                //Person Person = new Person()
                //{
                //    FullName = Common.Helper.Utility.GenerateFullName(response.firstName, response.middleName, response.lastName),
                //    PersonId = response.id,
                //    ActivationToken = response.activationToken,
                //    Age = response.age,
                //    Birthday = response.birthday,
                //    BirthdaySpecified = response.birthdaySpecified,
                //    CountryId = response.country,
                //    CreateDate = response.createDate,
                //    CreateDateSpecified = response.createDateSpecified,
                //    ExternalEmail = response.email,
                //    FirstName = response.firstName,
                //    LastName = response.lastName,
                //    MiddleName = response.middleName,
                //    Reason = response.reason,
                //    Sex = response.sex,
                //    SocialSecurityNumber = response.socialSecNumber,
                //    StatusChangeBy = response.statusChangeBy,
                //    StatusChangeReason = response.statusChangeReason,
                //    StatusChangeTime = response.statusChangeTime,
                //    StatusChangeTimeSpecified = response.statusChangeTimeSpecified,
                //    UpdateDate = response.updateDate,
                //    UpdateDateSpecified = response.updateDateSpecified,
                //};

                return(person);
            }
        }
예제 #2
0
 public static UmsService.accountInfoDTO ToAccountInfoDto(this UmsService.GetAccountResponse source)
 {
     return(Mapper.Map <UmsService.GetAccountResponse, UmsService.accountInfoDTO>(source));
 }