예제 #1
0
        private Xrae.GetUnderwritingResult GetUWInfo()
        {
            //    Xrae.UnderwritingProfile profile = GetProfile();
            Xrae.UnderwritingProfile profile = null;
            ////create xrae api client proxy instance
            var proxy = new Xrae.XraeDirectApiClient();

            ////call api operation – first parameter is account key
            Xrae.GetUnderwritingResult resultUW = proxy.GetQuickUnderwriting("C53EBC72", profile);

            return(resultUW);
        }
예제 #2
0
        protected void btnFindUW_Click(object sender, EventArgs e)
        {
            List <string> carrierList = new List <string>();

            Xrae.GetUnderwritingResult result = this.GetUWInfo();
            if (result.HasResults)
            {
                Session["UWresults"]         = result;
                this.divOptions.Visible      = false;
                this.divQuoteResults.Visible = true;
                var lista = result.UnderwritingResults;
                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 cellName = new HtmlTableCell();
                    cellName.InnerText = lista[i].DisplayName;
                    row.Cells.Add(cellName);
                    //HtmlTableCell cellPrice = new HtmlTableCell();
                    //cellPrice.InnerText = result.PricingResults[i].TermYears;
                    //row.Cells.Add(cellPrice);

                    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);
                    carrierList.Add(lista[i].CarrierCode);
                }
                Session["carrierList"] = carrierList.ToArray();
            }
            else
            {
                lblResult.Text = "No quotes found";
            }
        }