-
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") %>
- <%: traduci("RepUnloadPart") %>
+ <%: traduci("RepUnloadPart") %>
<%: traduci("RepDayStats") %>
diff --git a/NKC_WF/site/PlannerReports.aspx.cs b/NKC_WF/site/PlannerReports.aspx.cs
index 608a0ef..258131e 100644
--- a/NKC_WF/site/PlannerReports.aspx.cs
+++ b/NKC_WF/site/PlannerReports.aspx.cs
@@ -149,7 +149,7 @@ namespace NKC_WF.site
switch (cmp_reportSelector.SelReport)
{
case ReportType.BatchStats:
- Response.Redirect("PlannerReports02");
+ Response.Redirect("PlannerReportsBatchStats");
break;
case ReportType.BatchUnloadPreview:
@@ -157,7 +157,7 @@ namespace NKC_WF.site
break;
case ReportType.DailyReport:
- Response.Redirect("PlannerReports03");
+ Response.Redirect("PlannerReportsDailyStats");
break;
case ReportType.ND:
diff --git a/NKC_WF/site/PlannerReports01.aspx b/NKC_WF/site/PlannerReports01.aspx
deleted file mode 100644
index 77dae01..0000000
--- a/NKC_WF/site/PlannerReports01.aspx
+++ /dev/null
@@ -1,42 +0,0 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports01.aspx.cs" Inherits="NKC_WF.site.PlannerReports01" %>
-
-<%@ Register Src="~/WebUserControls/cmp_SheetsStats.ascx" TagPrefix="uc1" TagName="cmp_SheetsStats" %>
-<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
-
-
-
-
-
-
-
-
diff --git a/NKC_WF/site/PlannerReports01.aspx.cs b/NKC_WF/site/PlannerReports01.aspx.cs
deleted file mode 100644
index 37c0190..0000000
--- a/NKC_WF/site/PlannerReports01.aspx.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-using AppData;
-using NKC_WF.WebUserControls;
-using SteamWare;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-
-namespace NKC_WF.site
-{
- public partial class PlannerReports01 : BasePage
- {
- #region Public Properties
-
- ///
- /// Batch corrente...
- ///
- public int BatchId
- {
- get
- {
- int answ = 0;
- if (!string.IsNullOrEmpty(memLayer.ML.QSS("BatchId")))
- {
- answ = memLayer.ML.QSI("BatchId");
- }
- else
- {
- answ = savedBatchId;
- }
- return answ;
- }
- }
-
- ///
- /// Limite orario preview...
- ///
- public int MaxHour
- {
- get
- {
- int answ = -1;
- if (!string.IsNullOrEmpty(memLayer.ML.QSS("MaxHour")))
- {
- answ = memLayer.ML.QSI("MaxHour");
- }
- return answ;
- }
- }
-
- #endregion Public Properties
-
- #region Public Methods
-
- ///
- /// Update interfaccia
- ///
- public void doUpdate()
- {
- if (BatchId > 0)
- {
- cmp_reportSelector.SelReport = ReportType.BatchUnloadPreview;
- // Imposto BatchID...
- cmp_SheetsStats.BatchID = BatchId;
- cmp_SheetsStats.MaxHour = MaxHour;
- }
- updateDisplay();
- }
-
- #endregion Public Methods
-
- #region Protected Properties
-
- protected int savedBatchId
- {
- get
- {
- return ComLib.getCurrBatchId(PlaceCod);
- }
- }
-
- #endregion Protected Properties
-
- #region Protected Methods
-
- protected void lbtRefreshData_Click(object sender, EventArgs e)
- {
- TryUpdateModel();
- }
-
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- ((SiteMaster)this.Master).showSearch = false;
- doUpdate();
- }
- cmp_reportSelector.eh_doRefresh += Cmp_reportSelector_eh_doRefresh;
- }
-
- #endregion Protected Methods
-
- #region Private Methods
-
- private void Cmp_reportSelector_eh_doRefresh(object sender, EventArgs e)
- {
- // display in base al report selezionato
- updateDisplay();
- }
-
- private void TryUpdateModel()
- {
- Thread.Sleep(50);
- DateTime oggi = DateTime.Today;
- // verifica se ci sia VETO x update da redis
- string rawVal = memLayer.ML.getRSV(ComLib.redVetoDayStats);
- if (string.IsNullOrEmpty(rawVal))
- {
- // effettuo calcolo statistiche
- Stopwatch stopWatchLap = new Stopwatch();
- stopWatchLap.Start();
- // se non c'è effettua ricalcolo x i giorni necessari (da ultimo ricalcolo oppure da
- // valore web.config)
- int numDays = memLayer.ML.CRI("repNumDayPre");
- // verifico ultimo record...
- var tabLast = DLMan.taDayStats.getLast();
- try
- {
- // se vuoto: 90gg
- if (tabLast == null || tabLast.Count == 0)
- {
- numDays = 90;
- }
- else
- {
- var lastRec = tabLast[0];
- // calcolo x eccesso la differenza in giorni
- var dayDiff = Math.Ceiling(oggi.Subtract(lastRec.DataRif).TotalDays + 1);
- int numDayLast = (int)dayDiff;
- numDays = numDays > numDayLast ? numDays : numDayLast;
- }
- }
- catch
- { }
- // verifico ultimo giorno disponibile...
- DateTime DateEnd = oggi.AddDays(1);
- DateTime DateStart = DateEnd.AddDays(-numDays);
- DLMan.taDayStats.ProductionUpdate(DateStart, DateEnd, "*", true);
- int vetoRecalcMin = memLayer.ML.CRI("repVetoRecalcMin");
- memLayer.ML.setRSV(ComLib.redVetoDayStats, $"Recalc Done | {DateStart} --> {DateEnd}", 60 * vetoRecalcMin);
- stopWatchLap.Stop();
- lgInfo($"DayStats DB ProductionUpdate: effettuato ricalcolo statistiche | periodo {DateStart} --> {DateEnd} | elapsed: {stopWatchLap.Elapsed.TotalMilliseconds} ms | veto ricalcolo per {vetoRecalcMin} minuti");
- }
- }
-
- private void updateDisplay()
- {
- //cmp_SheetsStats.Visible = false;
- switch (cmp_reportSelector.SelReport)
- {
- case ReportType.BatchStats:
- Response.Redirect("PlannerReports02");
- break;
-
- case ReportType.BatchUnloadPreview:
- Response.Redirect("PlannerReports01");
- break;
-
- case ReportType.DailyReport:
- Response.Redirect("PlannerReports03");
- break;
-
- case ReportType.ND:
- default:
- break;
- }
- }
-
- #endregion Private Methods
- }
-}
\ No newline at end of file
diff --git a/NKC_WF/site/PlannerReports01.aspx.designer.cs b/NKC_WF/site/PlannerReports01.aspx.designer.cs
deleted file mode 100644
index d695208..0000000
--- a/NKC_WF/site/PlannerReports01.aspx.designer.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace NKC_WF.site
-{
-
-
- public partial class PlannerReports01
- {
-
- ///
- /// uplBody control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.UpdatePanel uplBody;
-
- ///
- /// cmp_reportSelector control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::NKC_WF.WebUserControls.cmp_reportSelector cmp_reportSelector;
-
- ///
- /// UpdateProgressDisplay control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
-
- ///
- /// lbtRefreshData control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.LinkButton lbtRefreshData;
-
- ///
- /// cmp_SheetsStats control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::NKC_WF.WebUserControls.cmp_SheetsStats cmp_SheetsStats;
- }
-}
diff --git a/NKC_WF/site/PlannerReports02.aspx b/NKC_WF/site/PlannerReportsBatchStats.aspx
similarity index 95%
rename from NKC_WF/site/PlannerReports02.aspx
rename to NKC_WF/site/PlannerReportsBatchStats.aspx
index 5c20d96..59cf455 100644
--- a/NKC_WF/site/PlannerReports02.aspx
+++ b/NKC_WF/site/PlannerReportsBatchStats.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports02.aspx.cs" Inherits="NKC_WF.site.PlannerReports02" %>
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReportsBatchStats.aspx.cs" Inherits="NKC_WF.site.PlannerReportsBatchStats" %>
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
<%@ Register Src="~/WebUserControls/cmp_BatchStatsList.ascx" TagPrefix="uc1" TagName="cmp_BatchStatsList" %>
diff --git a/NKC_WF/site/PlannerReports02.aspx.cs b/NKC_WF/site/PlannerReportsBatchStats.aspx.cs
similarity index 95%
rename from NKC_WF/site/PlannerReports02.aspx.cs
rename to NKC_WF/site/PlannerReportsBatchStats.aspx.cs
index b13a235..0fb5183 100644
--- a/NKC_WF/site/PlannerReports02.aspx.cs
+++ b/NKC_WF/site/PlannerReportsBatchStats.aspx.cs
@@ -12,7 +12,7 @@ using System.Web.UI.WebControls;
namespace NKC_WF.site
{
- public partial class PlannerReports02 : BasePage
+ public partial class PlannerReportsBatchStats : BasePage
{
#region Public Properties
@@ -165,15 +165,15 @@ namespace NKC_WF.site
switch (cmp_reportSelector.SelReport)
{
case ReportType.BatchStats:
- Response.Redirect("PlannerReports02");
+ Response.Redirect("PlannerReportsBatchStats");
break;
case ReportType.BatchUnloadPreview:
- Response.Redirect("PlannerReports01");
+ Response.Redirect("PlannerReports");
break;
case ReportType.DailyReport:
- Response.Redirect("PlannerReports03");
+ Response.Redirect("PlannerReportsDailyStats");
break;
case ReportType.ND:
diff --git a/NKC_WF/site/PlannerReports02.aspx.designer.cs b/NKC_WF/site/PlannerReportsBatchStats.aspx.designer.cs
similarity index 97%
rename from NKC_WF/site/PlannerReports02.aspx.designer.cs
rename to NKC_WF/site/PlannerReportsBatchStats.aspx.designer.cs
index 3f9f143..51d3d18 100644
--- a/NKC_WF/site/PlannerReports02.aspx.designer.cs
+++ b/NKC_WF/site/PlannerReportsBatchStats.aspx.designer.cs
@@ -11,7 +11,7 @@ namespace NKC_WF.site
{
- public partial class PlannerReports02
+ public partial class PlannerReportsBatchStats
{
///
diff --git a/NKC_WF/site/PlannerReports03.aspx b/NKC_WF/site/PlannerReportsDailyStats.aspx
similarity index 95%
rename from NKC_WF/site/PlannerReports03.aspx
rename to NKC_WF/site/PlannerReportsDailyStats.aspx
index e2f8830..729089b 100644
--- a/NKC_WF/site/PlannerReports03.aspx
+++ b/NKC_WF/site/PlannerReportsDailyStats.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports03.aspx.cs" Inherits="NKC_WF.site.PlannerReports03" %>
+<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReportsDailyStats.aspx.cs" Inherits="NKC_WF.site.PlannerReportsDailyStats" %>
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
<%@ Register Src="~/WebUserControls/cmp_DailyStatsList.ascx" TagPrefix="uc1" TagName="cmp_DailyStatsList" %>
diff --git a/NKC_WF/site/PlannerReports03.aspx.cs b/NKC_WF/site/PlannerReportsDailyStats.aspx.cs
similarity index 95%
rename from NKC_WF/site/PlannerReports03.aspx.cs
rename to NKC_WF/site/PlannerReportsDailyStats.aspx.cs
index f460e52..28fb531 100644
--- a/NKC_WF/site/PlannerReports03.aspx.cs
+++ b/NKC_WF/site/PlannerReportsDailyStats.aspx.cs
@@ -12,7 +12,7 @@ using System.Web.UI.WebControls;
namespace NKC_WF.site
{
- public partial class PlannerReports03 : BasePage
+ public partial class PlannerReportsDailyStats : BasePage
{
#region Public Properties
@@ -165,15 +165,15 @@ namespace NKC_WF.site
switch (cmp_reportSelector.SelReport)
{
case ReportType.BatchStats:
- Response.Redirect("PlannerReports02");
+ Response.Redirect("PlannerReportsBatchStats");
break;
case ReportType.BatchUnloadPreview:
- Response.Redirect("PlannerReports01");
+ Response.Redirect("PlannerReports");
break;
case ReportType.DailyReport:
- Response.Redirect("PlannerReports03");
+ Response.Redirect("PlannerReportsDailyStats");
break;
case ReportType.ND:
diff --git a/NKC_WF/site/PlannerReports03.aspx.designer.cs b/NKC_WF/site/PlannerReportsDailyStats.aspx.designer.cs
similarity index 97%
rename from NKC_WF/site/PlannerReports03.aspx.designer.cs
rename to NKC_WF/site/PlannerReportsDailyStats.aspx.designer.cs
index 39e58a9..553710a 100644
--- a/NKC_WF/site/PlannerReports03.aspx.designer.cs
+++ b/NKC_WF/site/PlannerReportsDailyStats.aspx.designer.cs
@@ -11,7 +11,7 @@ namespace NKC_WF.site
{
- public partial class PlannerReports03
+ public partial class PlannerReportsDailyStats
{
///