Author: kamaljit
Date: Fri Jun 26 21:05:45 2009
New Revision: 788871
URL: http://svn.apache.org/viewvc?rev=788871&view=rev
Log:
Stonehenge-55: Trying to buy or sell anything an amount larger than 3 digits
throws an error in .Net stocktrader (Part II)
this completes the Stonehenge-55 issue opened by Chintana (Thanks Ben for the
patch!).
Modified:
incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/StockTraderWebApplicationUIModelClasses/HoldingDataUI.cs
Modified:
incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/StockTraderWebApplicationUIModelClasses/HoldingDataUI.cs
URL:
http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/StockTraderWebApplicationUIModelClasses/HoldingDataUI.cs?rev=788871&r1=788870&r2=788871&view=diff
==============================================================================
---
incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/StockTraderWebApplicationUIModelClasses/HoldingDataUI.cs
(original)
+++
incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/StockTraderWebApplicationUIModelClasses/HoldingDataUI.cs
Fri Jun 26 21:05:45 2009
@@ -52,12 +52,10 @@
//Constructor used to convert a single HoldingDataModel to a new
HoldingDataUI object
public HoldingDataUI(int holdingID, double quantity, decimal
purchasePrice, DateTime purchaseDate, string quoteID, decimal quotePrice)
+ : this(holdingID, quantity, purchasePrice,
purchaseDate.ToString(), DataFormatHelper.GetQuoteLink(quoteID), quotePrice)
{
- this._holdingID = holdingID.ToString();
- this._quantity = string.Format("{0:0,0}", quantity);
+ this._quantity = string.Format("{0:N0}", quantity);
this._purchasePrice = string.Format("{0:C}", purchasePrice);
- this._purchaseDate = purchaseDate.ToString();
- this._quoteID = DataFormatHelper.GetQuoteLink(quoteID);
this._quotePrice = string.Format("{0:C}", quotePrice);
}