public bool PutSubscription(PersonIdentifier personIdentifier) { if (IPartPerCallDataProviderHelper.CanCallOnline(personIdentifier.CprNumber)) { IndividualRequestType request = new IndividualRequestType(true, DataType.NoData, decimal.Parse(personIdentifier.CprNumber)); IndividualResponseType response = this.GetResponse(request); return(true); } else { return(false); } }
public RegistreringType1 Read(CprBroker.Schemas.PersonIdentifier uuid, LaesInputType input, Func <string, Guid> cpr2uuidFunc, out QualityLevel?ql) { ql = QualityLevel.Cpr; if (IPartPerCallDataProviderHelper.CanCallOnline(uuid.CprNumber)) { IndividualRequestType request = new IndividualRequestType(true, DataType.DefinedByTask, decimal.Parse(uuid.CprNumber)); IndividualResponseType response = this.GetResponse(request); UuidCache cache = new UuidCache(); cache.FillCache(response.RelatedPnrs); return(response.ToRegistreringType1(cpr2uuidFunc)); } else { return(null); } }
public IndividualResponseType GetResponse(IndividualRequestType request) { string response; string error; if (Send(request.PNR, request.Contents, out response, out error)) { var ret = new IndividualResponseType() { Contents = response }; ret.FillFromFixedLengthString(ret.Data, Constants.DataObjectMap); ret.SourceObject = ret.Data; return(ret); } else { throw new Exception(error); } }