示例#1
0
    private string GetBasicQuote(string strTicker)
    {
        companyInfo.CompanyInfoService service = new companyInfo.CompanyInfoService();
        companyInfo.CompanyInfoResult  result  = service.doCompanyInfo("UID", "PWD", strTicker);
        StringBuilder theHTML = new StringBuilder();

        theHTML.Append("<table width='100%' cellspacing='0' cellpadding='0' style='border-width: 0'>");
        theHTML.Append("<tr><td  width='40%'>");
        theHTML.Append("Bid ");
        theHTML.Append("</td><td  width='40%'>");
        theHTML.Append(result.bid);
        theHTML.Append("</td></tr>");

        theHTML.Append("<tr><td  width='40%'>");
        theHTML.Append("Ask ");
        theHTML.Append("</td><td  width='40%'>");
        theHTML.Append(result.ask);
        theHTML.Append("</td></tr>");

        theHTML.Append("<tr><td  width='40%'>");
        theHTML.Append("Open ");
        theHTML.Append("</td><td  width='40%'>");
        theHTML.Append(result.open);
        theHTML.Append("</td></tr>");

        theHTML.Append("<tr><td  width='40%'>");
        theHTML.Append("Year High ");
        theHTML.Append("</td><td  width='40%'>");
        theHTML.Append(result.yearHigh);
        theHTML.Append("</td></tr>");

        theHTML.Append("<tr><td  width='40%'>");
        theHTML.Append("Year Low ");
        theHTML.Append("</td><td  width='40%'>");
        theHTML.Append(result.yearLow);
        theHTML.Append("</td></tr>");

        theHTML.Append("</table>");
        return(theHTML.ToString());
    }
示例#2
0
 private void GetCompanyInfo(string strTicker)
 {
     companyInfo.CompanyInfoService service = new companyInfo.CompanyInfoService();
     companyInfo.CompanyInfoResult  result  = service.doCompanyInfo("anything", "anything", strTicker);
     lblQuote.Text = result.company + "<BR>Current Price: " + result.lastPrice + "<BR>Change: " + result.change;
 }