Пример #1
0
        private static CT_searchapplicant InitializeUser()
        {
            CT_searchapplicant user = new CT_searchapplicant();

            /*user.dob = new DateTime(1910, 01, 01);
             * user.title = "MISS";
             * user.forename = "JULIA";
             * user.othernames = "";
             * user.surname = "AUDI";
             * user.buildingno = "1";
             * user.street = "TOP GEAR LANE";
             * user.postcode = "X9 9LF";*/

            /*user.dob = new DateTime(1960, 11, 05);
             * user.name[0].title = "MR";
             * user.name[0].forename = "OSCAR";
             * user.name[0].othernames = "TEST-PERSON";
             * user.name[0].surname = "MANX";
             * user.address[0].buildingno = "606";
             * user.address[0].street1 = "ALLEY CAT LANE";
             * user.address[0].postcode = "X9 9AA";
             * user.tpoptout = 0;
             * user.tpoptoutSpecified = true;
             */
            /* Create a new request applicant object and attach it to the credit request object. */
            CT_searchapplicant apiApplicant = new CT_searchapplicant();

            apiApplicant.dob               = new DateTime(1960, 11, 05);
            apiApplicant.dobSpecified      = true;
            apiApplicant.tpoptout          = 0;
            apiApplicant.tpoptoutSpecified = true;

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

            apiName.title      = "MR";
            apiName.forename   = "OSCAR";
            apiName.othernames = "TEST-PERSON";
            apiName.surname    = "MANX";

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

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

            apiInputCurrentAddress.buildingno = "606";
            apiInputCurrentAddress.street1    = "ALLEY CAT LANE";
            apiInputCurrentAddress.postcode   = "X9 9AA";

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

            return(apiApplicant);
        }
Пример #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);
        }