Author: bendewey Date: Fri Feb 12 01:59:56 2010 New Revision: 909203 URL: http://svn.apache.org/viewvc?rev=909203&view=rev Log: JIRA: STONEHENGE-119 Fixed a bug in the ConfigurationDisplay on the .NET Footer, Thanks Submitted by: Nicholas A Hauenstein
Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/ConfigurationAdvanced.aspx.cs Modified: incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/ConfigurationAdvanced.aspx.cs URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/ConfigurationAdvanced.aspx.cs?rev=909203&r1=909202&r2=909203&view=diff ============================================================================== --- incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/ConfigurationAdvanced.aspx.cs (original) +++ incubator/stonehenge/trunk/stocktrader/dotnet/trader_client/Trade/ConfigurationAdvanced.aspx.cs Fri Feb 12 01:59:56 2010 @@ -18,6 +18,7 @@ // .NET Service Configuration V2.0 for Design Considerations for Service-Oriented Applications based on Windows Communication Foundation. Created with Microsoft .NET Framework 3.5 and Microsoft Visual Studio. Copyright 2008, Microsoft Corporation. using System; +using System.Web; using Trade.ConfigClient; using Trade.ConfigServiceDataContract; using Trade.StockTraderWebApplicationSettings; @@ -120,6 +121,9 @@ } } + private const string BsNameCacheKey = "BSNAME"; + private const string OpsNameCacheKey = "OPSNAME"; + protected void SetButton_Click(object sender, EventArgs e) { try @@ -150,6 +154,12 @@ // send ws call configClient.SetClientToBS(clientRequest); + if (HttpRuntime.Cache[BsNameCacheKey] != null) + { + HttpRuntime.Cache.Remove(BsNameCacheKey); + } + HttpRuntime.Cache.Insert(BsNameCacheKey, clientRequest.Bs); + // Set BS Endpoint Configuration BSToOPS bsRequest = new BSToOPS(); bsRequest.Bs = newBs.ServiceName; @@ -157,6 +167,12 @@ // send ws call configClient.SetBSToOPS(bsRequest); + if (HttpRuntime.Cache[OpsNameCacheKey] != null) + { + HttpRuntime.Cache.Remove(OpsNameCacheKey); + } + HttpRuntime.Cache.Insert(OpsNameCacheKey, bsRequest.Ops); + ConfirmationText.Text = ("Configuration successfully changed to: "+Settings.CLIENT_LABEL+" -> " + clientRequest.Bs + " -> " + bsRequest.Ops); ConfirmationText.ForeColor = System.Drawing.Color.Green; ConfirmationText.Visible = true;