From 4515e67f8c6907d4e46d6314d0cc1d99f7c3e0b3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 3 Sep 2019 18:29:30 +0200 Subject: [PATCH] formattazione stages PROD --- NKC_WF/WebUserControls/cmp_ML_ShDet.ascx | 163 ++++++++---------- NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.cs | 34 ++-- .../cmp_ML_ShDet.ascx.designer.cs | 18 -- 3 files changed, 92 insertions(+), 123 deletions(-) diff --git a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx index 3ba717b..7db3ed7 100644 --- a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx +++ b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx @@ -2,93 +2,78 @@ - + + + + + + + + + diff --git a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.cs b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.cs index fdc614c..483e1e8 100644 --- a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.cs @@ -54,11 +54,13 @@ namespace NKC_WF.WebUserControls } } - private void fixCss() + public string getCss(object _status) { + string answ = ""; + int status = -10; + int.TryParse(_status.ToString(), out status); string colore = "dark"; - divBlock.Attributes.Remove("class"); - switch (StatusReqStart) + switch (status) { case -1: colore = "primary"; @@ -76,39 +78,39 @@ namespace NKC_WF.WebUserControls colore = "secondary"; break; } - string classe = $"alert alert-{colore} border border-{colore} border-thick row"; - divBlock.Attributes.Add("class", classe); + answ = $"alert-{colore} border border-{colore}"; + return answ; } public void doUpdate() { - // imposto css - fixCss(); - // imposto titolo - fixTitle(); // sistemo filtraggio frmView } - private void fixTitle() + public string getTitle(object _status) { - switch (StatusReqStart) + string answ = ""; + int status = -10; + int.TryParse(_status.ToString(), out status); + switch (status) { case -1: - lblTitle.Text = traduci("LoadData"); + answ = traduci("LoadData"); break; case 1: - lblTitle.Text = traduci("PrintData"); + answ = traduci("PrintData"); break; case 3: - lblTitle.Text = traduci("MachineData"); + answ = traduci("MachineData"); break; case 5: - lblTitle.Text = traduci("UnloadData"); + answ = traduci("UnloadData"); break; default: - lblTitle.Text = traduci("NA"); + answ = traduci("NA"); break; } + return answ; } } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.designer.cs index 3f33793..5dce0c6 100644 --- a/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_ML_ShDet.ascx.designer.cs @@ -12,24 +12,6 @@ namespace NKC_WF.WebUserControls { public partial class cmp_ML_ShDet { - /// - /// Controllo divBlock. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBlock; - - /// - /// Controllo lblTitle. - /// - /// - /// 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.Label lblTitle; - /// /// Controllo hfStatus. ///