From 0fcda26e925312b217d77a0d050046a48c1a8d2b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sun, 19 Jan 2020 12:22:32 +0100 Subject: [PATCH] Inizio sistemazione BIN --- NKC_WF/WebUserControls/cmp_MU_bins.ascx | 34 +++++++++++ NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs | 61 +++++++++++++++++++ .../cmp_MU_bins.ascx.designer.cs | 27 ++++++++ 3 files changed, 122 insertions(+) diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx b/NKC_WF/WebUserControls/cmp_MU_bins.ascx index e8553a2..4c5c821 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx @@ -5,6 +5,40 @@
+ + + + + + + No Record + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs index c1caa0c..347ca0c 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.cs @@ -9,9 +9,70 @@ namespace NKC_WF.WebUserControls { public partial class cmp_MU_bins : System.Web.UI.UserControl { + /// + /// Batch corrente... + /// + public int BatchId + { + set + { + hfBatchID.Value = value.ToString(); + doUpdate(); + } + get + { + int answ = 0; + int.TryParse(hfBatchID.Value, out answ); + return answ; + } + } protected void Page_Load(object sender, EventArgs e) { } + public void doUpdate() + { + grView.DataBind(); + } + /// + /// Calcola il rapporto tra 2 valori + /// + /// + /// + /// + public double getRatio(object _dividendo, object _divisore) + { + double ratio = 0; + double dividendo = 0; + double divisore = 1; + double.TryParse(_dividendo.ToString(), out dividendo); + double.TryParse(_divisore.ToString(), out divisore); + ratio = dividendo / divisore; + return ratio; + } + /// + /// determina CSS x colore testo da perc svuotamento... + /// + /// + /// + /// + public string getCssCart(object _dividendo, object _divisore) + { + double ratio = getRatio(_dividendo, _divisore); + string answ = "text-dark"; + if (ratio == 0) + { + answ = "text-danger"; + } + else if (ratio == 1) + { + answ = "text-success"; + } + else + { + answ = "text-warning"; + } + return answ; + } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs index 0c0dfba..f4fc38b 100644 --- a/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_MU_bins.ascx.designer.cs @@ -13,5 +13,32 @@ namespace NKC_WF.WebUserControls public partial class cmp_MU_bins { + + /// + /// Controllo grView. + /// + /// + /// 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.GridView grView; + + /// + /// 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; + + /// + /// Controllo hfBatchID. + /// + /// + /// 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.HiddenField hfBatchID; } }