diff --git a/MP-TAB/DettaglioMacchina.aspx.cs b/MP-TAB/DettaglioMacchina.aspx.cs index 94a74509..6014ea2b 100644 --- a/MP-TAB/DettaglioMacchina.aspx.cs +++ b/MP-TAB/DettaglioMacchina.aspx.cs @@ -6,17 +6,17 @@ namespace MoonProTablet { public partial class DettaglioMacchina : BasePage { - #region Private Methods + #region Public Methods - private void mod_confProd1_eh_newVal(object sender, EventArgs e) + public override void Dispose() { + mod_confProd1.eh_newVal -= mod_confProd1_eh_newVal; + mod_confProd1.eh_reset -= mod_confProd1_eh_reset; + mod_confProd1.eh_doUpdate -= Mod_confProd1_eh_doUpdate; ; + base.Dispose(); } - private void mod_confProd1_eh_reset(object sender, EventArgs e) - { - } - - #endregion Private Methods + #endregion Public Methods #region Protected Methods @@ -31,18 +31,26 @@ namespace MoonProTablet } mod_confProd1.eh_newVal += mod_confProd1_eh_newVal; mod_confProd1.eh_reset += mod_confProd1_eh_reset; + mod_confProd1.eh_doUpdate += Mod_confProd1_eh_doUpdate; ; } - /// - /// evento timer - /// - /// - /// - protected void Timer1_Tick(object sender, EventArgs e) + #endregion Protected Methods + + #region Private Methods + + private void Mod_confProd1_eh_doUpdate(object sender, EventArgs e) { mod_dettMacchina1.doUpdate(); } - #endregion Protected Methods + private void mod_confProd1_eh_newVal(object sender, EventArgs e) + { + } + + private void mod_confProd1_eh_reset(object sender, EventArgs e) + { + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/MP-TAB/ODL.aspx b/MP-TAB/ODL.aspx index bbbd76e7..aee21183 100644 --- a/MP-TAB/ODL.aspx +++ b/MP-TAB/ODL.aspx @@ -30,7 +30,7 @@ Fix ODL - +
@@ -38,4 +38,6 @@
- \ No newline at end of file + + + diff --git a/MP-TAB/ODL.aspx.cs b/MP-TAB/ODL.aspx.cs index e56b9b85..f7e86095 100644 --- a/MP-TAB/ODL.aspx.cs +++ b/MP-TAB/ODL.aspx.cs @@ -220,16 +220,32 @@ namespace MoonProTablet { if (!Page.IsPostBack) { + dtTimerOdlInt.Interval = memLayer.ML.CRI("dtTimerOdlInt"); checkAll(); - if (isMulti) - { - mod_dettMacchina1.doUpdate(); - } + mod_dettMacchina1.doUpdate(); } fixDisplaySlave(); mod_ODL1.eh_reqUpdate += Mod_ODL1_eh_reqUpdate; } + public override void Dispose() + { + mod_ODL1.eh_reqUpdate -= Mod_ODL1_eh_reqUpdate; + base.Dispose(); + } + + /// + /// timeout scaduto + /// + /// + /// + protected void Timer1_Tick(object sender, EventArgs e) + { + // effettuo verifica attrezzabilità ODL + checkAll(); + mod_dettMacchina1.doUpdate(); + } + #endregion Protected Methods } } \ No newline at end of file diff --git a/MP-TAB/ODL.aspx.designer.cs b/MP-TAB/ODL.aspx.designer.cs index 55c96416..be37d3e1 100644 --- a/MP-TAB/ODL.aspx.designer.cs +++ b/MP-TAB/ODL.aspx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace MoonProTablet @@ -15,120 +15,129 @@ namespace MoonProTablet { /// - /// Controllo mod_dettMacchina1. + /// mod_dettMacchina1 control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1; /// - /// Controllo divSelMacc. + /// divSelMacc control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSelMacc; /// - /// Controllo ddlSubMacc. + /// ddlSubMacc control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlSubMacc; /// - /// Controllo ods. + /// ods control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; /// - /// Controllo divWarn. + /// divWarn control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWarn; /// - /// Controllo lblWarningHead. + /// lblWarningHead control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblWarningHead; /// - /// Controllo lblWarningBody. + /// lblWarningBody control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblWarningBody; /// - /// Controllo lblNumPz2Conf. + /// lblNumPz2Conf control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblNumPz2Conf; /// - /// Controllo divPz2Conf. + /// divPz2Conf control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPz2Conf; /// - /// Controllo lbtFixOdl. + /// lbtFixOdl control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lbtFixOdl; /// - /// Controllo cmp_SlaveMachine. + /// cmp_SlaveMachine control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::MoonProTablet.WebUserControls.cmp_SlaveMachine cmp_SlaveMachine; /// - /// Controllo mod_ODL1. + /// mod_ODL1 control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::MoonProTablet.WebUserControls.mod_ODL mod_ODL1; /// - /// Controllo mod_directLinks. + /// mod_directLinks control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks; + + /// + /// dtTimerOdlInt control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.Timer dtTimerOdlInt; } } diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index 75bc7d9e..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 @@ -156,10 +173,15 @@ namespace MoonProTablet.WebUserControls string answ = ""; if (idxOdl > 0) { - var odlDetail = DataLayerObj.currODLRowTab(idxMacchina); - if (odlDetail != null && odlDetail.Rows.Count > 0) + //var odlDetail = DataLayerObj.currODLRowTab(idxMacchina); + //if (odlDetail != null && odlDetail.Rows.Count > 0) + //{ + // answ = odlDetail[0].KeyRichiesta; + //} + var odlDetail = getCurrOdlRow(); + if (odlDetail != null) { - answ = odlDetail[0].KeyRichiesta; + answ = odlDetail.KeyRichiesta; } } return answ; @@ -256,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 033117c2..05539683 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx +++ b/MP-TAB/WebUserControls/mod_confProd.ascx @@ -91,7 +91,12 @@
Dati Globali ODL
-
Inizio ODL --> <%: dtReqUpdate.ToString() %>
+
+ Periodo ODL calcolato: + [dtInizio] + - + [dtFine] +
@@ -137,4 +142,5 @@
-
\ No newline at end of file +
+ diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index dddbd7e5..6288bdcf 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -35,8 +35,96 @@ namespace MoonProTablet.WebUserControls #endregion Public Events + #region Public Properties + + /// + /// restituisce css disabled SE odl NON OK... + /// + public string cssBtnConf + { + get + { + return odlOk ? "" : "disabled"; + } + } + + /// + /// Data-Ora ultimo update valori produzione + /// + public DateTime dtReqUpdate + { + get + { + DateTime answ = DateTime.Now; + DateTime.TryParse(hfDtReqUpdate.Value, out answ); + return answ; + } + set + { + hfDtReqUpdate.Value = $"{value}"; + } + } + + /// + /// Verifica ODL OK (ovvero caricato x macchina...) + /// + public bool odlOk + { + get + { + bool answ = true; + // se ODL > 0 è ok!!! + answ = (idxOdl > 0); + return answ; + } + } + + #endregion Public Properties + + #region Public Methods + + /// + /// Aggiorno valori produzione alla data richiesta... + /// + /// + public void doUpdate() + { + datiProdAct = DataLayerObj.taStatoProd.GetData(idxMacchinaSel, dtReqUpdate)[0]; + // aggiorno visualizzazione... + numPzProdotti = datiProdAct.PzTotODL; + numPz2Rec = datiProdAct.Pz2RecTot; + numPzScaConf = datiProdAct.PzConfScarto; + numPzBuoniConf = datiProdAct.PzConfBuoni; + numPzProdotti2Rec = datiProdAct.Pz2RecTot; + numPzScarto2Rec = datiProdAct.Pz2RecScarto; + dtInizio = inizioOdl; + dtFine = dtReqUpdate; + reportUpdate(); + } + + #endregion Public Methods + #region Protected Properties + protected DateTime dtFine + { + set + { + lblFine.Text = value.ToString(); + } + } + + /// + /// Numero pezzi PRODOTTI da ultima conferma + /// + protected DateTime dtInizio + { + set + { + lblInizio.Text = value.ToString(); + } + } + /// /// Numero pezzi PRODOTTI da ultima conferma /// @@ -105,7 +193,8 @@ namespace MoonProTablet.WebUserControls /// /// Numero pezzi PRODOTTI da registrare - /// da ultima conferma + /// + /// da ultima conferma protected int numPzProdotti2Rec { set @@ -173,51 +262,135 @@ namespace MoonProTablet.WebUserControls #endregion Protected Properties - #region Public Properties + #region Protected Methods + + protected void ddlSubMacc_DataBound(object sender, EventArgs e) + { + // se ho in memoria un valore LO REIMPOSTO... + if (!string.IsNullOrEmpty(subMaccSel)) + { + // se è una SUB machcina (contiene "#") + if (subMaccSel.Contains("#")) + { + // provo a preselezionare... + try + { + ddlSubMacc.SelectedValue = subMaccSel; + } + catch + { } + } + // altrimenti salvo! + else + { + subMaccSel = ddlSubMacc.SelectedValue; + } + } + } + + protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) + { + subMaccSel = ddlSubMacc.SelectedValue; + // salvo ODL + DataLayerObj.taMSE.getByIdxMaccAndSub(idxMacchinaSel, subMaccSel); + //altri controlli + checkAll(); + } /// - /// restituisce css disabled SE odl NON OK... + /// salvo produzione /// - public string cssBtnConf + /// + /// + protected void lbtSalva_Click(object sender, EventArgs e) { - get + // effettua conferma con conf da DB del tipo (giorni / turni / periodo + bool fatto = effettuaConfermaProd(); + // refresh tabella dati tablet... + DataLayerObj.taMSE.forceRecalc(0, idxMacchinaSel); + // mostro output + lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! (+{1} pz scarto) alle {2:yyyy-MM-dd HH:mm:ss}", numPzConfermati, numPzScarto2Rec, dtReqUpdate); + // cambio button conferma... + switchBtnConferma(!txtNumPezzi.Enabled); + // sollevo evento! + if (eh_newVal != null) { - return odlOk ? "" : "disabled"; + eh_newVal(this, new EventArgs()); + } + dtReqUpdate = DateTime.Now; + doUpdate(); + } + + /// + /// cambio stato visibilità pannello e testo button + /// + /// + /// + protected void lbtShowConfProd_Click(object sender, EventArgs e) + { + showInnov = !showInnov; + switchBtnConferma(showInnov); + } + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + checkAll(); + if (isMulti) + { + // sollevo evento! + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + } } } /// - /// Data-Ora ultimo update valori produzione + /// Update pz lasciati --> aggiorno! /// - public DateTime dtReqUpdate + /// + /// + protected void txtNumLasciati_TextChanged(object sender, EventArgs e) { - get - { - DateTime answ = DateTime.Now; - DateTime.TryParse(memLayer.ML.StringSessionObj("dtReqUpdate"), out answ); - return answ; - } - set - { - memLayer.ML.setSessionVal("dtReqUpdate", value); - } + lblOut.Text = ""; + updatePzBuoni(); } /// - /// Verifica ODL OK (ovvero caricato x macchina...) + /// update post modifica pz buoni /// - public bool odlOk + /// + /// + protected void txtNumPezzi_TextChanged(object sender, EventArgs e) { - get - { - bool answ = true; - // se ODL > 0 è ok!!! - answ = (idxOdl > 0); - return answ; - } + lblOut.Text = ""; + updatePzBuoni(); } - #endregion Public Properties + /// + /// ODL correntemente sulla macchina + /// - cerca in Redis (TTL 5 sec) + /// - altrimenti recupera da DB... + /// + protected void updateOdl() + { + // userò ODL del turno + int answ = 0; + // cerco da redis... + int.TryParse(DataLayerObj.currODL(idxMacchinaSel, true), out answ); + // salvo! + idxOdl = answ; + } + + #endregion Protected Methods #region Private Methods @@ -255,7 +428,8 @@ namespace MoonProTablet.WebUserControls } /// - /// Registra conferma produzione in modalità nuova (con rettifica pezzi lasciati) o legacy (con anticipo periodo) + /// Registra conferma produzione in modalità nuova (con rettifica pezzi lasciati) o legacy + /// (con anticipo periodo) /// private bool effettuaConfermaProd() { @@ -273,7 +447,7 @@ namespace MoonProTablet.WebUserControls } /// - /// Se la machcina è MULTI --> mostro selettore + /// Se la machcina è MULTI --> mostro selettore /// private void fixSelMacc() { @@ -373,155 +547,5 @@ namespace MoonProTablet.WebUserControls } #endregion Private Methods - - #region Protected Methods - - protected void ddlSubMacc_DataBound(object sender, EventArgs e) - { - // se ho in memoria un valore LO REIMPOSTO... - if (!string.IsNullOrEmpty(subMaccSel)) - { - // se è una SUB machcina (contiene "#") - if (subMaccSel.Contains("#")) - { - // provo a preselezionare... - try - { - ddlSubMacc.SelectedValue = subMaccSel; - } - catch - { } - } - // altrimenti salvo! - else - { - subMaccSel = ddlSubMacc.SelectedValue; - } - } - } - - protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) - { - subMaccSel = ddlSubMacc.SelectedValue; - // salvo ODL - DataLayerObj.taMSE.getByIdxMaccAndSub(idxMacchinaSel, subMaccSel); - //altri controlli - checkAll(); - } - - /// - /// salvo produzione - /// - /// - /// - protected void lbtSalva_Click(object sender, EventArgs e) - { - // effettua conferma con conf da DB del tipo (giorni / turni / periodo - bool fatto = effettuaConfermaProd(); - // refresh tabella dati tablet... - DataLayerObj.taMSE.forceRecalc(0, idxMacchinaSel); - // mostro output - lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! (+{1} pz scarto) alle {2:yyyy-MM-dd HH:mm:ss}", numPzConfermati, numPzScarto2Rec, dtReqUpdate); - // cambio button conferma... - switchBtnConferma(!txtNumPezzi.Enabled); - // sollevo evento! - if (eh_newVal != null) - { - eh_newVal(this, new EventArgs()); - } - dtReqUpdate = DateTime.Now; - doUpdate(); - } - - /// - /// cambio stato visibilità pannello e testo button - /// - /// - /// - protected void lbtShowConfProd_Click(object sender, EventArgs e) - { - showInnov = !showInnov; - switchBtnConferma(showInnov); - } - - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - checkAll(); - if (isMulti) - { - // sollevo evento! - if (eh_reset != null) - { - eh_reset(this, new EventArgs()); - } - } - } - } - - /// - /// Update pz lasciati --> aggiorno! - /// - /// - /// - protected void txtNumLasciati_TextChanged(object sender, EventArgs e) - { - lblOut.Text = ""; - updatePzBuoni(); - } - - /// - /// update post modifica pz buoni - /// - /// - /// - protected void txtNumPezzi_TextChanged(object sender, EventArgs e) - { - lblOut.Text = ""; - updatePzBuoni(); - } - - /// - /// ODL correntemente sulla macchina - /// - cerca in Redis (TTL 5 sec) - /// - altrimenti recupera da DB... - /// - protected void updateOdl() - { - // userò ODL del turno - int answ = 0; - // cerco da redis... - int.TryParse(DataLayerObj.currODL(idxMacchinaSel, true), out answ); - // salvo! - idxOdl = answ; - } - - #endregion Protected Methods - - #region Public Methods - - /// - /// Aggiorno valori produzione alla data richiesta... - /// - /// - public void doUpdate() - { - datiProdAct = DataLayerObj.taStatoProd.GetData(idxMacchinaSel, dtReqUpdate)[0]; - // aggiorno visualizzazione... - numPzProdotti = datiProdAct.PzTotODL; - numPz2Rec = datiProdAct.Pz2RecTot; - numPzScaConf = datiProdAct.PzConfScarto; - numPzBuoniConf = datiProdAct.PzConfBuoni; - numPzProdotti2Rec = datiProdAct.Pz2RecTot; - numPzScarto2Rec = datiProdAct.Pz2RecScarto; - } - - #endregion Public Methods } } \ No newline at end of file diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs index f719d59f..89a61148 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.designer.cs @@ -203,6 +203,24 @@ namespace MoonProTablet.WebUserControls /// protected global::System.Web.UI.UpdateProgress updtRicerca; + /// + /// lblInizio control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblInizio; + + /// + /// lblFine control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblFine; + /// /// lblPz2RecTot control. /// @@ -247,5 +265,14 @@ namespace MoonProTablet.WebUserControls /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblOut; + + /// + /// hfDtReqUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfDtReqUpdate; } } diff --git a/MP-TAB/WebUserControls/mod_dettMacchina.ascx b/MP-TAB/WebUserControls/mod_dettMacchina.ascx index 22b49e45..04322e1d 100644 --- a/MP-TAB/WebUserControls/mod_dettMacchina.ascx +++ b/MP-TAB/WebUserControls/mod_dettMacchina.ascx @@ -24,11 +24,18 @@
-
+
+
+ + +   + + +
@@ -70,4 +77,4 @@ - \ No newline at end of file + diff --git a/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs b/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs index 3d02c507..46420bff 100644 --- a/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dettMacchina.ascx.cs @@ -35,46 +35,6 @@ namespace MoonProTablet.WebUserControls #endregion Public Properties - #region Protected Methods - - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - dmTimer.Interval = memLayer.ML.CRI("dtTimerInt"); - } - // controllo se ho dett macchina altrimenti ritorno a pagina generale... - if (idxMacchina == "") - { - Response.Redirect("~/MappaStato.aspx"); - } - } - - /// - /// timeout scaduto - /// - /// - /// - protected void Timer1_Tick(object sender, EventArgs e) - { - // sollevo evento! - if (eh_reqRemoveModal != null) - { - eh_reqRemoveModal(this, new EventArgs()); - } - // update - doUpdate(); - //ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "", false); - ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "", false); - } - - #endregion Protected Methods - #region Public Methods /// @@ -173,5 +133,44 @@ namespace MoonProTablet.WebUserControls } #endregion Public Methods + + #region Protected Methods + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + dmTimer.Interval = memLayer.ML.CRI("dtTimerInt"); + } + // controllo se ho dett macchina altrimenti ritorno a pagina generale... + if (idxMacchina == "") + { + Response.Redirect("~/MappaStato.aspx"); + } + } + + /// + /// timeout scaduto + /// + /// + /// + protected void Timer1_Tick(object sender, EventArgs e) + { + // sollevo evento! + if (eh_reqRemoveModal != null) + { + eh_reqRemoveModal(this, new EventArgs()); + } + // update + doUpdate(); + ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "", false); + } + + #endregion Protected Methods } } \ 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