First pass at adding CO2S query and display

This commit is contained in:
2020-07-02 21:29:40 -04:00
parent 3dedac5591
commit 0fae6c5118
4 changed files with 57 additions and 18 deletions
+15 -1
View File
@@ -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;
}
}