public List <CallCreditApplicantAddresses> GetApplicantAddresses(CT_searchrequest request)
        {
            var Applicantddresses = new List <CallCreditApplicantAddresses>();

            TryRead(() => {
                foreach (var ApD in request.applicant[0].address)
                {
                    var appaddresses = new CallCreditApplicantAddresses();

                    var appadd = ApD;
                    TryRead(() => appaddresses.AbodeNo      = appadd.abodeno, "Abode name or number", false);
                    TryRead(() => appaddresses.BuildingNo   = appadd.buildingno, "Building Number");
                    TryRead(() => appaddresses.BuildingName = appadd.buildingname, "Building Name", false);
                    TryRead(() => appaddresses.Street1      = appadd.street1, "Street1", false);
                    TryRead(() => appaddresses.Street2      = appadd.street2, "Street2", false);
                    TryRead(() => appaddresses.SubLocality  = appadd.sublocality, "Sublocality", false);
                    TryRead(() => appaddresses.Locality     = appadd.locality, "District or Locality", false);
                    TryRead(() => appaddresses.PostTown     = appadd.posttown, "Town", false);
                    TryRead(() => appaddresses.PostCode     = appadd.postcode, "Postcode");
                    appaddresses.StartDate = TryReadDate(() => appadd.startdate, "The date the applicant moved into the Residence ", false);
                    appaddresses.EndDate   = TryReadDate(() => appadd.enddate, "The date the applicant moved out of the Residence ", false);
                    TryRead(() => appaddresses.Duration = appadd.duration, "Duration of residency", false);
                    Applicantddresses.Add(appaddresses);
                }
            }, "Applicant Addresses");

            return(Applicantddresses);
        }
Esempio n. 2
0
        private CT_SearchDefinition InitializeApiRequest(UserInfo user)
        {
            CT_SearchDefinition searchDef = new CT_SearchDefinition();

            CT_searchrequest srequest = new CT_searchrequest();

            srequest.purpose            = "DS";
            srequest.score              = 1;
            srequest.scoreSpecified     = true;
            srequest.transient          = 0;
            srequest.transientSpecified = true;
            srequest.schemaversion      = "7.2";
            srequest.datasets           = 511;
            //srequest.credittype = this.cboCreditType.SelectedValue.ToString();
            searchDef.creditrequest = srequest;

            /* Create a new request applicant object and attach it to the credit request object. */
            CT_searchapplicant apiApplicant = new CT_searchapplicant();

            apiApplicant.dob          = user.dob;
            apiApplicant.dobSpecified = true;

            srequest.applicant = new CT_searchapplicant[] { apiApplicant };

            /* Create a new name object and attach it to the request applicant object. */
            CT_inputname apiName = new CT_inputname();

            apiName.title      = user.title;
            apiName.forename   = user.forename;
            apiName.othernames = user.othernames;
            apiName.surname    = user.surname;

            apiApplicant.name = new CT_inputname[] { apiName };

            /* Create a new input current address object */
            CT_inputaddress apiInputCurrentAddress = new CT_inputaddress();

            apiInputCurrentAddress.buildingno = user.buildingno;
            apiInputCurrentAddress.street1    = user.street;
            apiInputCurrentAddress.postcode   = user.postcode;

            apiApplicant.address = new CT_inputaddress[] { apiInputCurrentAddress };

            return(searchDef);
        }
Esempio n. 3
0
        private static CT_SearchDefinition InitializeApiRequest(CT_searchapplicant searchApplicant)
        {
            CT_SearchDefinition searchDef = new CT_SearchDefinition();

            CT_searchrequest srequest = new CT_searchrequest();

            srequest.purpose            = "BS";
            srequest.score              = 1;
            srequest.scoreSpecified     = true;
            srequest.transient          = 0;
            srequest.transientSpecified = true;
            srequest.schemaversion      = "7.2";
            srequest.datasets           = 511;
            //srequest.credittype = this.cboCreditType.SelectedValue.ToString();
            searchDef.creditrequest = srequest;
            srequest.applicant      = new CT_searchapplicant[] { searchApplicant };

            return(searchDef);
        }
        public List <CallCreditApplicantNames> GetApplicantNames(CT_searchrequest request)
        {
            var ApplicantNames = new List <CallCreditApplicantNames>();

            TryRead(() => {
                foreach (var ApN in request.applicant[0].name)
                {
                    var appnames = new CallCreditApplicantNames();

                    var apname = ApN;

                    TryRead(() => appnames.Title      = apname.title, "Title", false);
                    TryRead(() => appnames.Forename   = apname.forename, "Forename");
                    TryRead(() => appnames.OtherNames = apname.othernames, "Middle names / initials ", false);
                    TryRead(() => appnames.Surname    = apname.surname, "Surname");
                    TryRead(() => appnames.Suffix     = apname.suffix, "Suffix", false);
                    ApplicantNames.Add(appnames);
                }
            }, "Applicant Names");

            return(ApplicantNames);
        }