From e48ab33b504f1e62c3c313529470aec758905bea Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 4 Oct 2021 19:06:51 +0200 Subject: [PATCH 1/7] Aggiunta componente selettore report --- .../WebUserControls/cmp_reportSelector.ascx | 13 +++ .../cmp_reportSelector.ascx.cs | 89 +++++++++++++++++++ .../cmp_reportSelector.ascx.designer.cs | 44 +++++++++ 3 files changed, 146 insertions(+) create mode 100644 NKC_WF/WebUserControls/cmp_reportSelector.ascx create mode 100644 NKC_WF/WebUserControls/cmp_reportSelector.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_reportSelector.ascx.designer.cs diff --git a/NKC_WF/WebUserControls/cmp_reportSelector.ascx b/NKC_WF/WebUserControls/cmp_reportSelector.ascx new file mode 100644 index 0000000..1e99731 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_reportSelector.ascx @@ -0,0 +1,13 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_reportSelector.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_reportSelector" %> + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_reportSelector.ascx.cs b/NKC_WF/WebUserControls/cmp_reportSelector.ascx.cs new file mode 100644 index 0000000..7c6ba92 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_reportSelector.ascx.cs @@ -0,0 +1,89 @@ +using AppData; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_reportSelector : BaseUserControl + { + #region Protected Properties + + protected ReportType _selReport { get; set; } = ReportType.ND; + + #endregion Protected Properties + + #region Public Properties + + public ReportType SelReport + { + get + { + return _selReport; + } + set + { + _selReport = value; + updateDisplay(); + } + } + + #endregion Public Properties + + #region Private Methods + + private void updateDisplay() + { + string baseCss = "nav-link"; + lbtBatchPreview.CssClass = baseCss; + lbtUnloadPart.CssClass = baseCss; + lbtDayStats.CssClass = baseCss; + switch (_selReport) + { + case ReportType.BatchStats: + lbtBatchPreview.CssClass += " active"; + break; + + case ReportType.BatchUnloadPreview: + lbtUnloadPart.CssClass += " active"; + break; + + case ReportType.DailyReport: + lbtDayStats.CssClass += " active"; + break; + + case ReportType.ND: + default: + break; + } + } + + #endregion Private Methods + + #region Protected Methods + + protected void lbtBatchPreview_Click(object sender, EventArgs e) + { + SelReport = ReportType.BatchStats; + } + + protected void lbtDailyStats_Click(object sender, EventArgs e) + { + SelReport = ReportType.DailyReport; + } + + protected void lbtUnloadPart_Click(object sender, EventArgs e) + { + SelReport = ReportType.BatchUnloadPreview; + } + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_reportSelector.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_reportSelector.ascx.designer.cs new file mode 100644 index 0000000..d3378b7 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_reportSelector.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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.WebUserControls +{ + + + public partial class cmp_reportSelector + { + + /// + /// lbtBatchPreview control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtBatchPreview; + + /// + /// lbtUnloadPart control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtUnloadPart; + + /// + /// lbtDayStats control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtDayStats; + } +} From 268c6c073f5f13fd472b1a551c3a46494e64b14b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 4 Oct 2021 19:07:00 +0200 Subject: [PATCH 2/7] Inizio modifica pagina report --- AppData/Enum.cs | 23 + NKC_WF/NKC_WF.csproj | 8 + NKC_WF/Web.config | 450 ++++++++++---------- NKC_WF/site/PlannerReports.aspx | 23 +- NKC_WF/site/PlannerReports.aspx.designer.cs | 9 + 5 files changed, 287 insertions(+), 226 deletions(-) diff --git a/AppData/Enum.cs b/AppData/Enum.cs index d8c81ae..3f5555f 100644 --- a/AppData/Enum.cs +++ b/AppData/Enum.cs @@ -17,6 +17,29 @@ namespace AppData danger } + public enum ReportType + { + /// + /// Non definito + /// + ND = 0, + + /// + /// Statistiche Batch (PRE) + /// + BatchStats, + + /// + /// Report previsione scarico batch (num pezzi/sheet) + /// + BatchUnloadPreview, + + /// + /// Report produttività giornaliera (POST) + /// + DailyReport + } + public enum Stations { LINE = 0, diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 47aa535..14e672b 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -547,6 +547,7 @@ + @@ -1622,6 +1623,13 @@ cmp_partMIA_byPLID.ascx + + cmp_reportSelector.ascx + ASPXCodeBehind + + + cmp_reportSelector.ascx + cmp_scrapList.ascx ASPXCodeBehind diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index aeda972..9fd17cc 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -6,431 +6,431 @@ -
-
-
-
+
+
+
+
- - + + - + - + - + + applicationName="NKC" databaseId="2" timeout="480"/> - - - + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - - + + + - + - - - - - + + + + + - - + + - - + + + value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> + value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> + value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/> + providerName="System.Data.SqlClient"/> + providerName="System.Data.SqlClient"/> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - - + preCondition="integratedMode"/> + + + - + - - - + + + + preCondition="integratedMode,runtimeVersionv4.0"/> - - - - - + + + + + @@ -438,21 +438,21 @@ See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for more information on remote access and securing ELMAH. --> - - + + - + - + - + @@ -49,7 +49,7 @@ - + diff --git a/NKC_WF/NKC_WF.csproj b/NKC_WF/NKC_WF.csproj index 14e672b..c40705b 100644 --- a/NKC_WF/NKC_WF.csproj +++ b/NKC_WF/NKC_WF.csproj @@ -481,10 +481,12 @@ + + @@ -1140,6 +1142,13 @@ cmp_batchList.ascx + + cmp_BatchStatsList.ascx + ASPXCodeBehind + + + cmp_BatchStatsList.ascx + cmp_binDetIRK.ascx ASPXCodeBehind @@ -1168,6 +1177,13 @@ cmp_cartDetIRK.ascx + + cmp_dailyStats.ascx + ASPXCodeBehind + + + cmp_dailyStats.ascx + cmp_devUtils.ascx ASPXCodeBehind diff --git a/NKC_WF/Web.config b/NKC_WF/Web.config index 9fd17cc..2e8cd5e 100644 --- a/NKC_WF/Web.config +++ b/NKC_WF/Web.config @@ -1,460 +1,467 @@ - + - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx new file mode 100644 index 0000000..531c027 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx @@ -0,0 +1,51 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_BatchStatsList.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_BatchStatsList" %> + +<%@ Register Src="~/WebUserControls/cmp_numRow.ascx" TagPrefix="uc1" TagName="cmp_numRow" %> + +
+
+
+
+ <%: traduci("BatchPreviewStats") %> +
+
+ <%: traduci("ShowLast") %>: + + +
+
+
+
+
+
+ + + + + + + <%: traduci("NoRecord") %> + + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs new file mode 100644 index 0000000..e458cf9 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs @@ -0,0 +1,321 @@ +using AppData; +using NKC_SDK; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_BatchStatsList : BaseUserControl + { + #region Protected Properties + + /// + /// BatchId selezionato + /// + protected int BatchIdSel + { + get + { + int answ = 0; + if (grView.SelectedValue != null) + { + int.TryParse(grView.SelectedValue.ToString(), out answ); + } + return answ; + } + } + + /// + /// Status corrente del batch + /// + protected BatchStatus CurrBatchStatus + { + get + { + return ComLib.BStatus(BatchIdSel); + } + } + + protected int currSelRow + { + get + { + return grView.SelectedIndex; + } + set + { + grView.SelectedIndex = value; + } + } + + #endregion Protected Properties + + #region Public Properties + + public bool deleteEnabled + { + get + { + bool answ = false; + bool.TryParse(hfDeleteEnabled.Value, out answ); + return answ; + } + set + { + hfDeleteEnabled.Value = value.ToString(); + } + } + + /// + /// modalità funzionamento controllo + /// + public BatchListMode listMode { get; set; } = BatchListMode.Standard; + + #endregion Public Properties + + #region Private Methods + + private void Cmp_batchDetail_eh_doRefresh(object sender, EventArgs e) + { + resetSelezione(); + } + + private void Cmp_numRow_eh_doRefresh(object sender, EventArgs e) + { + // recupero num righe ed aggiorno... + grView.PageSize = cmp_numRow.numRow; + grView.DataBind(); + } + + private void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseReset(); + } + + #endregion Private Methods + + #region Protected Methods + + protected void chkShowSplit_CheckedChanged(object sender, EventArgs e) + { + // deseleziono... + resetSelezione(); + } + + protected void ddlStatus_SelectedIndexChanged(object sender, EventArgs e) + { + } + + protected void grView_PageIndexChanged(object sender, EventArgs e) + { + } + + protected void lbRedoEval_Click(object sender, EventArgs e) + { + LinkButton lbt = (LinkButton)sender; + if (!string.IsNullOrEmpty(lbt.CommandArgument)) + { + // eseguo richiesta reset + DLMan.taBL.redoPartValid(lbt.CommandArgument); + // eventualmente mando primo batch da validare... + bool newValidSent = ComLib.sendFirstValidationBatch(); + // refresh! + resetSelezione(); + } + } + + protected void lbtDisableDel_Click(object sender, EventArgs e) + { + deleteEnabled = false; + resetSelezione(); + } + + protected void lbtEnableDel_Click(object sender, EventArgs e) + { + deleteEnabled = true; + resetSelezione(); + } + + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// Caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + deleteEnabled = false; + cmp_numRow.numRow = 10; + grView.PageSize = cmp_numRow.numRow; + } + cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh; + } + + #endregion Protected Methods + + #region Public Methods + + /// + /// Converte il codice stato in effettivo campo + /// + /// + /// + public string BStatus(object _status) + { + string answ = ComLib.BatchStatusDescr(_status); + return answ; + } + + /// + /// Codice CSS in base a status... + /// + /// + /// + public string cssByStatus(object _status) + { + string answ = "text-muted"; + int status = -1; + int.TryParse(_status.ToString(), out status); + switch (status) + { + case 1: + answ = "font-weight-bold text-info"; + break; + + case 2: + answ = "font-weight-bold text-primary"; + break; + + case 3: + answ = "font-weight-bold text-warning"; + break; + + case 4: + answ = "font-weight-bold text-danger"; + break; + + case 5: + answ = "font-weight-bold text-success"; + break; + + case 6: + answ = "font-weight-bold text-secondary"; + break; + + default: + break; + } + return answ; + } + + /// + /// Codice CSS in base a BatchType... + /// + /// + /// + public string cssIconByType(object _BatchType) + { + string answ = "fa fa-circle-thin"; + int status = -1; + int.TryParse(_BatchType.ToString(), out status); + switch (status) + { + case 0: + answ = "fa fa-file-text-o"; + break; + + case 1: + answ = "fa fa-file-text"; + break; + + case 2: + answ = "fa fa-scissors"; + break; + + default: + break; + } + return answ; + } + + public void doUpdate() + { + grView.DataBind(); + } + + /// + /// Determina se sia visibile previewin base a BatchType... + /// + /// + /// + public bool hasPreviewByType(object _BatchType) + { + bool answ = false; + int status = -1; + int.TryParse(_BatchType.ToString(), out status); + switch (status) + { + case 0: + case 2: + answ = true; + break; + + case 1: + default: + answ = false; + break; + } + return answ; + } + + /// + /// Verifica se sia visualizzabile preview dato stato + /// + /// + /// + public bool isPreviewVisible(object _status) + { + bool answ = false; + int status = -1; + int.TryParse(_status.ToString(), out status); + // solo stati 4 (nesting done), 5 (approvato), 6 (eliminazione logica) + if (status > 3 && status < 7) + { + answ = true; + } + return answ; + } + + /// + /// Tooltip in base a BatchType... + /// + /// + /// + public string tooltipByType(object _BatchType) + { + string answ = "-"; + + answ = traduci($"tooltipBatchType_{_BatchType}"); + return answ; + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs new file mode 100644 index 0000000..720c615 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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.WebUserControls +{ + + + public partial class cmp_BatchStatsList + { + + /// + /// txtNumShow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtNumShow; + + /// + /// cmp_numRow control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::NKC_WF.WebUserControls.cmp_numRow cmp_numRow; + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// hfDeleteEnabled control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfDeleteEnabled; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +} diff --git a/NKC_WF/WebUserControls/cmp_dailyStats.ascx b/NKC_WF/WebUserControls/cmp_dailyStats.ascx new file mode 100644 index 0000000..0f29e67 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_dailyStats.ascx @@ -0,0 +1,3 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_dailyStats.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_dailyStats" %> + +

Daily Stats

\ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_dailyStats.ascx.cs b/NKC_WF/WebUserControls/cmp_dailyStats.ascx.cs new file mode 100644 index 0000000..e1d8db1 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_dailyStats.ascx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_dailyStats : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_dailyStats.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_dailyStats.ascx.designer.cs new file mode 100644 index 0000000..c2993df --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_dailyStats.ascx.designer.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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.WebUserControls +{ + public partial class cmp_dailyStats + { + } +} diff --git a/NKC_WF/WebUserControls/cmp_numRow.ascx b/NKC_WF/WebUserControls/cmp_numRow.ascx index 0ec2543..6467463 100644 --- a/NKC_WF/WebUserControls/cmp_numRow.ascx +++ b/NKC_WF/WebUserControls/cmp_numRow.ascx @@ -1,4 +1,4 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_numRow.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_numRow" %> -size: +num: \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_numRow.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_numRow.ascx.designer.cs index e1119ad..9331599 100644 --- a/NKC_WF/WebUserControls/cmp_numRow.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_numRow.ascx.designer.cs @@ -1,23 +1,25 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ -namespace NKC_WF.WebUserControls { - - - public partial class cmp_numRow { - +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_numRow + { + /// - /// Controllo txtNumRow. + /// txtNumRow control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtNumRow; } diff --git a/NKC_WF/site/PlannerReports.aspx b/NKC_WF/site/PlannerReports.aspx index 25ceb75..2496de3 100644 --- a/NKC_WF/site/PlannerReports.aspx +++ b/NKC_WF/site/PlannerReports.aspx @@ -2,6 +2,8 @@ <%@ Register Src="~/WebUserControls/cmp_SheetsStats.ascx" TagPrefix="uc1" TagName="cmp_SheetsStats" %> <%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %> +<%@ Register Src="~/WebUserControls/cmp_BatchStatsList.ascx" TagPrefix="uc1" TagName="cmp_BatchStatsList" %> +<%@ Register Src="~/WebUserControls/cmp_dailyStats.ascx" TagPrefix="uc1" TagName="cmp_dailyStats" %>
@@ -20,6 +22,8 @@
+ +
diff --git a/NKC_WF/site/PlannerReports.aspx.cs b/NKC_WF/site/PlannerReports.aspx.cs index 3060505..3a066aa 100644 --- a/NKC_WF/site/PlannerReports.aspx.cs +++ b/NKC_WF/site/PlannerReports.aspx.cs @@ -74,9 +74,12 @@ namespace NKC_WF.site private void updateDisplay() { cmp_SheetsStats.Visible = false; + cmp_BatchStatsList.Visible = false; + cmp_dailyStats.Visible = false; switch (cmp_reportSelector.SelReport) { case ReportType.BatchStats: + cmp_BatchStatsList.Visible = true; break; case ReportType.BatchUnloadPreview: @@ -84,6 +87,7 @@ namespace NKC_WF.site break; case ReportType.DailyReport: + cmp_dailyStats.Visible = true; break; case ReportType.ND: diff --git a/NKC_WF/site/PlannerReports.aspx.designer.cs b/NKC_WF/site/PlannerReports.aspx.designer.cs index c0e5497..e9394a3 100644 --- a/NKC_WF/site/PlannerReports.aspx.designer.cs +++ b/NKC_WF/site/PlannerReports.aspx.designer.cs @@ -31,5 +31,23 @@ namespace NKC_WF.site /// To modify move field declaration from designer file to code-behind file. /// protected global::NKC_WF.WebUserControls.cmp_SheetsStats cmp_SheetsStats; + + /// + /// cmp_BatchStatsList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::NKC_WF.WebUserControls.cmp_BatchStatsList cmp_BatchStatsList; + + /// + /// cmp_dailyStats control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::NKC_WF.WebUserControls.cmp_dailyStats cmp_dailyStats; } } From 9a4204a24c2f0786cdad1a319e8750471d7f991b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 5 Oct 2021 11:24:24 +0200 Subject: [PATCH 5/7] COmpletata scheda stats PRE senza grafici --- AppData/DS_App.Designer.cs | 51 ++++++- AppData/DS_App.xsd | 131 ++++++++++-------- AppData/DS_App.xss | 6 +- .../WebUserControls/cmp_BatchStatsList.ascx | 10 +- .../cmp_BatchStatsList.ascx.cs | 31 +---- .../cmp_BatchStatsList.ascx.designer.cs | 27 ++-- NKC_WF/WebUserControls/cmp_SheetsStats.ascx | 17 +-- 7 files changed, 155 insertions(+), 118 deletions(-) diff --git a/AppData/DS_App.Designer.cs b/AppData/DS_App.Designer.cs index 78aa768..e2633dd 100644 --- a/AppData/DS_App.Designer.cs +++ b/AppData/DS_App.Designer.cs @@ -19151,6 +19151,8 @@ namespace AppData { private global::System.Data.DataColumn columnNumPainted; + private global::System.Data.DataColumn columnPlaceCod; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] public BatchStatsDataTable() { @@ -19264,6 +19266,14 @@ namespace AppData { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public global::System.Data.DataColumn PlaceCodColumn { + get { + return this.columnPlaceCod; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -19301,7 +19311,7 @@ namespace AppData { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] - public BatchStatsRow AddBatchStatsRow(int BatchID, string Takt, decimal AvgYeld, decimal TotalArea, int NumMat, int NumSheets, int NumModel, int NumKit, int NumParts, int NumPainted) { + public BatchStatsRow AddBatchStatsRow(int BatchID, string Takt, decimal AvgYeld, decimal TotalArea, int NumMat, int NumSheets, int NumModel, int NumKit, int NumParts, int NumPainted, string PlaceCod) { BatchStatsRow rowBatchStatsRow = ((BatchStatsRow)(this.NewRow())); object[] columnValuesArray = new object[] { BatchID, @@ -19313,7 +19323,8 @@ namespace AppData { NumModel, NumKit, NumParts, - NumPainted}; + NumPainted, + PlaceCod}; rowBatchStatsRow.ItemArray = columnValuesArray; this.Rows.Add(rowBatchStatsRow); return rowBatchStatsRow; @@ -19353,6 +19364,7 @@ namespace AppData { this.columnNumKit = base.Columns["NumKit"]; this.columnNumParts = base.Columns["NumParts"]; this.columnNumPainted = base.Columns["NumPainted"]; + this.columnPlaceCod = base.Columns["PlaceCod"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -19378,6 +19390,8 @@ namespace AppData { base.Columns.Add(this.columnNumParts); this.columnNumPainted = new global::System.Data.DataColumn("NumPainted", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnNumPainted); + this.columnPlaceCod = new global::System.Data.DataColumn("PlaceCod", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPlaceCod); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnBatchID}, true)); this.columnBatchID.AllowDBNull = false; @@ -19392,6 +19406,8 @@ namespace AppData { this.columnNumKit.AllowDBNull = false; this.columnNumParts.AllowDBNull = false; this.columnNumPainted.AllowDBNull = false; + this.columnPlaceCod.AllowDBNull = false; + this.columnPlaceCod.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -27795,6 +27811,17 @@ namespace AppData { this[this.tableBatchStats.NumPaintedColumn] = value; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + public string PlaceCod { + get { + return ((string)(this[this.tableBatchStats.PlaceCodColumn])); + } + set { + this[this.tableBatchStats.PlaceCodColumn] = value; + } + } } /// @@ -44445,6 +44472,7 @@ SELECT BatchID, SheetIndex, MatID, WorkArea, TotalArea, NumParts, NumPainted FRO tableMapping.ColumnMappings.Add("NumKit", "NumKit"); tableMapping.ColumnMappings.Add("NumParts", "NumParts"); tableMapping.ColumnMappings.Add("NumPainted", "NumPainted"); + tableMapping.ColumnMappings.Add("PlaceCod", "PlaceCod"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; @@ -44453,8 +44481,8 @@ SELECT BatchID, SheetIndex, MatID, WorkArea, TotalArea, NumParts, NumPainted FRO this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [BatchStats] ([BatchID], [Takt], [AvgYeld], [TotalArea], [NumMat], [NumSheets], [NumModel], [NumKit], [NumParts], [NumPainted]) VALUES (@BatchID, @Takt, @AvgYeld, @TotalArea, @NumMat, @NumSheets, @NumModel, @NumKit, @NumParts, @NumPainted); -SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted FROM BatchStats WHERE (BatchID = @BatchID)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [BatchStats] ([BatchID], [Takt], [AvgYeld], [TotalArea], [NumMat], [NumSheets], [NumModel], [NumKit], [NumParts], [NumPainted], [PlaceCod]) VALUES (@BatchID, @Takt, @AvgYeld, @TotalArea, @NumMat, @NumSheets, @NumModel, @NumKit, @NumParts, @NumPainted, @PlaceCod); +SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted, PlaceCod FROM BatchStats WHERE (BatchID = @BatchID)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Takt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -44466,10 +44494,11 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumKit", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumKit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumParts", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumParts", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPainted", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPainted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [BatchStats] SET [BatchID] = @BatchID, [Takt] = @Takt, [AvgYeld] = @AvgYeld, [TotalArea] = @TotalArea, [NumMat] = @NumMat, [NumSheets] = @NumSheets, [NumModel] = @NumModel, [NumKit] = @NumKit, [NumParts] = @NumParts, [NumPainted] = @NumPainted WHERE (([BatchID] = @Original_BatchID)); -SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted FROM BatchStats WHERE (BatchID = @BatchID)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [BatchStats] SET [BatchID] = @BatchID, [Takt] = @Takt, [AvgYeld] = @AvgYeld, [TotalArea] = @TotalArea, [NumMat] = @NumMat, [NumSheets] = @NumSheets, [NumModel] = @NumModel, [NumKit] = @NumKit, [NumParts] = @NumParts, [NumPainted] = @NumPainted, [PlaceCod] = @PlaceCod WHERE (([BatchID] = @Original_BatchID)); +SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted, PlaceCod FROM BatchStats WHERE (BatchID = @BatchID)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Takt", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Takt", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -44481,6 +44510,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumKit", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumKit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumParts", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumParts", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPainted", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "NumPainted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PlaceCod", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_BatchID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "BatchID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } @@ -44505,6 +44535,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ShowMax", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PlaceCod", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; this._commandCollection[2].CommandText = "dbo.stp_BatchStat_refresh"; @@ -44541,7 +44572,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_App.BatchStatsDataTable getLast(global::System.Nullable ShowMax) { + public virtual DS_App.BatchStatsDataTable getLast(global::System.Nullable ShowMax, string PlaceCod) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((ShowMax.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ShowMax.Value)); @@ -44549,6 +44580,12 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N else { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } + if ((PlaceCod == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(PlaceCod)); + } DS_App.BatchStatsDataTable dataTable = new DS_App.BatchStatsDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/AppData/DS_App.xsd b/AppData/DS_App.xsd index e87e8e0..42b02a9 100644 --- a/AppData/DS_App.xsd +++ b/AppData/DS_App.xsd @@ -3794,8 +3794,8 @@ SELECT BatchID, SheetIndex, MatID, WorkArea, TotalArea, NumParts, NumPainted FRO - INSERT INTO [BatchStats] ([BatchID], [Takt], [AvgYeld], [TotalArea], [NumMat], [NumSheets], [NumModel], [NumKit], [NumParts], [NumPainted]) VALUES (@BatchID, @Takt, @AvgYeld, @TotalArea, @NumMat, @NumSheets, @NumModel, @NumKit, @NumParts, @NumPainted); -SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted FROM BatchStats WHERE (BatchID = @BatchID) + INSERT INTO [BatchStats] ([BatchID], [Takt], [AvgYeld], [TotalArea], [NumMat], [NumSheets], [NumModel], [NumKit], [NumParts], [NumPainted], [PlaceCod]) VALUES (@BatchID, @Takt, @AvgYeld, @TotalArea, @NumMat, @NumSheets, @NumModel, @NumKit, @NumParts, @NumPainted, @PlaceCod); +SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted, PlaceCod FROM BatchStats WHERE (BatchID = @BatchID) @@ -3807,6 +3807,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N + @@ -3818,8 +3819,8 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - UPDATE [BatchStats] SET [BatchID] = @BatchID, [Takt] = @Takt, [AvgYeld] = @AvgYeld, [TotalArea] = @TotalArea, [NumMat] = @NumMat, [NumSheets] = @NumSheets, [NumModel] = @NumModel, [NumKit] = @NumKit, [NumParts] = @NumParts, [NumPainted] = @NumPainted WHERE (([BatchID] = @Original_BatchID)); -SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted FROM BatchStats WHERE (BatchID = @BatchID) + UPDATE [BatchStats] SET [BatchID] = @BatchID, [Takt] = @Takt, [AvgYeld] = @AvgYeld, [TotalArea] = @TotalArea, [NumMat] = @NumMat, [NumSheets] = @NumSheets, [NumModel] = @NumModel, [NumKit] = @NumKit, [NumParts] = @NumParts, [NumPainted] = @NumPainted, [PlaceCod] = @PlaceCod WHERE (([BatchID] = @Original_BatchID)); +SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, NumParts, NumPainted, PlaceCod FROM BatchStats WHERE (BatchID = @BatchID) @@ -3831,6 +3832,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N + @@ -3848,6 +3850,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N + @@ -3857,6 +3860,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N + @@ -3882,7 +3886,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3940,7 +3944,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -3965,7 +3969,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4020,7 +4024,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4093,7 +4097,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4162,7 +4166,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4195,7 +4199,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4267,7 +4271,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4286,7 +4290,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4317,7 +4321,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4325,7 +4329,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4342,7 +4346,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4351,7 +4355,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4382,7 +4386,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4390,7 +4394,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4406,7 +4410,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4414,7 +4418,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4442,7 +4446,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4478,7 +4482,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4494,7 +4498,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4504,7 +4508,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4521,7 +4525,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4534,7 +4538,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4583,7 +4587,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4612,7 +4616,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4654,7 +4658,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4765,7 +4769,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4828,7 +4832,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4873,7 +4877,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4899,7 +4903,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -4992,7 +4996,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5055,7 +5059,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5114,7 +5118,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5163,7 +5167,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5202,7 +5206,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5255,7 +5259,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5272,7 +5276,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5285,7 +5289,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5307,7 +5311,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5335,7 +5339,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5372,7 +5376,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5406,7 +5410,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5448,7 +5452,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5461,7 +5465,7 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - + @@ -5480,6 +5484,13 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N + + + + + + + @@ -5662,18 +5673,18 @@ SELECT BatchID, Takt, AvgYeld, TotalArea, NumMat, NumSheets, NumModel, NumKit, N - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/AppData/DS_App.xss b/AppData/DS_App.xss index 61e3bf9..79eb871 100644 --- a/AppData/DS_App.xss +++ b/AppData/DS_App.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -48,8 +48,8 @@ - - + + diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx index 531c027..0a70dbf 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx @@ -9,8 +9,15 @@ <%: traduci("BatchPreviewStats") %>
+ Machine + + + + +  |  <%: traduci("ShowLast") %>: +  | 
@@ -32,6 +39,7 @@ + @@ -41,10 +49,10 @@ - + diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs index e458cf9..b2d70f7 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs @@ -56,20 +56,6 @@ namespace NKC_WF.WebUserControls #region Public Properties - public bool deleteEnabled - { - get - { - bool answ = false; - bool.TryParse(hfDeleteEnabled.Value, out answ); - return answ; - } - set - { - hfDeleteEnabled.Value = value.ToString(); - } - } - /// /// modalità funzionamento controllo /// @@ -108,6 +94,10 @@ namespace NKC_WF.WebUserControls resetSelezione(); } + protected void ddlPlaces_SelectedIndexChanged(object sender, EventArgs e) + { + } + protected void ddlStatus_SelectedIndexChanged(object sender, EventArgs e) { } @@ -130,18 +120,6 @@ namespace NKC_WF.WebUserControls } } - protected void lbtDisableDel_Click(object sender, EventArgs e) - { - deleteEnabled = false; - resetSelezione(); - } - - protected void lbtEnableDel_Click(object sender, EventArgs e) - { - deleteEnabled = true; - resetSelezione(); - } - /// /// comando reset /// @@ -161,7 +139,6 @@ namespace NKC_WF.WebUserControls { if (!Page.IsPostBack) { - deleteEnabled = false; cmp_numRow.numRow = 10; grView.PageSize = cmp_numRow.numRow; } diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs index 720c615..19b1366 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.designer.cs @@ -14,6 +14,24 @@ namespace NKC_WF.WebUserControls public partial class cmp_BatchStatsList { + /// + /// ddlPlaces control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlPlaces; + + /// + /// odsPlaces control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsPlaces; + /// /// txtNumShow control. /// @@ -41,15 +59,6 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.GridView grView; - /// - /// hfDeleteEnabled control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HiddenField hfDeleteEnabled; - /// /// ods control. /// diff --git a/NKC_WF/WebUserControls/cmp_SheetsStats.ascx b/NKC_WF/WebUserControls/cmp_SheetsStats.ascx index e6cd530..f2a624d 100644 --- a/NKC_WF/WebUserControls/cmp_SheetsStats.ascx +++ b/NKC_WF/WebUserControls/cmp_SheetsStats.ascx @@ -2,21 +2,16 @@ <%--https://www.chartjs.org/--%> -
-
+
+

Unload Part Plan (<%: hfBatchId.Value %>)

-
-
-
- - - -
-
+
+ + +
- \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs new file mode 100644 index 0000000..8f7422f --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_BatchStatsPlot : System.Web.UI.UserControl + { + #region Public Properties + + public string Legend + { + get + { + return hfLegend.Value; + } + set + { + hfLegend.Value = value; + } + } + + public string PlotType + { + get + { + return hfPlotType.Value; + } + set + { + hfPlotType.Value = value; + } + } + + public int ShowLast + { + get + { + int answ = 0; + int.TryParse(hfShowLast.Value, out answ); + return answ; + } + set + { + hfShowLast.Value = $"{value}"; + } + } + + #endregion Public Properties + + #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_BatchStatsPlot.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.designer.cs new file mode 100644 index 0000000..27d6072 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx.designer.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// +// 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.WebUserControls +{ + + + public partial class cmp_BatchStatsPlot + { + + /// + /// hfShowLast control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfShowLast; + + /// + /// hfPlotType control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfPlotType; + + /// + /// hfLegend control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfLegend; + } +} diff --git a/NKC_WF/WebUserControls/cmp_SheetsStats.ascx b/NKC_WF/WebUserControls/cmp_SheetsStats.ascx index f2a624d..d3c56b4 100644 --- a/NKC_WF/WebUserControls/cmp_SheetsStats.ascx +++ b/NKC_WF/WebUserControls/cmp_SheetsStats.ascx @@ -43,8 +43,8 @@ } }], xAxes: [{ - type: 'time', //type: 'linear', + type: 'time', time: { unit: 'minute', stepSize: 1, From 3b980d160285e23828e06d329e0e8648d30852ed Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 5 Oct 2021 15:33:38 +0200 Subject: [PATCH 7/7] COmpletate statistiche PRE --- NKC_WF/Controllers/BatchStatsController.cs | 8 ++-- .../WebUserControls/cmp_BatchStatsList.ascx | 2 +- .../cmp_BatchStatsList.ascx.cs | 5 ++ .../WebUserControls/cmp_BatchStatsPlot.ascx | 47 +++++++++---------- NKC_WF/site/PlannerReports.aspx | 2 +- 5 files changed, 33 insertions(+), 31 deletions(-) diff --git a/NKC_WF/Controllers/BatchStatsController.cs b/NKC_WF/Controllers/BatchStatsController.cs index 99af455..6a25154 100644 --- a/NKC_WF/Controllers/BatchStatsController.cs +++ b/NKC_WF/Controllers/BatchStatsController.cs @@ -33,7 +33,7 @@ namespace NKC_WF.Controllers List answ = new List(); var tabDati = DLMan.taBStats.getLast(id); // ciclo - foreach (var item in tabDati.OrderByDescending(x => x.Takt)) + foreach (var item in tabDati.OrderBy(x => x.Takt)) { // prendo valore default = NumParts answ.Add(new chartJsTVal() { x = item.Takt, y = item.NumParts }); @@ -54,7 +54,7 @@ namespace NKC_WF.Controllers var tabDati = DLMan.taBStats.getLast(id); DateTime startTime = DateTime.Now.AddYears(1); // ciclo - foreach (var item in tabDati.OrderByDescending(x => x.Takt)) + foreach (var item in tabDati.OrderBy(x => x.Takt)) { //// converto in data il valore takt... primi 8 char //DateTime dataRif = DateTime.Today; @@ -63,7 +63,7 @@ namespace NKC_WF.Controllers switch (PlotType) { case "Yeld": - value = item.AvgYeld; + value = item.AvgYeld * 100; break; case "NumMat": @@ -88,7 +88,7 @@ namespace NKC_WF.Controllers case "NumParts": default: - value = item.NumKit; + value = item.NumParts; break; } answ.Add(new chartJsTVal() { x = item.Takt, y = value }); diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx index d5d6566..6d6105d 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx @@ -26,7 +26,7 @@  |  <%: traduci("ShowLast") %>: - +  | 
diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs index 06b487b..c9c9b40 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_BatchStatsList.ascx.cs @@ -178,6 +178,11 @@ namespace NKC_WF.WebUserControls cmp_numRow.eh_doRefresh += Cmp_numRow_eh_doRefresh; } + protected void txtNumShow_TextChanged(object sender, EventArgs e) + { + doUpdate(); + } + #endregion Protected Methods #region Public Methods diff --git a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx index edda68b..d823053 100644 --- a/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx +++ b/NKC_WF/WebUserControls/cmp_BatchStatsPlot.ascx @@ -4,7 +4,7 @@
-

Batch Stats Plot | <%: hfPlotType.Value %>

+

Batch Stats Plot

@@ -14,31 +14,30 @@