diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 14b5393..b8f6702 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -324,6 +324,7 @@ + @@ -479,6 +480,8 @@ + + @@ -486,6 +489,7 @@ + @@ -1053,6 +1057,20 @@ PlannerReports.aspx + + PlannerReportsBatchStats.aspx + ASPXCodeBehind + + + PlannerReportsBatchStats.aspx + + + PlannerReportsDailyStats.aspx + ASPXCodeBehind + + + PlannerReportsDailyStats.aspx + PlantMgmt.aspx ASPXCodeBehind @@ -1116,6 +1134,13 @@ StackManager.aspx + + TestChart.aspx + ASPXCodeBehind + + + TestChart.aspx + Unauth.aspx ASPXCodeBehind diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 3007385..eee89ae 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -36,8 +36,9 @@ - + @@ -110,18 +111,20 @@ - - + + + value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> + value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> + value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx index 01140e1..9f22600 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx @@ -24,7 +24,7 @@ var labelsTS = dataTS.map(function (item) { return item['x']; }); - //console.log('labels data', labels); + //console.log('labels data', labelsTS); var myOptions = { responsive: true, @@ -42,15 +42,17 @@ }; // recupero obj chart + //console.log('ctx ID: ', document.getElementById('myChartTS')); var ctx = document.getElementById('myChartTS').getContext('2d'); + var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value; var chart = new Chart(ctx, { type: 'line', data: { labels: labelsTS, datasets: [{ - label: '<%=hfLegend.Value %>', + label: sLeg, borderColor: 'rgb(7, 173, 236)', lineTension: 0, //steppedLine: false, @@ -66,22 +68,31 @@ } // effettuo plotting grafico TimeSerie! function plotTS() { - //console.log("api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>"); - // caricamento pagina - $.ajax({ - type: "GET", - url: "../api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>", - contentType: "application/json; charset=utf-8", - dataType: "json", - success: OnSuccess_, - error: OnErrorCall_ - }); + var hfSL = document.getElementById('<%=hfShowLast.ClientID %>'); + if (hfSL != null) { + var lastNum = document.getElementById('<%=hfShowLast.ClientID %>').value ?? ""; + var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value ?? ""; + //console.log("../api/BatchStats/"+lastNum+"?PlotType="+plotType); + // caricamento pagina + $.ajax({ + type: "GET", + url: "../api/BatchStats/" + lastNum + "?PlotType=" + plotType, + contentType: "application/json; charset=utf-8", + dataType: "json", + success: OnSuccess_, + error: OnErrorCall_ + }); + } } // funzione di drawing ad OGNI pageload! function pageLoad() { - // chiamo recupero dati + plot della TS - plotTS(); - //console.log('pageLoad!'); + try { + console.log('pageLoad BatchStats! | ID: <%= this.ID %> '); + plotTS(); + } + catch (error) { + console.log(error); + } } - \ No newline at end of file + diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs index 8f7422f..49921d7 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs @@ -53,10 +53,7 @@ namespace NKC_WF.WebUserControls #region Protected Methods - protected void Page_Load(object sender, EventArgs e) - { - } - + #endregion Protected Methods } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx index d4fed9a..922a56f 100644 --- a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx +++ b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx @@ -4,11 +4,10 @@
-

Batch Stats Plot

+

Daily Stats Plot

- <%----%>
@@ -23,6 +22,7 @@
+ \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx.cs b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx.cs index d2d73eb..a80341c 100644 --- a/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_DailyStatsPlot.ascx.cs @@ -1,21 +1,11 @@ using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Web; using System.Web.UI; -using System.Web.UI.WebControls; namespace NKC_WF.WebUserControls { public partial class cmp_DailyStatsPlot : System.Web.UI.UserControl { - #region Protected Fields - - protected string dateFormat = "yyyy-MM-dd"; - - #endregion Protected Fields - #region Public Properties public DateTime DateEnd @@ -84,11 +74,14 @@ namespace NKC_WF.WebUserControls #endregion Public Properties + #region Protected Fields + + protected string dateFormat = "yyyy-MM-dd"; + + #endregion Protected Fields + #region Protected Methods - protected void Page_Load(object sender, EventArgs e) - { - } #endregion Protected Methods } diff --git a/NKC_WF/WebUserControls/cmp_reportSelector.ascx b/NKC_WF/WebUserControls/cmp_reportSelector.ascx index 94767bf..a49c46b 100644 --- a/NKC_WF/WebUserControls/cmp_reportSelector.ascx +++ b/NKC_WF/WebUserControls/cmp_reportSelector.ascx @@ -5,7 +5,7 @@ <%: traduci("RepBatchPreview") %>