From 52a56316754458f7ebaa2c7d6b48279fc2c2c5d0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 5 Oct 2021 19:15:39 +0200 Subject: [PATCH] Ok grafici + log, updatepanel NON VA --- NKC_WF/Controllers/DayStatsController.cs | 11 +++++++++++ NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx | 2 +- NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx | 2 +- NKC_WF/site/PlannerReports.aspx | 11 +++++------ NKC_WF/site/PlannerReports.aspx.designer.cs | 18 ------------------ 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/NKC_WF/Controllers/DayStatsController.cs b/NKC_WF/Controllers/DayStatsController.cs index eef2f6e..f88b6d4 100644 --- a/NKC_WF/Controllers/DayStatsController.cs +++ b/NKC_WF/Controllers/DayStatsController.cs @@ -1,6 +1,8 @@ using AppData; +using NKC_SDK; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Linq; using System.Web; @@ -57,8 +59,14 @@ namespace NKC_WF.Controllers /// private List getDataFilt(string id, DateTime StartDate, DateTime EndDate, string PlotType) { + // effettuo calcolo statistiche + Stopwatch stopWatchLap = new Stopwatch(); + stopWatchLap.Start(); List answ = new List(); var tabDati = DLMan.taDayStats.GetData(StartDate, EndDate, id, true); + stopWatchLap.Stop(); + Log.Instance.Info($"DayStats DB retrieve | machine: {id} | start: {StartDate} | end: {EndDate} | elapsed: {stopWatchLap.Elapsed.TotalMilliseconds} ms"); + stopWatchLap.Restart(); DateTime startTime = DateTime.Now.AddYears(1); // ciclo foreach (var item in tabDati.OrderBy(x => x.DataOraRif)) @@ -90,6 +98,8 @@ namespace NKC_WF.Controllers } answ.Add(new chartJsTSerie() { x = item.DataOraRif, y = value }); } + stopWatchLap.Stop(); + Log.Instance.Info($"DayStats data conversion | machine: {id} | start: {StartDate} | end: {EndDate} | elapsed: {stopWatchLap.Elapsed.TotalMilliseconds} ms"); // restituisco return answ; } @@ -138,6 +148,7 @@ namespace NKC_WF.Controllers List answ = new List(); answ = getDataFilt(id, dateStart, dateEnd, PlotType); + // restituisco oggetto! return answ; } diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx index d823053..01140e1 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx @@ -37,7 +37,7 @@ }], }, animation: { - duration: 250 + duration: 150 }, }; diff --git a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx index e5f2447..de06480 100644 --- a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx +++ b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx @@ -39,7 +39,7 @@ }], }, animation: { - duration: 250 + duration: 150 }, }; diff --git a/NKC_WF/site/PlannerReports.aspx b/NKC_WF/site/PlannerReports.aspx index 97772b2..8a5ae60 100644 --- a/NKC_WF/site/PlannerReports.aspx +++ b/NKC_WF/site/PlannerReports.aspx @@ -29,18 +29,17 @@ - + <%-- - + -
- -
+
+
- + --%> diff --git a/NKC_WF/site/PlannerReports.aspx.designer.cs b/NKC_WF/site/PlannerReports.aspx.designer.cs index 8433804..58fd440 100644 --- a/NKC_WF/site/PlannerReports.aspx.designer.cs +++ b/NKC_WF/site/PlannerReports.aspx.designer.cs @@ -32,24 +32,6 @@ namespace NKC_WF.site /// protected global::System.Web.UI.WebControls.Label lblInstruction; - /// - /// upnlLoading control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdatePanel upnlLoading; - - /// - /// UpdateProgressDisplay control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay; - /// /// cmp_SheetsStats control. ///