incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drew...@apache.org
Subject svn commit: r728078 [6/9] - in /incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution: ./ BasicClient/ BasicClient/Properties/ BusinessServiceConfigurationSettings/ BusinessServiceConfigurationSettings/Properties/ Busine...
Date Fri, 19 Dec 2008 17:43:32 GMT
Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/OrderDataUI.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/OrderDataUI.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/OrderDataUI.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/OrderDataUI.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,130 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Collections;
+using Trade.StockTraderWebApplicationSettings;
+
+namespace Trade.StockTraderWebApplicationModelClasses
+{
+    /// <summary>
+    /// Model class for displaying order data in a web page.
+    /// </summary>
+    public sealed class OrderDataUI
+	{
+        private int _orderID;
+        private string _orderType;
+        private string _orderStatus;
+        private DateTime _openDate;
+        private string _completionDate;
+        private double _quantity;
+        private decimal _price;
+        private decimal _orderFee;
+        private string _symbol;
+
+        public OrderDataUI()
+        {
+        }
+
+        public OrderDataUI(int orderID, string orderType, string orderStatus, DateTime openDate, string completionDate, double quantity, decimal price, decimal orderFee, string symbol)
+        {
+            this._orderID = orderID;
+            this._orderType = orderType;
+            this._orderStatus = orderStatus;
+            this._openDate = openDate;
+            this._completionDate = completionDate;
+            this._quantity = quantity;
+            this._price = price;
+            this._orderFee = orderFee;
+            this._symbol = symbol;
+        }
+
+     	public int orderID
+		{
+			get
+			{
+				return _orderID;
+			}
+		}
+        
+        public string orderType
+		{
+			get
+			{
+				return _orderType;
+			}
+		}
+
+ 		public string orderStatus
+		{
+			get
+			{
+				return _orderStatus;
+			}
+		}
+
+ 		public DateTime openDate
+		{
+			get
+			{
+				return _openDate;
+			}
+			
+		}
+
+        public string completionDate
+		{
+			get
+			{
+				return _completionDate;
+			}
+		}
+
+ 		public double quantity
+		{
+			get
+			{
+				return _quantity;
+			}
+		}
+
+ 		public decimal price
+		{
+			get
+			{
+				return _price;
+			}
+		}
+
+ 		public decimal orderFee
+		{
+			get
+			{
+				return _orderFee;
+			}
+		}
+
+        public decimal total
+        {
+            get
+            {
+                return Convert.ToDecimal(this._quantity)*this._price + this._orderFee;
+            }
+        }
+
+ 		public string symbol
+		{
+			get
+			{
+				return _symbol;
+			}
+		}
+
+        public string quoteLink
+        {
+            get
+            {
+                return "<a href=\"" + Settings.PAGE_QUOTES + "?symbols=" + _symbol + "\">" + _symbol + "</a>";
+            }
+        }
+	}
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/Properties/AssemblyInfo.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/Properties/AssemblyInfo.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/Properties/AssemblyInfo.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Trade.StockTraderWebApplicationModelClasses")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct(".NET StockTrader")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c80cdb46-70fd-4fc7-9a1e-86116cd44567")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("2.0.2.0")]
+[assembly: AssemblyFileVersion("2.0.2.0")]

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/QuoteDataUI.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/QuoteDataUI.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/QuoteDataUI.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/QuoteDataUI.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,179 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Collections;
+using Trade.StockTraderWebApplicationSettings;
+
+namespace Trade.StockTraderWebApplicationModelClasses
+{
+    /// <summary>
+    /// Model class for displaying quote data in a web page.
+    /// </summary>
+    public sealed class QuoteDataUI
+    {
+        private string _symbol;
+        private string _companyName;
+        private double _volume;
+        private decimal _price;
+        private decimal _open;
+        private decimal _low;
+        private decimal _high;
+        private double _change;
+        
+        public QuoteDataUI()
+        {
+        }
+
+        public QuoteDataUI(string symbol, string companyName, double volume, decimal price, decimal open, decimal low, decimal high, double change)
+        {
+            this._symbol = symbol;
+            this._companyName = companyName;
+            this._volume = volume;
+            this._price = price;
+            this._open = open;
+            this._low = low;
+            this._high = high;
+            this._change = change;
+        }
+
+        public string symbol
+        {
+            get
+            {
+                return _symbol;
+            }
+
+            set
+            {
+                this._symbol = value;
+            }
+        }
+
+        public string companyName
+        {
+            get
+            {
+                return _companyName;
+            }
+
+            set
+            {
+                this._companyName = value;
+            }
+        }
+
+        public decimal price
+        {
+            get
+            {
+                return _price;
+            }
+
+            set
+            {
+                this._price = value;
+            }
+        }
+
+        public decimal open
+        {
+            get
+            {
+                return _open;
+            }
+
+            set
+            {
+                this._open = value;
+            }
+        }
+
+        public decimal low
+        {
+            get
+            {
+                return _low;
+            }
+
+            set
+            {
+                this._low = value;
+            }
+        }
+
+        public decimal high
+        {
+            get
+            {
+                return _high;
+            }
+
+            set
+            {
+                this._high = value;
+            }
+        }
+
+        public double change
+        {
+            get
+            {
+                return _change;
+            }
+
+            set
+            {
+                this._change = value;
+            }
+        }
+
+        public double volume
+        {
+            get
+            {
+                return _volume;
+            }
+
+            set
+            {
+                this._volume = value;
+            }
+        }
+
+        public string quoteLink
+        {
+            get
+            {
+                return "<a href=\""+ Settings.PAGE_QUOTES + "?symbols=" + _symbol + "\">" + _symbol + "</a>";
+            }
+        }
+
+        public string gainWithArrow
+        {
+            get
+            {
+                if (this._change > 0)
+                    return string.Format("<div id=\"Gain\" style=\"color:green" + "\">{0:C}"+Settings.UPARROWLINK+"</div>", this._change);
+                else if (this._change < 0)
+                    return string.Format("<div id=\"Gain\" style=\"color:#990000" + "\">{0:C}" + Settings.DOWNARROWLINK + "</div>", this._change);
+                else
+                    return
+                        string.Format("{0:C}", this._change);
+            }
+        }
+
+        public string priceWithArrow
+        {
+            get
+            {
+                if (this._change > 0)
+                    return string.Format("<span id=\"Gain\" style=\"color:green" + "\">{0:C}" + Settings.UPARROWLINK + "</span>", this._price);
+                else
+                    if (this._change < 0)
+                        return string.Format("<span id=\"Gain\" style=\"color:#990000" + "\">{0:C}" + Settings.DOWNARROWLINK + "</span>", this._price);
+                    else
+                        return string.Format("{0:C}", this._price);                         
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/StockTraderWebApplicationModelClasses.csproj
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/StockTraderWebApplicationModelClasses.csproj?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/StockTraderWebApplicationModelClasses.csproj (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/StockTraderWebApplicationModelClasses.csproj Fri Dec 19 09:43:28 2008
@@ -0,0 +1,132 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{97F8A696-9918-4DC4-8D6E-9E574B9A4059}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Trade.StockTraderWebApplicationModelClasses</RootNamespace>
+    <AssemblyName>Trade.StockTraderWebApplicationModelClasses</AssemblyName>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>stocktrader.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <SccProjectName>
+    </SccProjectName>
+    <SccLocalPath>
+    </SccLocalPath>
+    <SccAuxPath>
+    </SccAuxPath>
+    <SccProvider>
+    </SccProvider>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.Runtime.Serialization.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.ServiceModel.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CustomerDataUI.cs" />
+    <Compile Include="CustomerProfileDataUI.cs" />
+    <Compile Include="HoldingDataUI.cs" />
+    <Compile Include="MarketSummaryDataUI.cs" />
+    <Compile Include="OrderDataUI.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="QuoteDataUI.cs" />
+    <Compile Include="TotalHoldingsUI.cs" />
+    <Compile Include="TotalOrdersUI.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\ServiceConfigurationSettings\StockTraderWebApplicationSettings.csproj">
+      <Project>{D8E1ECD5-2D86-4994-A37B-BF4D24334A2E}</Project>
+      <Name>StockTraderWebApplicationSettings</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="stocktrader.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>copy "$(TargetPath)" ..\..\..\..\SharedLibraries
+copy "$(TargetDir)$(TargetName).pdb" ..\..\..\..\SharedLibraries</PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalHoldingsUI.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalHoldingsUI.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalHoldingsUI.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalHoldingsUI.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,121 @@
+//  .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
+{
+    /// <summary>
+    /// Model class for displaying special/augmented holding data in a web page.
+    /// </summary>
+    public sealed class TotalHoldingsUI
+    {
+        private List<HoldingDataUI> _holdings;
+        private decimal _gain;
+        private decimal _marketValue;
+        private decimal _basis;
+        private int _uniqueStockCount;
+        private int _totalHoldingsCount;
+
+        public TotalHoldingsUI()
+        {
+        }
+
+        public TotalHoldingsUI(List<HoldingDataUI>holdings, decimal marketValue, decimal basis, decimal gain)
+        {
+            this._holdings = holdings;
+            this._gain = gain;
+            this._marketValue = marketValue;
+            this._basis = basis;
+        }
+
+        public TotalHoldingsUI(List<HoldingDataUI> holdings, decimal marketValue, decimal basis, decimal gain, int uniqueStockCount, int totalHoldingsCount)
+        {
+            this._holdings = holdings;
+            this._gain = gain;
+            this._marketValue = marketValue;
+            this._basis = basis;
+            this._uniqueStockCount = uniqueStockCount;
+            this._totalHoldingsCount = totalHoldingsCount;
+        }
+
+        public List<HoldingDataUI> holdings
+        {
+            get
+            {
+                return _holdings;
+            }
+        }
+
+        public decimal marketValue
+        {
+            get
+            {
+                return _marketValue;
+            }
+        }
+
+        public decimal gain
+        {
+            get
+            {
+                return _gain;
+            }
+        }
+
+        public decimal basis
+        {
+            get
+            {
+                return _basis;
+            }
+
+            set
+            {
+                this._basis = value;
+            }
+        }
+
+        public int uniqueStockCount
+        {
+            get
+            {
+                return _uniqueStockCount;
+            }
+
+            set
+            {
+                this._uniqueStockCount = value;
+            }
+        }
+
+        public int totalHoldingsCount
+        {
+            get
+            {
+                return _totalHoldingsCount;
+            }
+
+            set
+            {
+                this._totalHoldingsCount = value;
+            }
+        }
+        
+        public string gainWithArrow
+        {
+            get
+            {
+                if (this._gain > 0)
+                    return string.Format("<div style=\"color:green\">{0:C}" + Settings.UPARROWLINK + "</div>", this._gain);
+                else 
+                    if (this._gain <0) 
+                        return string.Format("<div style=\"color:#990000\">{0:C}" + Settings.DOWNARROWLINK + "</div>", this._gain);
+                    else
+                        return string.Format("{0:C}", this._gain);
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalOrdersUI.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalOrdersUI.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalOrdersUI.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/TotalOrdersUI.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,79 @@
+//  .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
+{
+    /// <summary>
+    /// Model class for displaying special/augmented order data in a web page.
+    /// </summary>
+    public sealed class TotalOrdersUI
+    {
+        private List<OrderDataUI> _orders;
+        private decimal _subtotalSell;
+        private decimal _subtotalBuy;
+        private decimal _txnFeesSubtotal;
+        
+        public TotalOrdersUI()
+        {
+
+        }
+
+        public TotalOrdersUI(List<OrderDataUI>orders, decimal subtotalSell,decimal subtotalBuy, decimal txnFeesSubtotal)
+        {
+            _orders = orders;
+            _subtotalSell = subtotalSell;
+            _subtotalBuy = subtotalBuy;
+            _txnFeesSubtotal = txnFeesSubtotal;            
+        }
+
+        public List<OrderDataUI> 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("<div style=\"color:green;\">{0:C}" + Settings.UPARROWLINK, (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal));
+                else
+                    if ((this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal) < 0)
+                        return String.Format("<div style=\"color:#990000;\">{0:C}" + Settings.DOWNARROWLINK, (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal));
+                    else
+                        return String.Format("{0:C}", (this._subtotalSell - this._subtotalBuy - this._txnFeesSubtotal));
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/stocktrader.snk
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/stocktrader.snk?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/StockTraderWebApplicationUIModelClasses/stocktrader.snk
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,219 @@
+<%@ Register TagPrefix="controls" TagName="AccountOrders" Src = "Controls/AccountOrders.ascx"  %>
+<%@ Register TagPrefix="controls" TagName="ClosedOrders" Src = "Controls/ClosedOrders.ascx"  %>
+<%@ Page Language="C#" AutoEventWireup="false" EnableViewState="false" EnableEventValidation="false" CodeFile="Account.aspx.cs" Inherits="Trade.Web.Account" %>
+<%@Import Namespace="Trade.StockTraderWebApplicationModelClasses" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css"/>
+<title>.NET StockTrader Account Information</title>
+<link rel="stylesheet" href="StockTrader.css" type="text/css" />
+</head>
+<body class="StockTraderBodyStyle">
+<!--------------------------Begin Main Web Form Declaration--------------------------------->
+<div>
+<form runat="server" id="AccountForm" style="margin:0;">  
+<!-------------------------Begin Global Header + Order Alert Control------------------------>
+<controls:ClosedOrders id="ClosedOrdersControl" runat="server" ></controls:ClosedOrders>
+<!--------------------------End Global Header Table Declaration ---------------------------->
+<!-------------------- -----Start Portfolio Page-Specific Processing------------------------>
+<table class="TradeHomeTableStyle" style="padding-left:4px;padding-right:4px">
+    <tr>
+    <td colspan="2"> <br /></td>
+</tr>
+    <tr>
+        <td>
+        <table class="SubHeaderTableStyle">
+        <tr>
+            <th class="SubHeaderStyle">Account Information</th>
+            <th class="TodaysDateStyle"><asp:Label ID="Date" runat="server"></asp:Label></th>
+        </tr>
+    </table>
+        </td>
+    </tr>
+    <tr>
+    <td style="text-align:center"><br /><br />
+    <table class="OrderAlertTableStyle">
+    <tr>
+        <td colspan="15"><br /><br />
+            <asp:Label ID="WASLimit" runat="server"></asp:Label></td>
+    </tr>
+    <tr>
+        <td class="AccountSubHeadStyle" style="text-align:left">Total Orders Shown:<b><asp:Label
+            ID="NumOrdersShown" runat="server" Text="numOrders"></asp:Label></b></td>
+            <td colspan="10" style="text-align:center;padding-bottom:24px"> 
+        <table style="border-collapse:collapse">
+        <tr>
+            <th class="InnerHeading2" style="text-align:center">Subtotal Buys</th>
+            <th class="InnerHeading2" style="text-align:center">Subtotal Sells</th>
+            <th class="InnerHeading2" style="text-align:center">Subtotal Fees</th>
+            <th class="InnerHeading2" style="text-align:center">Net Impact Cash Balance</th>
+        </tr>
+        <tr>
+            <td class="InnerData" style="text-align:right"><%=string.Format("{0:C}", AccountOrdersControl.orderData.subtotalBuy)%></td>
+            <td class="InnerData" style="text-align:right"><%=string.Format("{0:C}", AccountOrdersControl.orderData.subtotalSell)%></td>
+            <td class="InnerData" style="text-align:right"><%=string.Format("{0:C}", AccountOrdersControl.orderData.txnFeesSubtotal)%></td>
+            <td class="InnerData" style="text-align:right"><%=AccountOrdersControl.orderData.netImpactCashBalance%></td>
+        </tr>
+        </table>
+        </td>
+        <td class="AccountSubHeadStyle" style="text-align:right"><asp:Label ID="orderLink" runat="server"></asp:Label>
+       </td>
+    </tr>
+    </table>
+    </td>
+    </tr>
+    <tr>
+<!-------------------------------------Get Orders Control ---------------------------------->    
+    <td style="text-align:center"><controls:AccountOrders id="AccountOrdersControl" runat="server" ></controls:AccountOrders></td>
+<!-------------------------------------Get Orders Control ---------------------------------->    
+    </tr>
+    <tr>
+    <td style="text-align:center;">
+    <br /><br />
+    <table class="AccountTableStyle">
+    <tr >
+    <td colspan="4" style="height:20px;padding-top:5px"><b><asp:Label ID="UpdateMessage" runat="server" Text="Update Account Profile: " ForeColor="#003f5f"></asp:Label></b>
+    <br />
+    <hr style="vertical-align:top"/>
+    </td>
+    </tr>
+    <tr>
+    <td>
+        <table style="width:600px">
+            <tr>
+                <td style="text-align:right">Full Name:</td>
+                <td style="text-align:left"><asp:TextBox ID="FullName" runat="server" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+                 <td style="text-align:right">Email Address:</td>
+                <td style="text-align:left"><asp:TextBox ID="Email" runat="server" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+            </tr>
+            <tr>
+                <td style="text-align:right">Address:</td>
+                <td style="text-align:left"><asp:TextBox ID="Address" runat="server" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+                <td style="text-align:right">Password:</td>
+                <td style="text-align:left"><asp:TextBox ID="Password" runat="server" TextMode="Password" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+            </tr>
+            <tr>
+                <td style="text-align:right">Credit Card:</td>
+                <td style="text-align:left"><asp:TextBox ID="CreditCard" runat="server" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+                <td style="text-align:right">Confirm Password:</td>
+                <td style="text-align:left"><asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" MaxLength="100" BackColor="#EBEBEB" BorderColor="#d4d8db"></asp:TextBox></td>
+            </tr>
+         </table>
+     </td>
+    </tr>
+    <tr>
+    <td colspan="4" style="text-align:center"><div class="LinkButtonStyle" style="padding-left:19px"><asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CssClass="Button">Update</asp:LinkButton></div>
+    <br />
+        <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List"
+            ValidationGroup="AccountEntry" />
+    </td>
+    </tr>
+    <tr>
+    <td>
+        <table style="width:710px; border-collapse:collapse;">
+            <tr>
+                <td class="AccountDataHeaderStyle1">
+                <a href="Glossary.aspx">Account ID:</a></td>
+                <td class="AccountDataLabelStyle1">
+                <asp:Label ID="AccountID" runat="server"></asp:Label></td>
+                <td class="AccountDataHeaderStyle2">
+                <a href="Glossary.aspx">Account Created:</a></td>
+                <td class="AccountDataLabelStyle2">
+                <asp:Label ID="CreationDate" runat="server"></asp:Label></td>
+            </tr>
+            <tr>
+                <td class="AccountDataHeaderStyle1">
+                <a href="Glossary.aspx">User ID:</a></td>
+                <td class="AccountDataLabelStyle1">
+                <asp:Label id="Name" runat="server"></asp:Label></td>
+                <td class="AccountDataHeaderStyle2">
+                <a href="Glossary.aspx">Last Login:</a></td>
+                <td class="AccountDataLabelStyle2">
+                <asp:Label ID="LastLogin" runat="server"></asp:Label></td>
+            </tr>
+            <tr>
+                <td class="AccountDataHeaderStyle1">
+                <a href="Glossary.aspx">Opening Balance:</a></td>
+                <td class="AccountDataLabelStyle1">
+                <asp:Label ID="OpenBalance" runat="server"></asp:Label></td> 
+                <td class="AccountDataHeaderStyle2">
+                <a href="Glossary.aspx">Total Logins:</a></td>
+                <td class="AccountDataLabelStyle2">
+                <asp:Label ID="LoginCount" runat="server"></asp:Label></td>                            
+            </tr>
+            <tr>
+                <td class="AccountDataHeaderStyle1">
+                <a href="Glossary.aspx">Cash Balance:</a></td>
+                <td class="AccountDataLabelStyle1">
+                <asp:Label ID="Balance" runat="server"></asp:Label></td>
+                <td class="AccountDataHeaderStyle2">
+                <a href="Glossary.aspx">Total Logouts:</a></td>
+                <td class="AccountDataLabelStyle2">
+                <asp:Label id="TotalLogout" runat="server"></asp:Label></td>
+            </tr>
+            </table>
+            </td>
+            </tr>
+        </table>
+    </td>
+    </tr>
+    <tr>
+    <td>
+        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Email"
+            Display="None" ErrorMessage="Please Enter an Email" ValidationGroup="AccountEntry"></asp:RequiredFieldValidator>
+        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="CreditCard"
+            Display="None" ErrorMessage="Please Enter a Credit Card" ValidationGroup="AccountEntry"></asp:RequiredFieldValidator>
+        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Address"
+            Display="None" ErrorMessage="Please Enter an Address" ValidationGroup="AccountEntry"></asp:RequiredFieldValidator>
+        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="FullName"
+            Display="None" ErrorMessage="Please Enter a Name" ValidationGroup="AccountEntry"></asp:RequiredFieldValidator>
+        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="Password"
+            Display="None" ErrorMessage="Please Enter a Password" ValidationGroup="AccountEntry"></asp:RequiredFieldValidator>
+        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="Password"
+            ControlToValidate="ConfirmPassword" Display="None" ErrorMessage="Passwords Do Not Match!"
+            ValidationGroup="AccountEntry"></asp:CompareValidator><br />
+    </td>
+    </tr>
+<!-------------------------------Start Get Quote Input Form/Footer-------------------------->
+<tr>
+<td>
+<table class="GetQuotesTableStyle">
+<tr>
+<td colspan="3"> <hr style="vertical-align:bottom"/></td>
+</tr>
+ <tr><td style="text-align:center;" >
+ <table style="width:600">
+    <tr>
+        <td style="width:100px;height:30px;text-align:right">
+            <asp:TextBox ID="symbols" BackColor="#EBEBEB"    runat="server" Text="s:0;s:1;s:2;s:3"></asp:TextBox>
+        </td>
+        <td style="padding-left:6px;padding-bottom:4px;"><div class="LinkButtonQuoteStyle">
+            <asp:LinkButton ID="LinkButtonQuote" runat="server" CssClass="Button" PostBackUrl="~/Quotes.aspx">Get Quote</asp:LinkButton></div>
+        </td>
+    </tr>
+  </table>          
+</td></tr>
+</table>
+</td>
+</tr>
+</table>
+</form>
+</div>
+<!-------------------------------Start StockTrader Footer----------------------------------->
+<table class="FooterTableStyle">
+    <tr>
+            <td class="FooterLeftStyle">
+            Apache Stonehenge Incubator Project</td>
+            <td class="FooterRightStyle">
+            .NET StockTrader</td>
+    </tr>
+    <tr>
+            <td colspan="2" class="FooterCopyRightStyle"><br />
+            Created with Visual Studio and the Microsoft .NET Framework 3.5 
+            </td>
+    </tr>
+</table> 
+</table>         
+</body>
+</html>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Account.aspx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,82 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Trade.StockTraderWebApplicationSettings;
+using Trade.StockTraderWebApplicationModelClasses;
+using Trade.StockTraderWebApplicationServiceClient;
+using Trade.Utility;
+
+namespace Trade.Web
+{
+    /// <summary>
+    /// Displays the Account Summary information by querying Business Services.
+    /// </summary>
+    public partial class Account : System.Web.UI.Page
+    {
+        BSLClient businessServicesClient = new BSLClient();
+        //
+        protected override void OnPreRender(EventArgs e)
+        {
+            Date.Text = DateTime.Now.ToString("f");
+            string action = Input.InputText(Request["action"],20);
+            if (action =="showtoporders" && Settings.interfaceMode == StockTraderUtility.ACCESS_WebService_WSHttp_WSO2)
+            {
+               NumOrdersShown.Text = AccountOrdersControl.totalOrders.ToString() ;
+                WASLimit.Text = "<div style=\"font-size:8pt;color:darkred\">WebSphere Trade 6.1 Returns a Maximum of 5 Orders!</div>";
+            }
+            else
+                NumOrdersShown.Text = AccountOrdersControl.totalOrders.ToString();
+            string userid = HttpContext.Current.User.Identity.Name;
+            if (AccountOrdersControl.ordersRequested==Settings.MAX_DISPLAY_ORDERS)
+                    orderLink.Text = "<a href=\"Account.aspx?action=showtoporders\">Show Top <b> " + Settings.MAX_DISPLAY_TOP_ORDERS.ToString() + "</b> Orders</a>";
+            else
+                    orderLink.Text = "<a href=\"Account.aspx\">Show Top <b>" + Settings.MAX_DISPLAY_ORDERS.ToString() + "</b> Orders </a>";
+            AccountDataUI customer = null;
+            AccountProfileDataUI customerprofile = businessServicesClient.getAccountProfileData(userid);
+            if (IsPostBack)
+            {
+                submitData(customerprofile);
+            }
+            else
+                UpdateMessage.Text = UpdateMessage.Text + customerprofile.userID;
+            customer = businessServicesClient.getAccountData(userid);
+            Name.Text = customer.profileID;
+            AccountID.Text = customer.accountID.ToString();
+            CreationDate.Text = customer.creationDate.ToString("f");
+            LoginCount.Text = customer.loginCount.ToString();
+            OpenBalance.Text = string.Format("{0:C}", customer.openBalance);
+            if (customer.balance > 0)
+                Balance.ForeColor = System.Drawing.Color.Green;
+            else
+                Balance.ForeColor = System.Drawing.Color.Red;
+            Balance.Text = string.Format("{0:C}", customer.balance);
+            TotalLogout.Text = customer.logoutCount.ToString();
+            LastLogin.Text = customer.lastLogin.ToString("f");
+            Password.Attributes.Add("value", customerprofile.password);
+            ConfirmPassword.Attributes.Add("value", customerprofile.password);
+            Email.Text = customerprofile.email;
+            FullName.Text = customerprofile.fullName;
+            Address.Text = customerprofile.address;
+            CreditCard.Text = customerprofile.creditCard;
+        }
+        
+        private void submitData(AccountProfileDataUI customerprofile)
+        {
+            Page.Validate();
+            if (Page.IsValid)
+            {
+                customerprofile.address = Input.InputText(Address.Text, StockTraderUtility.ADDRESS_MAX_LENGTH);
+                customerprofile.creditCard = Input.InputText(CreditCard.Text, StockTraderUtility.CREDITCARD_MAX_LENGTH);
+                customerprofile.email = Input.InputText(Email.Text, StockTraderUtility.EMAIL_MAX_LENGTH);
+                customerprofile.fullName = Input.InputText(FullName.Text, StockTraderUtility.FULLNAME_MAX_LENGTH);
+                customerprofile.password = Input.InputText(Password.Text, StockTraderUtility.PASSWORD_MAX_LENGTH);
+                businessServicesClient.updateAccountProfile(customerprofile);
+                UpdateMessage.Text = "Account Updated";
+            }
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Code/Input.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Code/Input.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Code/Input.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Code/Input.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,28 @@
+using System;
+
+    /// <summary>
+    /// This class trims input characters from a string, based on specified length.  Helps to prevent
+    /// buffer overrun attacks.  Could be augmented with strip-out of script-injection attack characters, 
+    /// although ASP.NET automatically does this for common special characters.
+    /// </summary>
+    public static class Input
+    {
+        /// <summary>
+        /// This method trims input characters from a string, based on specified length.</summary>
+        /// <param name="inputString">String to clean.</param> 
+        /// <param name="maxLength">Cut off length to return.</param> 
+        public static string InputText(string inputString, int maxLength)
+        {
+            // check incoming parameters for null or blank string
+            if ((inputString != null) && (inputString != String.Empty))
+            {
+                inputString = inputString.Trim();
+
+                //chop the string incase the client-side max length
+                //fields are bypassed to prevent buffer over-runs
+                if (inputString.Length > maxLength)
+                    inputString = inputString.Substring(0, maxLength);
+            }
+            return inputString;
+        }
+    }

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/ASPNETDB.MDF
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/ASPNETDB.MDF?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/ASPNETDB.MDF
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/aspnetdb_log.ldf
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/aspnetdb_log.ldf?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/App_Data/aspnetdb_log.ldf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALFactory.dll.refresh
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALFactory.dll.refresh?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALFactory.dll.refresh
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALSQLServer.dll.refresh
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALSQLServer.dll.refresh?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.DALSQLServer.dll.refresh
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.IDAL.dll.refresh
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.IDAL.dll.refresh?rev=728078&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Bin/Trade.IDAL.dll.refresh
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,57 @@
+<%@ Control Language="C#" AutoEventWireup="true"  CodeFile="AccountOrders.ascx.cs" Inherits="Trade.Web.AccountOrders" %>
+<!--------------------------Start Order Alert ASP.NET User Control ----------------------------> 
+<asp:Repeater id="AccountOrdersRepeater" runat="server">
+          <HeaderTemplate>
+             <table class="OrderAlertTableStyle">
+            <tr>
+                <th class="InnerHeading">
+                Order ID</th>
+                <th class="InnerHeading">
+                Order Status</th>
+                <th class="InnerHeading">
+                Creation Date</th>
+                <th class="InnerHeading">
+                Completion Date</th>
+               <th class="InnerHeading">
+                Txn Fee</th>
+               <th class="InnerHeading">
+                Type</th>
+                <th class="InnerHeading">
+                Symbol</th>
+                <th class="InnerHeading">
+                Quantity</th>
+                <th class="InnerHeading">
+                Price</th>
+                <th class="InnerHeading">
+                Total</th>
+            </tr>       
+          </HeaderTemplate>
+          <ItemTemplate>
+            <tr>
+                <td class="InnerData">
+                <%# Eval("orderID")%> </td>
+                <td class="InnerData">
+                <%# Eval("orderStatus") %></td>
+                <td class="InnerData">
+                <%# Eval("openDate") %></td>
+                <td class="InnerData">
+                <%# Eval("completionDate") %> </td>
+                 <td class="InnerData" style="text-align:right">
+                <%# Eval("orderFee", "{0:C}")%></td>
+                <td class="InnerData">
+                <%# Eval("orderType")%></td>
+                <td class="InnerData">
+                <%# Eval("quoteLink")%></td>
+                <td class="InnerData" style="text-align:right">
+                <%# Eval("quantity","{0:0,0}")%></td>
+                 <td class="InnerData" style="text-align:right">
+                <%# Eval("price","{0:C}")%></td>
+                 <td class="InnerData" style="text-align:right">
+                <%# Eval("total","{0:C}")%></td>
+           </tr>      
+         </ItemTemplate>
+         <FooterTemplate>
+       </table>   
+       </FooterTemplate>
+</asp:Repeater>
+<!------------------------------End Order Alert ASP.NET User Control------------------------>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/AccountOrders.ascx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,45 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.Security;
+using Trade.StockTraderWebApplicationSettings;
+using Trade.StockTraderWebApplicationServiceClient;
+using Trade.StockTraderWebApplicationModelClasses;
+using Trade.Utility;
+
+namespace Trade.Web
+{
+    /// <summary>
+    /// Displays orders via a repeater, used on Account.aspx page.
+    /// </summary>
+    public partial class AccountOrders : System.Web.UI.UserControl
+    {
+        public int totalOrders;
+        public int ordersRequested;
+        public TotalOrdersUI orderData;
+            
+        protected override void OnLoad(EventArgs e)
+        {
+            BSLClient businessServicesClient = new BSLClient();
+            string userid = HttpContext.Current.User.Identity.Name;
+            if (Input.InputText(Request["action"], 20) == "showtoporders" && (Settings.interfaceMode != StockTraderUtility.ACCESS_WebService_WSHttp_WSO2))
+            {
+                ordersRequested = Settings.MAX_DISPLAY_TOP_ORDERS;
+                orderData = businessServicesClient.getTopOrders(userid);
+            }
+            else
+            {
+                ordersRequested = Settings.MAX_DISPLAY_ORDERS;
+                orderData = businessServicesClient.getOrders(userid);
+            }
+            if (orderData.orders.Count != 0)
+            {
+                AccountOrdersRepeater.DataSource = orderData.orders;
+                AccountOrdersRepeater.DataBind();
+            }
+            totalOrders = orderData.orders.Count;
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,84 @@
+<%@ Control Language="C#" AutoEventWireup="true"  CodeFile="ClosedOrders.ascx.cs" Inherits="Trade.Web.ClosedOrders" %>
+<%@ Import Namespace="Trade.StockTraderWebApplicationModelClasses" %>
+<%@ Import Namespace="Trade.StockTraderWebApplicationSettings" %>
+<!--------------------------The Common Header + Order Alert ASP.NET User Control --------------> 
+<table class= "HeaderTableStyle">
+    <tr>
+		<td><img alt="" src="Images/dotnet_logo.jpg" height="63"/></td>
+        <td class="HeaderLeftStyle">.NET StockTrader
+            </td>
+        <td class="HeaderRightStyle">Apache Stonehenge Incubator Project</td>
+    </tr>
+</table>
+<table class="MenuTableStyle">
+    <tr>
+            <td class="Menu"><a href="Default.aspx">Welcome</a></td>
+            <td class="Menu"><a href="TradeHome.aspx">Home</a></td>
+            <td class="Menu"><a href="account.aspx">Account</a></td>
+            <td class="Menu"><a href="portfolio.aspx">Portfolio</a></td>
+            <td class="Menu"><a href="quotes.aspx?symbols=s:0,s:1,s:2,s:3,s:4">Quotes/Trade</a></td>
+            <td class="Menu"><a href="Glossary.aspx">Glossary</a></td>
+            <td class="Menu"><a href="logout.aspx">Login/Logout</a></td>
+            <td class="Menu"><a href="ReadMe.mht" target="_blank">Read Me</a></td>
+            -->
+    </tr>
+</table>    
+<!--------------------------End Global Header Table Declaration ---------------------------->
+<table class="TradeHomeTableStyle">
+<% if (closedOrderData!=null)
+    if (closedOrderData.Count>0)
+               {%> 
+       <tr>    
+            <td colspan="8">
+             <table class="OrderAlertTableStyle">
+             <tr >
+                <td colspan="8" class="OrderAlertMessageStyle">Trade Alert: The following orders have completed.</td>
+             </tr>
+             <tr>
+                <th class="InnerHeading">
+                Order ID</th>
+                <th class="InnerHeading">
+                Order Status</th>
+                <th class="InnerHeading">
+                Creation Date</th>
+                <th class="InnerHeading">
+                Completion Date</th>
+               <th class="InnerHeading">
+                Txn Fee</th>
+               <th class="InnerHeading">
+                Type</th>
+                <th class="InnerHeading">
+                Symbol</th>
+                <th class="InnerHeading">
+                Quantity</th>
+            </tr>     
+            
+            <%for (int i=0; i<closedOrderData.Count; i++)
+                   { %>  
+            <tr>
+                <td class="InnerData">
+                <%=closedOrderData[i].orderID%> </td>
+                <td class="InnerData">
+                <%=closedOrderData[i].orderStatus%></td>
+                <td class="InnerData">
+                <%=closedOrderData[i].openDate%></td>
+                <td class="InnerData">
+                <%=closedOrderData[i].completionDate%> </td>
+                 <td class="InnerData" style="text-align:right">
+                <%=closedOrderData[i].orderFee.ToString("C")%></td>
+                <td class="InnerData">
+                <%=closedOrderData[i].orderType%></td>
+                <td class="InnerData">
+                <%=closedOrderData[i].quoteLink%></td>
+                 <td class="InnerData" style="text-align:right">
+                <%=closedOrderData[i].quantity.ToString("N")%></td>
+            </tr>      
+            <%}%>
+            </table>
+            <br />
+            
+       </td>
+    </tr>
+  <%  } %>
+</table>    
+<!------------------------------End Order Alert Repeater Display ASP.NET User Control---------->
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/ClosedOrders.ascx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,86 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+//  Note that for ClosedOrders alert control we use in-page script to generate our repeating table rows in the HTML. 
+//  vs. using databound Repeater controls as we do in the AccountOrders (control), Portfolio (page), and MarketSummary (control).
+//  The choice of display method is up to the architect; Repeaters and GridViews have many features you do not
+//  get with in-page script; there is however a performance tradeoff; so we opted to use
+//  in-page script vs. Repeaters/Gridviews here becuase this control is embedded in every authenticated
+//  page. 
+
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.Caching;
+using System.Web.Security;
+using Trade.StockTraderWebApplicationServiceClient;
+using Trade.StockTraderWebApplicationModelClasses;
+using Trade.StockTraderWebApplicationSettings;
+
+namespace Trade.Web
+{
+    /// <summary>
+    /// Checks for closed orders, and displays alert if any. 
+    /// </summary>
+    public partial class ClosedOrders : System.Web.UI.UserControl
+    {
+        public List<OrderDataUI> closedOrderData;
+
+        protected override void OnLoad(EventArgs e)
+        {
+            //configlink.HRef = "http://" + HttpContext.Current.Server.MachineName + "/" + Settings.PAGE_PATH_CONFIG;
+            
+            //Here we are going to use an absolute expiration and the .NET object cache to enable
+            //the application to optionally not execute the order alert query on every page; rather just check every
+            //n seconds (this setting is adjustable in Web.config).  Executing the alert control 
+            //logic on every page is not the best design: users can stand to get their completion alerts after 60
+            //seconds vs. right away, plus we are going to invalidate the cache entry
+            //anyway on an order being placed, so they will only have to wait if they place the order from
+            //another browser. The reduction on database queries is substantial (and impact on perf) 
+            //simply by making this choice. They will STILL get an order alert within 60 seconds of
+            //browsing even if another program (such as the async Order Processor Service or any program) completes 
+            //the order outside of the scope of the Web application.
+
+            //Order alerts and stock market summary/mkt index are the only two places in this app that really
+            //make sense to cache.  All other data elements such as account info/balances, stock prices,
+            //holdings, orders etc. are not good candidates for caching in our opinion.  These data elements 
+            //should always reflect what is actually in the database.  This is becuase other systems besides 
+            //StockTrader would quite likely be changing this data in the real world, so invalidating the cache within StockTrader app 
+            //(ala WebSphere Trade 6.1) does more harm than good--since the middle tier is completely unaware of
+            //what other applications may have done to change the database information being cached.
+            //On the other hand, order alerts and market summaries are excellent choices for caching:
+            //data here can be safely be refreshed every 30, 60 seconds (or more) without impacting data 
+            //integrity or alarming a user with an inconsistent value. 
+
+            //The .NET cache for this control will only be used if the Web.config setting
+            //"CheckOrderAlertsOnEveryRequest" = false. For benchmark comparisons, its important this be true
+            //if measuring .NET perf against WebSphere or other product if those products are not also caching data.
+            //In our published data, we used the "true" setting so the control is executed on every
+            //requested page, and alerts come up immediately as opposed to slightly delayed.   
+            string userid = HttpContext.Current.User.Identity.Name;
+            if (userid == "")
+            {
+                HttpCookie authcookie = Request.Cookies[FormsAuthentication.FormsCookieName];
+                if (authcookie.Equals(null))
+                {
+                    FormsAuthentication.SignOut();
+                    Response.Redirect(Settings.PAGE_LOGIN);
+                }
+                FormsAuthenticationTicket ticket = (FormsAuthenticationTicket)FormsAuthentication.Decrypt(authcookie.Value);
+                userid = ticket.Name;
+            }
+            if (Settings.CHECK_ORDER_ALERT_EVERY_REQUEST || Cache[Settings.CACHE_KEY_CLOSED_ORDERSALERT + userid] == null)
+            {
+                //Either the setting in web.config is set for checking on every page, or
+                //the timeout on our cache has expired. So we must invoke our BSL layer
+                //now to check for closed orders.
+                BSLClient businessServicesClient = new BSLClient();
+                closedOrderData = businessServicesClient.getClosedOrders(userid);
+                //We are not interested in actually caching any data here: after all, users only get notified
+                //via an alert 1 time per order.  Rather, we are using the cache as a convenient way to
+                //ensure alert checks only happen based on our desired frequency.
+                if (!Settings.CHECK_ORDER_ALERT_EVERY_REQUEST)
+                    Cache.Insert(Settings.CACHE_KEY_CLOSED_ORDERSALERT + userid, userid, null, System.DateTime.UtcNow.AddSeconds(Settings.ORDER_ALERT_CHECK_FREQUENCY), System.Web.Caching.Cache.NoSlidingExpiration, System.Web.Caching.CacheItemPriority.Normal, null);
+            }
+        }
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,31 @@
+<%@ Control Language="C#" AutoEventWireup="false"  CodeFile="Header.ascx.cs" Inherits="Trade.Web.Header" %>
+<%@ OutputCache Duration ="30" VaryByParam="none" %>
+<!--------------------------The Common Header + Order Alert ASP.NET User Control --------------> 
+<style type="text/css">
+    .style1
+    {
+        width: 73px;
+    }
+</style>
+<table class= "HeaderTableStyle">
+    <tr>
+		<td><img alt="" src="Images/dotnet_logo.jpg" height="63"/></td>
+        <td class="HeaderLeftStyle">.NET StockTrader
+            </td>
+        <td class="HeaderRightStyle">Apache Stonehenge Incubator Project</td>
+    </tr>
+</table>
+<table class="MenuTableStyle">
+    <tr>
+            <td class="Menu"><a href="Default.aspx">Welcome</a></td>
+            <td class="Menu"><a href="TradeHome.aspx">Home</a></td>
+            <td class="Menu"><a href="account.aspx">Account</a></td>
+            <td class="Menu"><a href="portfolio.aspx">Portfolio</a></td>
+            <td class="Menu"><a href="quotes.aspx?symbols=s:0,s:1,s:2,s:3,s:4">Quotes/Trade</a></td>
+            <td class="Menu"><a href="Glossary.aspx">Glossary</a></td>
+            <td class="Menu"><a href="logout.aspx">Login/Logout</a></td>
+            <td class="Menu"><a href="ReadMe.mht" target="_blank">Read Me</a></td>
+
+    </tr>
+</table>    
+<!--------------------------End Global Header Table Declaration ---------------------------->
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/Header.ascx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,16 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Web;
+using Trade.StockTraderWebApplicationSettings;
+
+namespace Trade.Web
+{
+    public partial class Header : System.Web.UI.UserControl
+    {
+        protected override void OnLoad(EventArgs e)
+        {
+            //configlink.HRef = "http://" + HttpContext.Current.Server.MachineName + "/" + Settings.PAGE_PATH_CONFIG;
+        }
+    }
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,73 @@
+<%@Control Language="C#"  AutoEventWireup="false" CodeFile="MarketSummary.ascx.cs" Inherits="Trade.Web.MarketSummary" %>
+<%@OutputCache Duration="60" VaryByParam="none"%>
+<%@Import Namespace = "Trade.StockTraderWebApplicationSettings" %>
+<!---------------------------Start MarketSummary ASP.NET User Control----------------------->
+<table class="MarketSummaryControlTableStyle">
+    <tr >
+       <td colspan="2" class="MarketSummaryMasterHeader">Market Summary<div style="font-size:smaller">
+       <asp:Label ID="summaryDate" runat="server" Text="summaryDate"></asp:Label></div></td>
+    </tr>
+    <tr >
+       <th class="MarketSummaryHeader"><a href="/Glossary.aspx" class="MktSummary">Trade Stock<br />Index (TSIA)</a></th>
+       <td class="MarketSummaryLeftSubHeader">
+       <asp:Label ID="TSIA" runat="server" Text="TSIA"></asp:Label>
+       <asp:Label ID="GainPercent" runat="server" Text="Gain"></asp:Label></td>
+    </tr>
+    <tr >
+       <th class="MarketSummaryHeader"><a href="/Glossary.aspx" class="MktSummary">Trading<br />Volume</a>
+       </th>
+       <td class="MarketSummaryLeftSubHeader">
+       <asp:Label ID="Volume" runat="server" Text="Volume"></asp:Label></td>
+       </tr>
+    <tr >
+    <th class="MarketSummaryHeader"><a href="/Glossary.aspx" class="MktSummary">Top Gainers</a></th>
+       <td class="MarketSummaryGainerLoserHeader" style="padding-bottom:10px">
+<!---------------------------Begin Repeater for Top Gainers---------------------------------->
+       <asp:Repeater id="TopGainers" runat="server">
+           <HeaderTemplate>
+              <table class="MarketSummaryControlGainersLosersTableStyle">
+                 <tr>
+                     <th class="MarketSummaryInnerHeading">Symbol</th> <th class="MarketSummaryInnerHeading">Price</th> <th class="MarketSummaryInnerHeading">Change</th>
+                 </tr>
+          </HeaderTemplate>
+          <ItemTemplate>
+                    <tr>
+                        <td class="MarketSummaryInnerData"><%# Eval("quoteLink")%></td>
+                        <td class="MarketSummaryInnerData" style="text-align:right"><%# Eval("priceWithArrow")%></td>
+                        <td class="MarketSummaryInnerData" style="text-align:right"><%# Eval("gainWithArrow")%></td>
+                    </tr>
+          </ItemTemplate>
+          <FooterTemplate>
+            </table>
+          </FooterTemplate>
+       </asp:Repeater>
+<!---------------------------End Repeater for Top Gainers------------------------------------>
+       </td>
+   </tr>
+   <tr >
+       <th class="MarketSummaryHeader"> <a href="/Glossary.aspx" class="MktSummary">Top Losers</a></th>
+       <td class="MarketSummaryGainerLoserHeader" style="padding-bottom:10px">
+<!---------------------------Begin Repeater for Top Losers----------------------------------->
+       <asp:Repeater id="TopLosers" runat="server">
+           <HeaderTemplate>
+             <table class="MarketSummaryControlGainersLosersTableStyle">
+                <tr>
+                    <th class="MarketSummaryInnerHeading">Symbol</th> <th class="MarketSummaryInnerHeading">Price</th> <th class="MarketSummaryInnerHeading">Change</th>
+                </tr>
+           </HeaderTemplate>
+           <ItemTemplate>
+                <tr>
+                   <td class="MarketSummaryInnerData"><%# Eval("quoteLink")%> </td>
+                   <td class="MarketSummaryInnerData" style="text-align:right"><%# Eval("priceWithArrow")%></td>
+                   <td class="MarketSummaryInnerData" style="text-align:right"><%# Eval("gainWithArrow")%></td>
+                </tr>
+           </ItemTemplate>
+           <FooterTemplate>
+             </table>
+           </FooterTemplate>
+        </asp:Repeater>
+<!---------------------------End Repeater for Top Losers------------------------------------->
+        </td>
+    </tr>  
+</table>
+<!---------------------------End MarketSummary ASP.NET User Control---------------------->
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Controls/MarketSummary.ascx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,59 @@
+//  .NET StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
+
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Drawing;
+using Trade.StockTraderWebApplicationSettings;
+using Trade.StockTraderWebApplicationServiceClient;
+using Trade.StockTraderWebApplicationModelClasses;
+
+namespace Trade.Web
+{
+    /// <summary>
+    /// Displays the Market Summary tables using repeaters. Used on TradeHome.aspx.  This control should
+    /// implement output caching as the query for determining stock index is a killer.  Trade 6.1 does the same,
+    /// as no matter the DB (SQL, Oracle, DB/2), the query (as implemented by IBM and also for equivalence by .NET StockTrader) 
+    /// forces a table scan.  Fine for a DB with 100 quote symbols loaded;
+    /// not OK for a table with 100,000 quotes.  For the benchmark, both .NET and IBM Trade 6.1 (via Servlet Caching) were
+    /// configured to cache market summary for 60 seconds---so users get 60-second updates.  A good use of caching of read-only data,
+    /// where user can stand to be seeing data 60 seconds old.
+    /// </summary>
+    public partial class MarketSummary : System.Web.UI.UserControl
+    {
+        public MarketSummaryDataUI marketSummaryData = null;
+
+        protected override void OnLoad(EventArgs e)
+        {
+            BSLClient businessServicesClient = new BSLClient();
+            marketSummaryData = businessServicesClient.getMarketSummary();
+            List<QuoteDataUI> topGainers = marketSummaryData.topGainers;
+            List<QuoteDataUI> topLosers = marketSummaryData.topLosers;
+            summaryDate.Text = DateTime.Now.ToString("f");
+            TSIA.Text = String.Format("{0:N}",marketSummaryData.TSIA);
+            decimal gainpercent =  marketSummaryData.gainPercent;
+            if (gainpercent > 0)
+            {
+                GainPercent.ForeColor = System.Drawing.Color.DarkGreen;
+                GainPercent.Text = String.Format("{0:N}" + Settings.UPARROWLINK, gainpercent);
+            }
+                else if (gainpercent < 0)
+                {
+                    GainPercent.ForeColor = System.Drawing.Color.DarkRed;
+                    GainPercent.Text = String.Format("{0:N}" + Settings.DOWNARROWLINK, gainpercent);
+                }
+                    else
+                    {
+                        GainPercent.Text = String.Format("{0:N}", gainpercent);
+                    }
+            Volume.Text = String.Format("{0:N}", marketSummaryData.volume);
+            TopGainers.DataSource = marketSummaryData.topGainers;
+            TopLosers.DataSource = marketSummaryData.topLosers;
+            TopGainers.DataBind();
+            TopLosers.DataBind();
+        }
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx Fri Dec 19 09:43:28 2008
@@ -0,0 +1,165 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Trade.Web.Default" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD Xhtml 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+<meta http-equiv="Content-Style-Type" content="text/css"/>
+<title>.NET StockTrader Welcome</title>
+<link rel="stylesheet" href="StockTrader.css" type="text/css" />
+<!--
+    Code originally contributed by Microsoft Corporation.
+    This contribution to the Stonehenge project is limited strictly 
+    to the source code that is submitted in this submission.  
+    Any technology, including underlying platform technology, 
+    that is referenced or required by the submitted source code 
+    is not a part of the contribution.  
+    For example and not by way of limitation, 
+    any systems/Windows libraries (WPF, WCF, ASP.NET etc.) 
+    required to run the submitted source code is not a part of the contribution
+-->
+</head>
+<body class="StockTraderBodyStyle"> 
+<!--------------------------Begin Main Web Form Declaration--------------------------------->
+<div>
+<form runat="server" id="DefaultForm" style="margin:0;">  
+<!-------------------------Begin Global Header Table Declaration---------------------------->
+<table class= "HeaderTableStyle">
+    <tr>
+		<td><img alt="" src="Images/dotnet_logo.jpg" height="63"/></td>
+        <td class="HeaderLeftStyle">.NET StockTrader
+            </td>
+        <td class="HeaderRightStyle">Apache Stonehenge Incubator Project</td>
+    </tr>
+</table>
+<table class="MenuTableStyle">
+    <tr>
+            <td class="Menu"><a href="Default.aspx">Welcome</a></td>
+            <td class="Menu"><a href="TradeHome.aspx">Home</a></td>
+            <td class="Menu"><a href="account.aspx">Account</a></td>
+            <td class="Menu"><a href="portfolio.aspx">Portfolio</a></td>
+            <td class="Menu"><a href="quotes.aspx?symbols=s:0,s:1,s:2,s:3,s:4">Quotes/Trade</a></td>
+            <td class="Menu"><a href="Glossary.aspx">Glossary</a></td>
+            <td class="Menu"><a href="logout.aspx">Login/Logout</a></td>
+            <td class="Menu"><a href="ReadMe.mht" target="_blank">Read Me</a></td>
+    </tr>
+</table>    
+<!--------------------------End Global Header Table Declaration ---------------------------->
+<table class="TradeHomeTableStyle">
+<tr>
+    <td colspan="2" class="OrderAlertControlStyle"></td>
+</tr>
+<tr>
+    <td colspan="2"> <br /></td>
+</tr>
+<tr>
+    <td colspan="2">
+    <table class="SubHeaderTableStyle">
+        <tr>
+            <th class="SubHeaderStyle">Welcome!</th>
+            <th class="TodaysDateStyle"><asp:Label ID="Date" runat="server"></asp:Label></th>
+        </tr>
+    </table>
+    </td>
+</tr>
+
+<tr>
+        <td style="vertical-align:top; text-align:left;padding-left:12px; padding-right:12px; width: 381px;">
+        <p>
+        </p>
+        <br />
+        <p>
+        This application is an end-to-end sample application for .NET Enterprise Application Server technologies.
+        It is a service-oriented application based on .Net 3.5 utilizing Windows Communication Foundation 
+            (WCF) and ASP.NET, and illustrates
+        many of the .NET 3.5 enterprise development technologies that can be used for building "enterprise-connected" applications.  
+        </p>
+        <p>
+        The application also offers a rich set of interoperability options with non-Microsoft platforms.  This includes 
+        interoperability with Java-based application servers and <a href="https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=trade6">IBM WebSphere's Trade 6.1</a> sample application, and open-source based front-ends and services from <a href="http://wso2.org/interop/stocktrader">
+                WSO2</a> and other vendors. The .NET services also include a data access layer for both Microsoft SQL Server and Oracle 11G databases. The application offers an excellent opportunity for developers to learn about .NET and building interoperable, service-oriented applications.
+        </p>
+        </td>       
+        <td style="padding-left:15px;">
+            <br />
+            <br />
+            <table class="TechnologiesTableStyle" >
+            <tr>
+                <th style="text-align:center; vertical-align:middle; padding-bottom:12px; font-size:12px;background-color:#112e58; color:white; height: 25px;">
+                Sample of Technologies Demonstrated</th>
+            </tr>
+            <tr style="line-height:15px">
+            <td>  <br/> 
+            <ul>
+                <li class="Mainline">
+                Service-oriented, n-tier design with ASP.NET and WCF    
+                </li>
+                <li class="Subline">
+                Clean separation of UI, business services and DB access    
+                </li>
+                <li class="Mainline">
+                .NET 3.5 with WCF</li>
+                <li class="Subline">
+                Interoperability with J2EE/WebSphere Trade 6.1   
+                </li>
+                <li class="Subline">Interoperability with Java and PHP services over
+                    <br />
+                    WS-* Advanced Web Service standards</li>
+                <li class="Subline">
+                Loosely-coupled, message-oriented design with WCF  
+                </li>
+                <li class="Subline">
+                Self-hosting WCF Services   
+                </li>
+                <li class="Subline">
+                Custom WCF Behaviors
+                </li>
+                <li class="Mainline">
+                .NET Enterprise Application Server Technologies
+                </li>
+                <li class="Subline">
+                ASP.NET 2.0 and 3.5
+                </li>
+                <li class="Subline">
+                ADO.NET 2.0
+                </li>
+            </ul>
+        </td>
+         </tr>
+         </table>
+         <br />
+        </td>
+      </tr>
+             <tr>
+                <td style="width: 381px">  
+            </td>
+        </tr>
+        <tr>
+    <td colspan="2">
+        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/trade.gif" /><br />
+        <br />
+    </td>
+</tr>
+    </table>
+</form>
+</div>
+<!-------------------------------Start StockTrader Footer----------------------------------->
+<table class="FooterTableStyle">
+    <tr>
+            <td class="FooterLeftStyle">
+            Apache Stonehenge Incubator Project</td>
+            <td class="FooterRightStyle">
+            .NET StockTrader</td>
+    </tr>
+    <tr>
+            <td colspan="2" class="FooterCopyRightStyle"><br />
+            Created with Visual Studio and the Microsoft .NET Framework 3.5 
+            </td>
+    </tr>
+</table> 
+<table>
+<tr>
+    <td style="width:770px;height:500px">
+    </td>
+</tr>
+</table>
+</body>
+</html>
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx.cs
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx.cs?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx.cs (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Default.aspx.cs Fri Dec 19 09:43:28 2008
@@ -0,0 +1,20 @@
+using System;
+using System.Web;
+using System.Web.UI;
+using Trade.StockTraderWebApplicationSettings;
+
+namespace Trade.Web
+{
+        public partial class Default : System.Web.UI.Page
+        {
+            protected void Page_Load(object sender, EventArgs e)
+            {
+               Date.Text = DateTime.Now.ToString("f");
+               //Settings Settings = new Settings();
+               //configlink.HRef = "http://" + HttpContext.Current.Server.MachineName + "/" + 
+               Settings settings = new Settings();
+               
+            }
+        }
+}
+

Added: incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Global.asax
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Global.asax?rev=728078&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Global.asax (added)
+++ incubator/stonehenge/contrib/stocktrader/dotnet/StockTrader/StockTraderWebAppSolution/Trade/Global.asax Fri Dec 19 09:43:28 2008
@@ -0,0 +1,43 @@
+<%@ Application Language="C#"%>
+
+<%@ Import Namespace = "Trade.StockTraderWebApplicationSettings" %>
+<%@ Import Namespace = "Trade.BusinessServiceConfigurationSettings" %>
+<%@ Import Namespace = "Trade.OrderProcessorServiceConfigurationSettings" %>
+<%@ Import Namespace = "Trade.Utility" %>
+
+<script runat="server">
+
+    void Application_Start(object sender, EventArgs e) 
+    {
+        Trade.StockTraderWebApplicationSettings.Settings settings = new Trade.StockTraderWebApplicationSettings.Settings();
+        //This will initialize Business Service settings in case we are running with ACCESS_MODE=InProcess
+        Trade.BusinessServiceConfigurationSettings.Settings thisSettings = new Trade.BusinessServiceConfigurationSettings.Settings();
+        Trade.OrderProcessorServiceConfigurationSettings.Settings thisOPSSettings = new Trade.OrderProcessorServiceConfigurationSettings.Settings();
+    }
+
+    void Application_End(object sender, EventArgs e)
+    {
+       
+    }
+        
+    void Application_Error(object sender, EventArgs e) 
+    { 
+        // Code that runs when an unhandled error occurs
+    }
+
+    void Session_Start(object sender, EventArgs e) 
+    {
+        // Code that runs when a new session is started
+
+    }
+
+    void Session_End(object sender, EventArgs e) 
+    {
+        // Code that runs when a session ends. 
+        // Note: The Session_End event is raised only when the sessionstate mode
+        // is set to InProc in the Web.config file. If session mode is set to StateServer 
+        // or SQLServer, the event is not raised.
+
+    }
+       
+</script>



Mime
View raw message