First pass at adding CO2S query and display
This commit is contained in:
@@ -58,7 +58,7 @@ namespace LeafWeb.WebCms.Utility
|
||||
|
||||
if (!string.IsNullOrEmpty(query.lon))
|
||||
{
|
||||
var longitude = Int32.Parse(query.lon);
|
||||
var longitude = int.Parse(query.lon);
|
||||
var range = 0;
|
||||
if (!string.IsNullOrEmpty(query.lonr))
|
||||
{
|
||||
@@ -73,6 +73,20 @@ namespace LeafWeb.WebCms.Utility
|
||||
select li;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(query.co2s))
|
||||
{
|
||||
var co2s = double.Parse(query.co2s);
|
||||
|
||||
resultItems =
|
||||
from li in resultItems
|
||||
where co2s >=
|
||||
li.LeafInputData.Max(lid =>
|
||||
lid.Data.Max(d => d.CO2S) -
|
||||
lid.Data.Min(d => d.CO2S)
|
||||
)
|
||||
select li;
|
||||
}
|
||||
|
||||
return resultItems;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user