From 149b78f44dc9443e3656a38d8f83227d7a2d92da Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 21 Aug 2019 19:12:21 +0200 Subject: [PATCH] Fix filtraggio + fix trascriziones tati --- AppData/ComLib.cs | 31 +++++++++++++++++++ .../WebUserControls/cmp_batchDetail.ascx.cs | 9 +----- NKC_WF/WebUserControls/cmp_batchList.ascx | 25 ++++++++++++++- NKC_WF/WebUserControls/cmp_batchList.ascx.cs | 9 +----- .../cmp_batchList.ascx.designer.cs | 9 ++++++ 5 files changed, 66 insertions(+), 17 deletions(-) diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index c6116e9..cfb314e 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -61,6 +61,37 @@ namespace AppData Discarded } + public static string BatchStatusDescr(object value) + { + string answ = ""; + try + { + ComLib.BatchStatus bStatus = (ComLib.BatchStatus)Enum.Parse(typeof(ComLib.BatchStatus), value.ToString()); + switch (bStatus) + { + case BatchStatus.Imported: + answ = "Imported"; + break; + case BatchStatus.NestRequested: + answ = "Nesting Requested"; + break; + case BatchStatus.NestDone: + answ = "Nesting Completed"; + break; + case BatchStatus.Approved: + answ = "Nesting Approved"; + break; + case BatchStatus.Discarded: + answ = "Nesting Discarded"; + break; + default: + break; + } + } + catch + { } + return answ; + } /// diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 81c7b15..d27c1aa 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -47,14 +47,7 @@ namespace NKC_WF.WebUserControls /// public string BStatus(object _status) { - string answ = "nd"; - try - { - var bStatus = Enum.Parse(typeof(ComLib.BatchStatus), _status.ToString()); - answ = bStatus.ToString(); - } - catch - { } + string answ = ComLib.BatchStatusDescr(_status); return answ; } } diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx b/NKC_WF/WebUserControls/cmp_batchList.ascx index e610906..e6ea2de 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx @@ -6,6 +6,25 @@
+
+
+
+
+

Batch List

+
+
+ Filter status + + + + + + + + +
+
+
@@ -38,6 +57,10 @@ --%> - + + + + +
diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs index 81b066a..cf6886c 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.cs @@ -24,14 +24,7 @@ namespace NKC_WF.WebUserControls /// public string BStatus(object _status) { - string answ = "nd"; - try - { - var bStatus = Enum.Parse(typeof(ComLib.BatchStatus), _status.ToString()); - answ = bStatus.ToString(); - } - catch - { } + string answ = ComLib.BatchStatusDescr(_status); return answ; } /// diff --git a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs index 4bc151a..a4be3b6 100644 --- a/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchList.ascx.designer.cs @@ -30,6 +30,15 @@ namespace NKC_WF.WebUserControls { /// protected global::NKC_WF.WebUserControls.cmp_batchDetail cmp_batchDetail; + /// + /// Controllo ddlStatus. + /// + /// + /// 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.DropDownList ddlStatus; + /// /// Controllo grView. ///