Beispiel #1
0
        public async Task OnGet(string id)
        {
            startDate = DateTime.Now.AddHours(-3);
            endDate   = DateTime.Now;

            if (id != null)
            {
                WellName = id;
                Brunnar.Add(id);

                IEnumerable <ActivityPerRow> wells = await GetWellRowsAsync();

                DateNow = DateTime.Now;

                // Latest activity
                LatestActivity = wells.OrderByDescending(a => a.TimeUp).Take(1);

                // Number of activity last hour
                LatestHour = CountRows(wells, -1);

                // Number of activity last 3 hour
                Latest3Hour = CountRows(wells, -3);

                // Number of activity last 24 hour
                Latest24Hour = CountRows(wells, -24);


                PremisesPerWell = await GetPropertiesAsync();

                PremisesText = GetPremisesText();
            }
        }