示例#1
0
    public SellLeadResponse SubmitLead(LeadRequest request)
    {
        //Could not make a total dependency for this legacy webservice so needed to pass the data context as a parameter
            EprospectsDataContext context = GetDataContext();

            IApplyLeadService applyLeadService = new ApplyLeadService(context);

            SellLeadResponse response = applyLeadService.ApplyLead(request);

            return response;
    }
 public static LeadRequest GetLeadRequest()
 {
     LeadRequest lead = new LeadRequest();
     lead.AddressLine1 = "12 Bellefields road";
     lead.AddressLine2 = "flat 2";
     lead.ApplicationDate = DateTime.Now;
     lead.BankAccountNumber = "0978897";
     lead.BankSortcode = "234423";
     lead.Country = "UK";
     lead.County = "London";
     lead.DebitCardType = "Visa";
     lead.DirectDeposit = true;
     lead.Dob = DateTime.Now.AddYears(-35).Date;
     lead.EmailAddress = "*****@*****.**";
     lead.EmployersName = "Sony";
     lead.EmploymentStatus = "Full Time";
     lead.Forename = "Joe";
     lead.Surname = "Blogs";
     lead.Gender = "Male";
     lead.HomePhone = "02766676767";
     lead.MobilePhone = "07533383678";
     lead.HomeStatus = "Owner";
     lead.IncomeFrequency = "Monthly";
     lead.IpAddress = "10.123.123.2222";
     lead.LoanAmount = 250;
     lead.MonthlyIncome = 1000;
     lead.MonthsAtAddress = 12;
     lead.MonthsAtEmployer = 11;
     lead.PaybackDate = DateTime.Now.AddMonths(1);
     lead.Postcode = "NW1 0SU";
     lead.Source = "myWebsiteNumber2";
     lead.SubSource = "emailcampainWeek2";
     lead.Title = "Mr";
     lead.Town = "London";
     lead.WorkPhone = "02020292929292";
     lead.SellerName = "FakeSeller";
     return lead;
 }