// .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications using System; using System.Collections.Generic; using System.Text; using Trade.StockTraderWebApplicationSettings; namespace Trade.StockTraderWebApplicationModelClasses { /// /// Model class for displaying special/augmented order data in a web page. /// public sealed class TotalOrdersUI { private List _orders; private decimal _subtotalSell; private decimal _subtotalBuy; private decimal _txnFeesSubtotal; public TotalOrdersUI() { } public TotalOrdersUI(Listorders, decimal subtotalSell,decimal subtotalBuy, decimal txnFeesSubtotal) { _orders = orders; _subtotalSell = subtotalSell; _subtotalBuy = subtotalBuy; _txnFeesSubtotal = txnFeesSubtotal; } public List orders { get { return _orders; } } public decimal subtotalSell { get { return _subtotalSell; } } public decimal subtotalBuy { get { return _subtotalBuy; } } public decimal txnFeesSubtotal { get { return _txnFeesSubtotal; } } public string netImpactCashBalance { get { if ((this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal) > 0) return String.Format("
{0:C}" + Settings.UPARROWLINK, (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal)); else if ((this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal) < 0) return String.Format("
{0:C}" + Settings.DOWNARROWLINK, (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal)); else return String.Format("{0:C}", (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal)); } } } }