From 39f6cdd1f3e154933f47568a4f61c1cd355f7b69 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 28 Sep 2022 17:50:19 +0200 Subject: [PATCH] CodeMaid: - reord codice --- MP-TAB/DettaglioMacchina.aspx.cs | 8 +-- MP-TAB/WebUserControls/BaseUserControl.cs | 61 ++++++++++--------- MP-TAB/WebUserControls/mod_confProd.ascx | 10 ++- .../WebUserControls/mod_dettaglioProd.ascx.cs | 56 ++++++++--------- 4 files changed, 70 insertions(+), 65 deletions(-) diff --git a/MP-TAB/DettaglioMacchina.aspx.cs b/MP-TAB/DettaglioMacchina.aspx.cs index 41ad5854..42c9d4e0 100644 --- a/MP-TAB/DettaglioMacchina.aspx.cs +++ b/MP-TAB/DettaglioMacchina.aspx.cs @@ -33,15 +33,15 @@ namespace MoonProTablet mod_confProd1.eh_doUpdate += Mod_confProd1_eh_doUpdate; ; } + #endregion Protected Methods + + #region Private Methods + private void Mod_confProd1_eh_doUpdate(object sender, EventArgs e) { mod_dettMacchina1.doUpdate(); } - #endregion Protected Methods - - #region Private Methods - private void mod_confProd1_eh_newVal(object sender, EventArgs e) { } diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index 56679cfa..ca0643e5 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -149,6 +149,23 @@ namespace MoonProTablet.WebUserControls } } + public DateTime inizioOdl + { + get + { + DateTime answ = DateTime.Now.AddYears(-1); + if (idxOdl > 0) + { + var odlDetail = getCurrOdlRow(); + if (odlDetail != null) + { + answ = odlDetail.DataInizio; + } + } + return answ; + } + } + public string keyRichiesta { get @@ -170,36 +187,6 @@ namespace MoonProTablet.WebUserControls return answ; } } - public DateTime inizioOdl - { - get - { - DateTime answ = DateTime.Now.AddYears(-1); - if (idxOdl > 0) - { - var odlDetail = getCurrOdlRow(); - if (odlDetail != null) - { - answ = odlDetail.DataInizio; - } - } - return answ; - } - } - - public DS_ProdTempi.ODLRow getCurrOdlRow() - { - DS_ProdTempi.ODLRow answ = null; - if (idxOdl > 0) - { - DS_ProdTempi.ODLDataTable odlDetail = DataLayerObj.currODLRowTab(idxMacchina); - if (odlDetail != null && odlDetail.Rows.Count > 0) - { - answ = odlDetail[0]; - } - } - return answ; - } /// /// Num giorni configurati x selezione ODL in scadenza @@ -291,6 +278,20 @@ namespace MoonProTablet.WebUserControls return answ; } + public DS_ProdTempi.ODLRow getCurrOdlRow() + { + DS_ProdTempi.ODLRow answ = null; + if (idxOdl > 0) + { + DS_ProdTempi.ODLDataTable odlDetail = DataLayerObj.currODLRowTab(idxMacchina); + if (odlDetail != null && odlDetail.Rows.Count > 0) + { + answ = odlDetail[0]; + } + } + return answ; + } + /// /// url completo immagine icona /// diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx b/MP-TAB/WebUserControls/mod_confProd.ascx index 9eed46ca..05539683 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx +++ b/MP-TAB/WebUserControls/mod_confProd.ascx @@ -91,8 +91,12 @@
Dati Globali ODL
-
Periodo ODL calcolato: - [dtInizio] - [dtFine]
+
+ Periodo ODL calcolato: + [dtInizio] + - + [dtFine] +
@@ -139,4 +143,4 @@
- \ No newline at end of file + diff --git a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs index 2acc2d21..3fd909c6 100644 --- a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs @@ -6,6 +6,34 @@ namespace MoonProTablet.WebUserControls { public partial class mod_dettaglioProd : BaseUserControl { + #region Protected Methods + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + if (enableSchedaTecnica) + { + checkLottiOdl(); + } + } + try + { + popolaLabels(); + } + catch (Exception exc) + { + logger.lg.scriviLog($"Eccezione in popolaLablels:{Environment.NewLine}{exc}"); + } + } + + #endregion Protected Methods + #region Private Methods private void checkLottiOdl() @@ -132,33 +160,5 @@ namespace MoonProTablet.WebUserControls } #endregion Private Methods - - #region Protected Methods - - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - if (enableSchedaTecnica) - { - checkLottiOdl(); - } - } - try - { - popolaLabels(); - } - catch (Exception exc) - { - logger.lg.scriviLog($"Eccezione in popolaLablels:{Environment.NewLine}{exc}"); - } - } - - #endregion Protected Methods } } \ No newline at end of file