Browse files

Small changes

  • Loading branch information...
1 parent 6febac9 commit 25f3377ed02793a57d037c7986b7dac38e637eea unknown committed Jun 7, 2011
View
BIN StocksApplication/StocksApplication.Web/ClientBin/StocksApplicationSL.xap
Binary file not shown.
View
4 StocksApplication/StocksApplication.Web/StocksApplication.Web.csproj
@@ -56,6 +56,10 @@
</ItemGroup>
<ItemGroup>
<Content Include="ClientBin\StocksApplicationSL.xap" />
+ <Content Include="htmlclient\jquery-1.6.1.min.js" />
+ <Content Include="htmlclient\json2.min.js" />
+ <Content Include="htmlclient\scripts.js" />
+ <Content Include="htmlclient\Stocks.html" />
<Content Include="Silverlight.js" />
<Content Include="StocksApplicationSLTestPage.aspx" />
<Content Include="StocksApplicationSLTestPage.html" />
View
6 StocksApplication/StocksApplication.Web/StocksService.svc.cs
@@ -24,15 +24,13 @@ public IEnumerable<Stocks.StockQuote> FetchStockData(string quote, string from,
Contract.Assert(todate <= DateTime.Now, "Future not allowed yet...");
var uri = Stocks.MakeUrl(quote, fromdate, todate);
- var result = Enumerable.Empty<Stocks.StockQuote>();
try {
- result = Stocks.GetResult(uri);
+ return Stocks.GetResult(uri);
}catch(System.Net.WebException){
//throw;
- result = Enumerable.Repeat(new Stocks.StockQuote(todate, -1.0), 1);
+ return Enumerable.Repeat(new Stocks.StockQuote(todate, -1.0), 1);
}
- return result;
}
// example: http://localhost:49624/StocksService.svc/Symbol/MSFT/20100905/20100910
}
View
4 StocksApplication/StocksApplication.Web/htmlclient/scripts.js
@@ -1,4 +1,4 @@
-window.onload = function()
+$(document).ready(function()
{
//Debug:
function concatObject(obj) {
@@ -63,6 +63,6 @@ window.onload = function()
error: function(res){alert("Communication error...");}
});
});
-}
+});

0 comments on commit 25f3377

Please sign in to comment.