private void FindQuotes() { lblResult.Text = ""; Xrae.GetTermPricingResult result = RequestQuotesFromApi(); if (result.HasResults) { this.divOptions.Visible = false; this.divQuoteResults.Visible = true; var lista = result.PricingResults; for (int i = 0; i < lista.Length; i++) { HtmlTableRow row = new HtmlTableRow(); HtmlTableCell tdImageCell = new HtmlTableCell(); Image imageProduct = new Image(); // imageProduct.ID = "id"; string imgurl = "https://lite.xrae.com/Images/Carriers/" + lista[i].CarrierCode + ".png"; imageProduct.ImageUrl = imgurl; tdImageCell.Controls.Add(imageProduct); row.Cells.Add(tdImageCell); HtmlTableCell blankCell = new HtmlTableCell(); blankCell.InnerText = " "; row.Cells.Add(blankCell); HtmlTableCell cellName = new HtmlTableCell(); cellName.InnerText = " " + lista[i].ProductName + " "; row.Cells.Add(cellName); HtmlTableCell cellProd = new HtmlTableCell(); cellProd.InnerText = " " + lista[i].ClassName + " "; row.Cells.Add(cellProd); row.Cells.Add(blankCell); HtmlTableCell cellPrice = new HtmlTableCell(); cellPrice.InnerText = " $" + lista[i].ModalAnnual + " Annual "; row.Cells.Add(cellPrice); row.Cells.Add(blankCell); //HtmlTableCell cellLink = new HtmlTableCell(); //HyperLink hl = new HyperLink() //{ // Text = "Advisor Underwriting Guide", // NavigateUrl = "https://guides.xrae.com/" + lista[i].CarrierCode + ".pdf", // CssClass = "thickbox", // ToolTip = "" //}; //cellLink.Controls.Add(hl); //row.Cells.Add(cellLink); this.tblResultsQuotes.Rows.Add(row); } } else { lblResult.Text = "No quotes found"; } }
private void FixedProfileQuotes() { Xrae.GetTermPricingResult result = new Xrae.GetTermPricingResult(); var profile = new Xrae.UnderwritingProfile { DateOfBirth = new Xrae.DateLongType { Month = 9, Day = 19, Year = 1969 }, Gender = Xrae.Gender.Male, TobaccoUse = new Xrae.TobaccoProfile { EverUse = false }, PolicyDetails = new Xrae.PolicyProfile { FaceAmount = 500000, ProductType = Xrae.ProductType.Term }, MedicalConditions = new Xrae.MedicalProfile { DiabetesType1 = new Xrae.DiabetesType1Profile { } }, FamilyHistory = new Xrae.FamilyProfile { FatherConditionHistory = new Xrae.FatherProfile { } } }; var request = new Xrae.GetTermPricingRequest { AccountKey = "C53EBC72", // StateOfIssue = Xrae.StateAbbreviation.AL, SubjectProfile = profile, }; var proxy = new Xrae.XraeDirectApiClient(); result = proxy.GetQuickTermPricing(request); //var result2 = proxy.GetQuickUnderwritingUI("C53EBC72", profile); var message = "Got quotes"; if (result.HasResults) { message = "have quotes"; } }