From 84d09782460d2186adea471265d7fe1f022e3cf1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 6 Oct 2018 09:53:13 +0200 Subject: [PATCH] =?UTF-8?q?condizionata=20visibilit=C3=A0=20gestione=20"Pe?= =?UTF-8?q?zzi=20lasciati"=20da=20tab=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MP-TAB/WebUserControls/mod_confProd.ascx.cs | 22 +++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index 0a12d01a..611766a3 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -50,8 +50,8 @@ namespace MoonProTablet.WebUserControls if (!Page.IsPostBack) { checkAll(); - resetParam(); - doUpdate(); + //resetParam(); + //doUpdate(); } } /// @@ -194,6 +194,7 @@ namespace MoonProTablet.WebUserControls } private void checkAll() { + checkConfig(); fixSelMacc(); checkOdl(); lblOut.Text = ""; @@ -201,6 +202,16 @@ namespace MoonProTablet.WebUserControls lbtShowConfProd.Visible = odlOk; lblConfProd.Visible = !odlOk; } + /// + /// verifica config x modalità permesse + /// + private void checkConfig() + { + // verifico SE sia permesso gestire i "Pezzi lasciati" in macchina... + lblNumLasciati.Visible = memLayer.ML.cdvb("enablePzProdLasciati"); + txtNumLasciati.Visible = memLayer.ML.cdvb("enablePzProdLasciati"); + } + /// /// Verifica se abbia un ODL ATTIVO /// @@ -363,7 +374,6 @@ namespace MoonProTablet.WebUserControls /// protected void lbtSalva_Click(object sender, EventArgs e) { - //Thread.Sleep(3000); if (memLayer.ML.CRI("modoConfProd") == 2) { confermaPerTurni(); @@ -377,7 +387,7 @@ namespace MoonProTablet.WebUserControls // 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); + switchBtnConferma(!txtNumPezzi.Enabled); // sollevo evento! if (eh_newVal != null) { @@ -390,14 +400,14 @@ namespace MoonProTablet.WebUserControls /// private void confermaPerGiorni() { - DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); } /// /// effettua conferma per turni della produzione /// private void confermaPerTurni() { - DataLayer.obj.confermaProdMacchina(idxMacchina.ToString(), memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); } /// /// update post modifica pz buoni