コード例 #1
0
        public async Task ProcessRecords()
        {
            await GetSQLRecords();
            await fetchPoissonAsync(lamba, Forecasts.Count());

            var CurrentForecasts = Forecasts.Where(pr => Forecasts.Any(p => pr.fdate >= DateTime.Today)).ToList();

            List <DailyForecast> finalRecords = new List <DailyForecast>();

            foreach (var item in CurrentForecasts)
            {
                DailyForecast newItem = new DailyForecast(per_loc, per_admit, per_vent);

                newItem.EstimatedGloveSurgical         = GloveSurgical;
                newItem.EstimatedGloveExamNitrile      = GloveExamNitrile;
                newItem.EstimatedGloveExamVinyl        = GloveExamVinyl;
                newItem.EstimatedMaskFaceAntiFog       = MaskFaceAntiFog;
                newItem.EstimatedMaskFluidResistant    = MaskFluidResistant;
                newItem.EstimatedGownIsolationXLYellow = GownIsolationXLYellow;
                newItem.EstimatedMaskAntiFogWFilm      = MaskAntiFogWFilm;
                newItem.EstimatedShieldFaceFullAntiFog = ShieldFaceFullAntiFog;
                newItem.EstimatedRespPartFilterReg     = RespPartFilterReg;

                newItem.fdate          = item.fdate;
                newItem.ForecastValues = item.ForecastValues;
                newItem.NewCases       = item.NewCases;
                newItem.Total_cc       = item.Total_cc;
                newItem.Total_nc       = item.Total_nc;
                finalRecords.Add(newItem);
            }


            data = Tricks.ToDataTable(finalRecords);
        }