diff --git a/MP-Tablet/DettaglioMacchina.aspx.cs b/MP-Tablet/DettaglioMacchina.aspx.cs index 7605db11..2cfe165e 100644 --- a/MP-Tablet/DettaglioMacchina.aspx.cs +++ b/MP-Tablet/DettaglioMacchina.aspx.cs @@ -27,9 +27,17 @@ namespace MoonProTablet { Session["TipoLink"] = "DetMacc"; } - mod_confProd1.eh_inserting += mod_confProd1_eh_inserting; +#if false + mod_confProd1.eh_inserting += mod_confProd1_eh_inserting; +#endif mod_confProd1.eh_newVal += mod_confProd1_eh_newVal; mod_confProd1.eh_reset += mod_confProd1_eh_reset; + mod_regScarti.eh_newVal += Mod_regScarti_eh_newVal; + } + + private void Mod_regScarti_eh_newVal(object sender, EventArgs e) + { + mod_confProd1.doUpdate(); } void mod_confProd1_eh_reset(object sender, EventArgs e) @@ -40,9 +48,11 @@ namespace MoonProTablet { } +#if false void mod_confProd1_eh_inserting(object sender, EventArgs e) { - } + } +#endif /// /// evento timer /// diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx b/MP-Tablet/WebUserControls/mod_confProd.ascx index b9c3b80c..79cd7353 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx @@ -6,23 +6,23 @@ Dati Globali ODL
Inizio ODL --> <%: dtReqUpdate.ToString() %>
-
+
Pz Prodotti TOT [A+B+C]
- [A+B+C] + [A+B+C]
-
+
[A] NUOVI Pz.Prod
- [A] + [A]
@@ -32,7 +32,9 @@ [B] Scarti VERS + PEND
- [B1] + [B2] + [B1] + + + [B2]
@@ -42,7 +44,7 @@ [C] Pz Buoni VERS.
- [C] + [C]
@@ -78,19 +80,27 @@
ultima conferma --> <%: dtReqUpdate.ToString() %>
-
+
- +
-
- - +
+
+
+ + +
+
+ + + +
+
+ + +
+
-
- - -
-
+
CONFERMA
diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs index a59aeec4..dddfa043 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs @@ -49,13 +49,13 @@ namespace MoonProTablet.WebUserControls if (!Page.IsPostBack) { checkAll(); - updateProdData(); + doUpdate(); } } /// /// Aggiorno valori produzione... /// - private void updateProdData() + public void doUpdate() { dtReqUpdate = DateTime.Now; datiProdAct = DataLayer.obj.taStatoProd.GetData(idxMacchina, dtReqUpdate)[0]; @@ -156,7 +156,7 @@ namespace MoonProTablet.WebUserControls answ = Convert.ToInt32(txtNumScarti.Text); } catch - { } + { } return answ; } } @@ -297,13 +297,11 @@ namespace MoonProTablet.WebUserControls private void switchBtnConferma(bool showConf) { // aggiorno valori rilevati - updateProdData(); + doUpdate(); divInnovazioni.Visible = showConf; if (showConf) { // continuo update - txtNumPezzi.Enabled = showConf; - txtNumScarti.Enabled = false;// showConf; lbtSalva.Visible = showConf; try { diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs b/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs index 00c70ac6..c648b7b6 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs @@ -165,6 +165,24 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.WebControls.TextBox txtNumScarti; + /// + /// Controllo Label2. + /// + /// + /// 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 Label2; + + /// + /// Controllo lblPlus. + /// + /// + /// 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 lblPlus; + /// /// Controllo lblPzBuoni. /// diff --git a/MP-Tablet/WebUserControls/mod_controlliProd.ascx b/MP-Tablet/WebUserControls/mod_controlliProd.ascx index ad899774..346f2738 100644 --- a/MP-Tablet/WebUserControls/mod_controlliProd.ascx +++ b/MP-Tablet/WebUserControls/mod_controlliProd.ascx @@ -1,38 +1,43 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_controlliProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_controlliProd" %> - -
-
- +
+
+
+
+ REGISTRA Controllo - - MANCA ODL: registrazione controlli produzione NON permessa - - - - + + MANCA ODL: registrazione controlli produzione NON permessa + + + + +
+
+ + + + + + +
+
-
- - - - - - -
-
-
-
- OK -
-
- KO -
-
- +
+
+
+ OK +
+
+ KO +
+
+ Note controllo NON superato (opzionali) - - - CONFERMA controllo KO + + + CONFERMA controllo KO +
+
diff --git a/MP-Tablet/WebUserControls/mod_regScarti.ascx b/MP-Tablet/WebUserControls/mod_regScarti.ascx index 93f04557..0490bc9e 100644 --- a/MP-Tablet/WebUserControls/mod_regScarti.ascx +++ b/MP-Tablet/WebUserControls/mod_regScarti.ascx @@ -1,32 +1,52 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_regScarti.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_regScarti" %> - -
-
- +
+
+
+
+ Registra SCARTI - - MANCA ODL: registrazione scarti produzione NON permessa - - - - + + MANCA ODL: registrazione scarti produzione NON permessa + + + + +
+
-
-
-
- Data -
-
- Ora -
-
- NumPz -
-
- -
-
- BtnSalva +
+
+
+
+ Num Pz +
+
+ +
+
+
+
+ Data +
+
+ +
+
+
+
+ Ora +
+
+ +
+
+
+ Salva +
+
+ +
+
diff --git a/MP-Tablet/WebUserControls/mod_regScarti.ascx.cs b/MP-Tablet/WebUserControls/mod_regScarti.ascx.cs index d3767661..d35c9083 100644 --- a/MP-Tablet/WebUserControls/mod_regScarti.ascx.cs +++ b/MP-Tablet/WebUserControls/mod_regScarti.ascx.cs @@ -35,15 +35,37 @@ namespace MoonProTablet.WebUserControls private void checkAll() { -#if false - fixSelMacc(); -#endif + fixData(); checkOdl(); lblOut.Text = ""; switchBtnConferma(false); lbtShowScarti.Visible = odlOk; lblConfScarti.Visible = !odlOk; } + + private void fixData() + { + DateTime adesso = DateTime.Now; + txtData.Text = adesso.ToString("yyyy-MM-dd"); + txtOra.Text = adesso.ToString("HH:mm"); + numPzScarto = 1; + } + /// + /// Num pezzi scarto + /// + protected int numPzScarto + { + set + { + txtNumPz.Text = value.ToString(); + } + get + { + int answ = 0; + int.TryParse(txtNumPz.Text, out answ); + return answ; + } + } /// /// Verifica se abbia un ODL ATTIVO /// @@ -56,22 +78,6 @@ namespace MoonProTablet.WebUserControls /// /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) /// -#if false - protected bool isMulti - { - get - { - return DataLayer.isMulti(idxMacchinaSession); - } - } - /// - /// Se la machcina è MULTI --> mostro selettore - /// - private void fixSelMacc() - { - divSelMacc.Visible = isMulti; - } -#endif /// /// restituisce css disabled SE odl NON OK... /// @@ -115,29 +121,7 @@ namespace MoonProTablet.WebUserControls string answ = memLayer.ML.StringSessionObj("IdxMacchina"); return answ; } -#if false - set - { - memLayer.ML.setSessionVal("IdxMacchina", value); - } -#endif } -#if false - /// - /// idx macchina selezionata - /// - public string idxMacchinaSession - { - get - { - return memLayer.ML.StringSessionObj("IdxMacchina"); - } - set - { - memLayer.ML.setSessionVal("IdxMacchina", value); - } - } -#endif /// /// cambio stato visibilità pannello e testo button /// @@ -174,10 +158,20 @@ namespace MoonProTablet.WebUserControls /// protected void lbtSalva_Click(object sender, EventArgs e) { -#if false - // salvo controllo KO - DataLayer.obj.taRC.insertQuery(idxMacchina, DataLayer.MatrOpr, false, txtNote.Text.Trim(), DateTime.Now); -#endif + // salvo registrazione scarto... + DateTime dataRif = DateTime.Now; + try + { + // ricompongo data dai 2 controlli + DateTime dateOnly; + DateTime timeOnly; + DateTime.TryParse(txtData.Text, out dateOnly); + DateTime.TryParse(txtOra.Text, out timeOnly); + dataRif = dateOnly.Add(timeOnly.TimeOfDay); + } + catch + { } + DataLayer.obj.taRS.insertQuery(idxMacchina, dataRif, "ND", numPzScarto, txtNote.Text.Trim(), DataLayer.MatrOpr); // sollevo evento! if (eh_newVal != null) { @@ -193,34 +187,5 @@ namespace MoonProTablet.WebUserControls switchBtnConferma(false); } - /// - /// Sotto sistema (macchina) selezionato - /// - public string subMaccSel - { - get - { - return memLayer.ML.StringSessionObj("subMaccSel"); - } - set - { - memLayer.ML.setSessionVal("subMaccSel", value); - } - } - - protected void lbtOK_Click(object sender, EventArgs e) - { -#if false - // Salvo controllo come OK - DataLayer.obj.taRC.insertQuery(idxMacchina, DataLayer.MatrOpr, true, "", DateTime.Now); -#endif - // sollevo evento! - if (eh_newVal != null) - { - eh_newVal(this, new EventArgs()); - } - resetControlli(); - } - } } \ No newline at end of file diff --git a/MP-Tablet/WebUserControls/mod_regScarti.ascx.designer.cs b/MP-Tablet/WebUserControls/mod_regScarti.ascx.designer.cs index 90839d8d..9e3a77e6 100644 --- a/MP-Tablet/WebUserControls/mod_regScarti.ascx.designer.cs +++ b/MP-Tablet/WebUserControls/mod_regScarti.ascx.designer.cs @@ -57,6 +57,42 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDetail; + /// + /// Controllo txtNumPz. + /// + /// + /// 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.TextBox txtNumPz; + + /// + /// Controllo txtData. + /// + /// + /// 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.TextBox txtData; + + /// + /// Controllo txtOra. + /// + /// + /// 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.TextBox txtOra; + + /// + /// Controllo lbtSalva. + /// + /// + /// 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.LinkButton lbtSalva; + /// /// Controllo txtNote. /// diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 870e67bf..83593c29 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -47,6 +47,7 @@ namespace MapoDb public DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter taMSE; public DS_ProdTempiTableAdapters.ProduzioneAs400TableAdapter taAs400; public DS_ProdTempiTableAdapters.RegistroControlliTableAdapter taRC; + public DS_ProdTempiTableAdapters.RegistroScartiTableAdapter taRS; public DS_ProdTempiTableAdapters.StatoProdTableAdapter taStatoProd; // table adapter x utility public DS_UtilityTableAdapters.v_selArticoliTableAdapter taSelArt; @@ -90,6 +91,7 @@ namespace MapoDb taMSE = new DS_ProdTempiTableAdapters.MappaStatoExplTableAdapter(); taAs400 = new DS_ProdTempiTableAdapters.ProduzioneAs400TableAdapter(); taRC = new DS_ProdTempiTableAdapters.RegistroControlliTableAdapter(); + taRS = new DS_ProdTempiTableAdapters.RegistroScartiTableAdapter(); taStatoProd = new DS_ProdTempiTableAdapters.StatoProdTableAdapter(); taSelArt = new DS_UtilityTableAdapters.v_selArticoliTableAdapter(); taSelOdlFree = new DS_UtilityTableAdapters.v_selODLTableAdapter(); @@ -132,6 +134,7 @@ namespace MapoDb taMSE.Connection.ConnectionString = connectionString; taAs400.Connection.ConnectionString = connectionString; taRC.Connection.ConnectionString = connectionString; + taRS.Connection.ConnectionString = connectionString; taStatoProd.Connection.ConnectionString = connectionString; taSelArt.Connection.ConnectionString = connectionString; taSelOdlFree.Connection.ConnectionString = connectionString;