SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 325 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"


Figure 10-10. Designing the price history pane
With the GridView control in place, we need a helper method to populate the GridView
with the historical price information obtained from the web service. So similarly to previous
methods on this page, create a method called GetPriceHistory as shown here:
private void GetPriceHistory(string strTicker)
{
DataTier data = new DataTier();
DataTable priceData = data.GetFullPriceHistory(strTicker, 20);
grdPriceHistory.DataSource = priceData;
grdPriceHistory.DataBind();
}
Here we just instantiate the data tier and invoke the GetFullPriceHistory web
method, passing the stock ticker and the number of days for which we would like price
history. After that, the DataSource and DataBind properties of the GridView are used to
display the data.
Creating the Charts & Analytics Pane
You are no doubt familiar with seeing price history graphs on business TV shows on CNN
or the Bloomberg channel. Figure 10-11 and Figure 10-12 show the price history charts
for companies such as Microsoft (MSFT) and Starbucks (SBUX) for the past 100 days.


Pages:
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337