Merge branch 'release/FixConfermaAndOdlRefresh'

This commit is contained in:
Samuele Locatelli
2022-09-28 18:20:21 +02:00
11 changed files with 453 additions and 319 deletions
+22 -14
View File
@@ -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; ;
}
/// <summary>
/// evento timer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}
+4 -2
View File
@@ -30,7 +30,7 @@
<asp:LinkButton runat="server" ID="lbtFixOdl" OnClick="lbtFixOdl_Click" CssClass="btn btn-warning btn-block"><i class="fa fa-check"></i> Fix ODL</asp:LinkButton>
</div>
</div>
<uc1:cmp_SlaveMachine runat="server" id="cmp_SlaveMachine" />
<uc1:cmp_SlaveMachine runat="server" ID="cmp_SlaveMachine" />
<uc2:mod_ODL ID="mod_ODL1" runat="server" />
</div>
<div class="col-12 col-md-4 col-lg-3 col-xl-2">
@@ -38,4 +38,6 @@
</div>
</div>
</div>
</asp:Content>
<!-- timer refresh dettaglio macchina: 10 sec, 10'000 ms -->
<asp:Timer ID="dtTimerOdlInt" runat="server" Interval="10000" OnTick="Timer1_Tick"></asp:Timer>
</asp:Content>
+20 -4
View File
@@ -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();
}
/// <summary>
/// timeout scaduto
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Timer1_Tick(object sender, EventArgs e)
{
// effettuo verifica attrezzabilità ODL
checkAll();
mod_dettMacchina1.doUpdate();
}
#endregion Protected Methods
}
}
+53 -44
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// 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.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MoonProTablet
@@ -15,120 +15,129 @@ namespace MoonProTablet
{
/// <summary>
/// Controllo mod_dettMacchina1.
/// mod_dettMacchina1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
/// <summary>
/// Controllo divSelMacc.
/// divSelMacc control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSelMacc;
/// <summary>
/// Controllo ddlSubMacc.
/// ddlSubMacc control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSubMacc;
/// <summary>
/// Controllo ods.
/// ods control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
/// <summary>
/// Controllo divWarn.
/// divWarn control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWarn;
/// <summary>
/// Controllo lblWarningHead.
/// lblWarningHead control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWarningHead;
/// <summary>
/// Controllo lblWarningBody.
/// lblWarningBody control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWarningBody;
/// <summary>
/// Controllo lblNumPz2Conf.
/// lblNumPz2Conf control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumPz2Conf;
/// <summary>
/// Controllo divPz2Conf.
/// divPz2Conf control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPz2Conf;
/// <summary>
/// Controllo lbtFixOdl.
/// lbtFixOdl control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtFixOdl;
/// <summary>
/// Controllo cmp_SlaveMachine.
/// cmp_SlaveMachine control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.cmp_SlaveMachine cmp_SlaveMachine;
/// <summary>
/// Controllo mod_ODL1.
/// mod_ODL1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_ODL mod_ODL1;
/// <summary>
/// Controllo mod_directLinks.
/// mod_directLinks control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks;
/// <summary>
/// dtTimerOdlInt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer dtTimerOdlInt;
}
}
+39 -3
View File
@@ -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;
}
/// <summary>
/// url completo immagine icona
/// </summary>
+8 -2
View File
@@ -91,7 +91,12 @@
<div class="col-6 py-1 text-left text-uppercase">
<b>Dati Globali ODL</b>
</div>
<div class="col-6 text-right"><sub>Inizio ODL --> <%: dtReqUpdate.ToString() %></sub></div>
<div class="col-6 text-right" id="divPeriodo">
<sub>Periodo ODL calcolato:
<asp:Label runat="server" ID="lblInizio">[dtInizio]</asp:Label>
-
<asp:Label runat="server" ID="lblFine">[dtFine]</asp:Label></sub>
</div>
<div class="col-6 col-sm-3 pr-1 py-0 text-right">
<div class="alert alert-warning py-1">
<div class="text-truncate">
@@ -137,4 +142,5 @@
<div class="col-12">
<asp:Label runat="server" ID="lblOut" ForeColor="Red" />
</div>
</div>
</div>
<asp:HiddenField runat="server" ID="hfDtReqUpdate" />
+204 -180
View File
@@ -35,8 +35,96 @@ namespace MoonProTablet.WebUserControls
#endregion Public Events
#region Public Properties
/// <summary>
/// restituisce css disabled SE odl NON OK...
/// </summary>
public string cssBtnConf
{
get
{
return odlOk ? "" : "disabled";
}
}
/// <summary>
/// Data-Ora ultimo update valori produzione
/// </summary>
public DateTime dtReqUpdate
{
get
{
DateTime answ = DateTime.Now;
DateTime.TryParse(hfDtReqUpdate.Value, out answ);
return answ;
}
set
{
hfDtReqUpdate.Value = $"{value}";
}
}
/// <summary>
/// Verifica ODL OK (ovvero caricato x macchina...)
/// </summary>
public bool odlOk
{
get
{
bool answ = true;
// se ODL > 0 è ok!!!
answ = (idxOdl > 0);
return answ;
}
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Aggiorno valori produzione alla data richiesta...
/// </summary>
/// <param name="newDate"></param>
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();
}
}
/// <summary>
/// Numero pezzi PRODOTTI da ultima conferma
/// </summary>
protected DateTime dtInizio
{
set
{
lblInizio.Text = value.ToString();
}
}
/// <summary>
/// Numero pezzi PRODOTTI da ultima conferma
/// </summary>
@@ -105,7 +193,8 @@ namespace MoonProTablet.WebUserControls
/// <summary>
/// Numero pezzi PRODOTTI da registrare
/// </summary> da ultima conferma
/// </summary>
/// 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();
}
/// <summary>
/// restituisce css disabled SE odl NON OK...
/// salvo produzione
/// </summary>
public string cssBtnConf
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// cambio stato visibilità pannello e testo button
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtShowConfProd_Click(object sender, EventArgs e)
{
showInnov = !showInnov;
switchBtnConferma(showInnov);
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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());
}
}
}
}
/// <summary>
/// Data-Ora ultimo update valori produzione
/// Update pz lasciati --&gt; aggiorno!
/// </summary>
public DateTime dtReqUpdate
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// Verifica ODL OK (ovvero caricato x macchina...)
/// update post modifica pz buoni
/// </summary>
public bool odlOk
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// ODL correntemente sulla macchina
/// - cerca in Redis (TTL 5 sec)
/// - altrimenti recupera da DB...
/// </summary>
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
}
/// <summary>
/// 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)
/// </summary>
private bool effettuaConfermaProd()
{
@@ -273,7 +447,7 @@ namespace MoonProTablet.WebUserControls
}
/// <summary>
/// Se la machcina è MULTI --> mostro selettore
/// Se la machcina è MULTI --&gt; mostro selettore
/// </summary>
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();
}
/// <summary>
/// salvo produzione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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();
}
/// <summary>
/// cambio stato visibilità pannello e testo button
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtShowConfProd_Click(object sender, EventArgs e)
{
showInnov = !showInnov;
switchBtnConferma(showInnov);
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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());
}
}
}
}
/// <summary>
/// Update pz lasciati --> aggiorno!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtNumLasciati_TextChanged(object sender, EventArgs e)
{
lblOut.Text = "";
updatePzBuoni();
}
/// <summary>
/// update post modifica pz buoni
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtNumPezzi_TextChanged(object sender, EventArgs e)
{
lblOut.Text = "";
updatePzBuoni();
}
/// <summary>
/// ODL correntemente sulla macchina
/// - cerca in Redis (TTL 5 sec)
/// - altrimenti recupera da DB...
/// </summary>
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
/// <summary>
/// Aggiorno valori produzione alla data richiesta...
/// </summary>
/// <param name="newDate"></param>
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
}
}
+27
View File
@@ -203,6 +203,24 @@ namespace MoonProTablet.WebUserControls
/// </remarks>
protected global::System.Web.UI.UpdateProgress updtRicerca;
/// <summary>
/// lblInizio control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblInizio;
/// <summary>
/// lblFine control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblFine;
/// <summary>
/// lblPz2RecTot control.
/// </summary>
@@ -247,5 +265,14 @@ namespace MoonProTablet.WebUserControls
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOut;
/// <summary>
/// hfDtReqUpdate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfDtReqUpdate;
}
}
+9 -2
View File
@@ -24,11 +24,18 @@
<asp:Label runat="server" ID="lblODC" Text='<%# Eval("idxODL","ODL {0}") + " | " + keyRichiesta %>' />
</div>
<div class='col-12 px-1 <%# Eval("Semaforo") %>'>
<div class="d-flex">
<div class="d-flex justify-content-between">
<div class="p-1 mr-auto">
<b>
<asp:Label runat="server" ID="lblStato" Text='<%# Eval("DescrizioneStato") %>' /></b>
</div>
<div class="p-1">
<asp:UpdateProgress ID="updtRicerca" runat="server" DisplayAfter="1" DynamicLayout="true">
<ProgressTemplate>
<i class="fa fa-spinner fa-pulse"></i>&nbsp;
</ProgressTemplate>
</asp:UpdateProgress>
</div>
<div class="p-1">
<asp:Label runat="server" ID="lblDurata" Text='<%# formatDurata(Eval("Durata")) %>' />
</div>
@@ -70,4 +77,4 @@
<asp:Timer ID="dmTimer" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</asp:UpdatePanel>
+39 -40
View File
@@ -35,46 +35,6 @@ namespace MoonProTablet.WebUserControls
#endregion Public Properties
#region Protected Methods
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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");
}
}
/// <summary>
/// timeout scaduto
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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", "<script type='text/javascript'>$('div').trigger('create');</script>", false);
ScriptManager.RegisterStartupScript(Page, GetType(), "temp", "<script type='text/javascript'>$('#dettMacch').trigger('create');</script>", false);
}
#endregion Protected Methods
#region Public Methods
/// <summary>
@@ -173,5 +133,44 @@ namespace MoonProTablet.WebUserControls
}
#endregion Public Methods
#region Protected Methods
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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");
}
}
/// <summary>
/// timeout scaduto
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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", "<script type='text/javascript'>$('#dettMacch').trigger('create');</script>", false);
}
#endregion Protected Methods
}
}
@@ -6,6 +6,34 @@ namespace MoonProTablet.WebUserControls
{
public partial class mod_dettaglioProd : BaseUserControl
{
#region Protected Methods
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}