private void LoadData() { //Ophalen waar ge-recorde temp/hum/pres groter is dan maximum van product of kleiner is dan minimum van product List <Observation> Observations = observationDataService.GetObservations(); List <Region> Regions = regionDataService.GetRegions(); foreach (Observation o in Observations) { double maxTemp = 0; foreach (Region r in Regions) { if (r.RegionID == o.RegionID) { maxTemp = regionDataService.GetMaxTempPerRegion(r.RegionID); } } if (o.Temperature > maxTemp) { measuredExtremes.Add(new MeasuredExtreme { RegionID = o.RegionID, MaximumTemperature = maxTemp, Temperature = o.Temperature, Humidity = o.Humidity, Pressure = o.AirPressure }); } } }
public void LoadData() { foreach (Observation item in observationDataService.GetObservations()) { if (item.RegionID == 1) { observations.Add(item); } } foreach (Region region in regionDataservice.GetRegions()) { regions.Add(region); } }