From 4e411feeb5f28bab94d89e5410b74feefdbdefe9 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 31 Dec 2019 09:05:57 +0100 Subject: [PATCH] Nuovi obj validazione --- NKC_WF/PartValidation.aspx | 9 ++- NKC_WF/PartValidation.aspx.cs | 5 ++ NKC_WF/PartValidation.aspx.designer.cs | 9 +++ .../cmp_validationSummary.ascx | 58 +++++++++++++++++ .../cmp_validationSummary.ascx.cs | 65 +++++++++++++++++++ .../cmp_validationSummary.ascx.designer.cs | 53 +++++++++++++++ 6 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 NKC_WF/WebUserControls/cmp_validationSummary.ascx create mode 100644 NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs create mode 100644 NKC_WF/WebUserControls/cmp_validationSummary.ascx.designer.cs diff --git a/NKC_WF/PartValidation.aspx b/NKC_WF/PartValidation.aspx index 06500ac..1cf75fe 100644 --- a/NKC_WF/PartValidation.aspx +++ b/NKC_WF/PartValidation.aspx @@ -1,6 +1,8 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="PartValidation.aspx.cs" Inherits="NKC_WF.PartValidation" %> <%@ Register Src="~/WebUserControls/cmp_batchList.ascx" TagPrefix="uc1" TagName="cmp_batchList" %> +<%@ Register Src="~/WebUserControls/cmp_validationSummary.ascx" TagPrefix="uc1" TagName="cmp_validationSummary" %> +
@@ -9,7 +11,12 @@

<%: traduci("PartValidation") %>

-
+
+
+ +
+
+
diff --git a/NKC_WF/PartValidation.aspx.cs b/NKC_WF/PartValidation.aspx.cs index f9c8120..e8f3a8d 100644 --- a/NKC_WF/PartValidation.aspx.cs +++ b/NKC_WF/PartValidation.aspx.cs @@ -6,7 +6,12 @@ namespace NKC_WF { protected void Page_Load(object sender, EventArgs e) { + cmp_validationSummary.eh_doRefresh += Cmp_validationSummary_eh_doRefresh; + } + private void Cmp_validationSummary_eh_doRefresh(object sender, EventArgs e) + { + cmp_batchList.doUpdate(); } } } \ No newline at end of file diff --git a/NKC_WF/PartValidation.aspx.designer.cs b/NKC_WF/PartValidation.aspx.designer.cs index 6b30783..03f81b9 100644 --- a/NKC_WF/PartValidation.aspx.designer.cs +++ b/NKC_WF/PartValidation.aspx.designer.cs @@ -14,6 +14,15 @@ namespace NKC_WF public partial class PartValidation { + /// + /// Controllo cmp_validationSummary. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::NKC_WF.WebUserControls.cmp_validationSummary cmp_validationSummary; + /// /// Controllo divBatchList. /// diff --git a/NKC_WF/WebUserControls/cmp_validationSummary.ascx b/NKC_WF/WebUserControls/cmp_validationSummary.ascx new file mode 100644 index 0000000..a08c706 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_validationSummary.ascx @@ -0,0 +1,58 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_validationSummary.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_validationSummary" %> +
+
+

Validation Summary

+
+
+ Re-Validate PARTS (KO) +
+
+ Validate NEW PARTS +
+
+ + + +
+
+
+
+ # Parts +
+
+ +
+
+
+
+
+
+ # Validated +
+
+ +
+
+
+
+
+
+ # NOT Valid +
+
+ +
+
+
+
+
+
+ # Unknown +
+
+ +
+
+ + + diff --git a/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs new file mode 100644 index 0000000..912a0e6 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.cs @@ -0,0 +1,65 @@ +using AppData; +using SteamWare; +using System; +using System.Web.UI; + +namespace NKC_WF.WebUserControls +{ + public partial class cmp_validationSummary : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + fixVisibility(); + } + } + /// + /// fix visibilità buttons + /// + private void fixVisibility() + { + // controllo SE HO nuove PARTS da validare... + var tabItems2Valid = DataLayer.man.taIL.getNeedValid(); + var tabItemsUnValid = DataLayer.man.taIL.getUnValid(); + lbtValidateMissing.Visible = tabItems2Valid.Count > 0; + lbtRevalidate.Visible = tabItemsUnValid.Count > 0; + } + + protected void lbtValidateMissing_Click(object sender, EventArgs e) + { + // chiamo stored x creazione NUOVI BATCH... + try + { + DataLayer.man.taBL.createPartValBatch(memLayer.ML.CRS("cadBaseBath")); + // eventualmente mando primo batch da validare... + bool newValidSent = ComLib.sendFirstValidationBatch(); + } + catch + { } + // update! + doUpdate(); + } + + protected void lbtRevalidate_Click(object sender, EventArgs e) + { + // rimetto da validare tramite stored + try + { + DataLayer.man.taBL.resetPartUnValid(memLayer.ML.CRS("cadBaseBath")); + // eventualmente mando primo batch da validare... + bool newValidSent = ComLib.sendFirstValidationBatch(); + } + catch + { } + // update! + doUpdate(); + } + + private void doUpdate() + { + frmView.DataBind(); + raiseEvent(); + } + } +} \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_validationSummary.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.designer.cs new file mode 100644 index 0000000..4de9455 --- /dev/null +++ b/NKC_WF/WebUserControls/cmp_validationSummary.ascx.designer.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace NKC_WF.WebUserControls +{ + + + public partial class cmp_validationSummary + { + + /// + /// Controllo lbtRevalidate. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtRevalidate; + + /// + /// Controllo lbtValidateMissing. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtValidateMissing; + + /// + /// Controllo frmView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.FormView frmView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +}