Пример #1
0
        //============================================

        public TrafficNoResponse GetTrfNoByNID(NationalIDRequest req)
        {
            try
            {
                TrafficProfileServicesSoap obj = new TrafficProfileServicesSoapClient();

                var header = new ADPTrafficProfileReference.ADPSoapHeaderIn()
                {
                    UserName = username,
                    Password = password
                };
                var objToSend = new GetTrfNoByNationalIDRequest()
                {
                    NationalNo = req.NationalNo,
                    UserID     = userId,
                    SystemCode = systemCode
                };

                var result = obj.GetTrfNoByNationalID(new GetTrfNoByNationalIDRequest1 {
                    ADPSoapHeaderIn = header, request = objToSend
                });

                if (result != null)
                {
                    return(new TrafficNoResponse {
                        TcfNo = result.GetTrfNoByNationalIDResult.TcfNo
                    });
                }
                else
                {
                    return(null);
                }
            }
            catch
            {
                return(null);
            }
        }
Пример #2
0
        public bool GetPersonIsWanted(PersonDetailsRequest req)
        {
            try
            {
                TrafficProfileServicesSoap obj = new TrafficProfileServicesSoapClient();

                var header = new ADPTrafficProfileReference.ADPSoapHeaderIn()
                {
                    UserName = username,
                    Password = password
                };

                var inner = new CheckWantedPersonRequest()
                {
                    TcfNo      = req.TcfNo,
                    UnifiedID  = req.UnifiedId,
                    UserID     = userId,
                    SystemCode = systemCode
                };

                var objToSend = new CheckWantedPersonRequest1(header, inner);//header,
                var result    = obj.CheckWantedPerson(objToSend);

                if (result == null)
                {
                    return(false);
                }
                else
                {
                    return(result.CheckWantedPersonResult.IsWantedPerson);
                }
            }
            catch
            {
                return(false);
            }
        }
Пример #3
0
        public TrafficProfileResponse GetTrafficProfile(TrafficProfileRequest req)
        {
            try
            {
                TrafficProfileServicesSoap obj = new TrafficProfileServicesSoapClient();

                var header = new ADPTrafficProfileReference.ADPSoapHeaderIn()
                {
                    UserName = username,
                    Password = password
                };

                var inner = new GetTrafficProfileRequest()
                {
                    TcfNo      = req.TcfNo,
                    UserID     = userId,
                    SystemCode = systemCode
                };

                var objToSend = new GetTrafficProfileRequest1(header, inner);//header,
                var result    = obj.GetTrafficProfile(objToSend);

                if (result.GetTrafficProfileResult == null)
                {
                    return(null);
                }
                else
                {
                    return(result.GetTrafficProfileResult.ConvertToTrafficProfile());
                }
            }
            catch
            {
                return(null);
            }
        }