// .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using Trade.StockTraderWebApplicationSettings;
using Trade.StockTraderWebApplicationModelClasses;
using Trade.StockTraderWebApplicationServiceClient;
namespace Trade.Web
{
///
/// Displays Portfolio info for a user, sorted and subtotaled by stock symbol. This is extra functionality
/// not implemented by IBM in Trade 6.1. Note the WPF StockTrader.exe smart client app allows this as well,
/// although a bit hidden: in the smart client/Windows app, click the sort field for a stock symbol on the Portfolio tab.
///
public partial class PortfolioBySymbol : System.Web.UI.Page
{
public TotalHoldingsUI totalHoldings;
protected void Page_Load(object sender, EventArgs e)
{
Date.Text = DateTime.Now.ToString("f");
BSLClient businessServicesClient = new BSLClient();
string userid = HttpContext.Current.User.Identity.Name;
totalHoldings = businessServicesClient.getHoldingsBySymbolSubTotaled(userid);
// List holdingList = totalHoldings.holdings;
numOfUniqueStocks.Text = totalHoldings.uniqueStockCount.ToString();
PortfolioBySymbolRepeater.DataSource = totalHoldings.holdings;
PortfolioBySymbolRepeater.DataBind();
}
}
}