コード例 #1
0
        public int GetCountByCity(GeoFilter city)
        {
            var temp    = TempData == null ? 0 : TempData.Where(d => d.Person.Location == city).Count();
            var glucose = GlucoseData == null ? 0 : GlucoseData.Where(d => d.Person.Location == city).Count();
            var oxygen  = OxygenData == null ? 0 : OxygenData.Where(d => d.Person.Location == city).Count();
            var hr      = HeartRateData == null ? 0 : HeartRateData.Where(d => d.Person.Location == city).Count();
            int count   = 0;

            if (temp > count)
            {
                count = temp;
            }
            if (glucose > count)
            {
                count = glucose;
            }
            if (oxygen > count)
            {
                count = oxygen;
            }
            if (hr > count)
            {
                count = hr;
            }
            return(count);
        }
コード例 #2
0
        public int GetCountByCityState(GeoFilter city, Condition state)
        {
            var temp    = TempData == null ? 0 : TempData.Where(d => d.State == state && d.Person.Location == city).Count();
            var glucose = GlucoseData == null ? 0 : GlucoseData.Where(d => d.State == state && d.Person.Location == city).Count();
            var oxygen  = OxygenData == null ? 0 : OxygenData.Where(d => d.State == state && d.Person.Location == city).Count();
            var hr      = HeartRateData == null ? 0 : HeartRateData.Where(d => d.State == state && d.Person.Location == city).Count();

            return(temp + glucose + oxygen + hr);
        }
コード例 #3
0
        public int GetCountByState(Condition state)
        {
            var temp    = TempData == null ? 0 : TempData.Where(d => d.State == state).Count();
            var glucose = GlucoseData == null ? 0 : GlucoseData.Where(d => d.State == state).Count();
            var oxygen  = OxygenData == null ? 0 : OxygenData.Where(d => d.State == state).Count();
            var hr      = HeartRateData == null ? 0 : HeartRateData.Where(d => d.State == state).Count();

            return(temp + glucose + oxygen + hr);
        }
コード例 #4
0
        public List <Location> GetLocationsByCity(GeoFilter city)
        {
            var list = new List <Location>();

            var temp    = TempData == null ? new List <Measurement>() : TempData.Where(d => d.Person.Location == city);
            var glucose = GlucoseData == null ? new List <Measurement>() : GlucoseData.Where(d => d.Person.Location == city);
            var oxygen  = OxygenData == null ? new List <Measurement>() : OxygenData.Where(d => d.Person.Location == city);
            var hr      = HeartRateData == null ? new List <Measurement>() : HeartRateData.Where(d => d.Person.Location == city);

            list.AddRange(ExtractLocations(temp));
            return(list);
        }