From 40b3206296f46ef4f8dd3fbc0afb2feeefbb42d6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 18 Jul 2018 18:48:08 +0200 Subject: [PATCH] continuo bozza modifica x gestione ODL provvisorio --- MP-TAB/ODL.aspx.cs | 2 +- MP-TAB/WebUserControls/cmp_newODL.ascx | 1 + MP-TAB/WebUserControls/cmp_newODL.ascx.cs | 28 +++- .../cmp_newODL.ascx.designer.cs | 9 ++ MP-TAB/WebUserControls/mod_ODL.ascx | 2 +- MP-TAB/WebUserControls/mod_ODL.ascx.cs | 2 + .../WebUserControls/mod_ODL.ascx.designer.cs | 9 ++ MapoDb/DS_ProdTempi.xsd | 31 +++-- MapoDb/DS_ProdTempi.xss | 10 +- MapoDb/DS_ProdTempi1.Designer.cs | 124 +++++++++++++----- 10 files changed, 169 insertions(+), 49 deletions(-) diff --git a/MP-TAB/ODL.aspx.cs b/MP-TAB/ODL.aspx.cs index be2e1be1..658dfb92 100644 --- a/MP-TAB/ODL.aspx.cs +++ b/MP-TAB/ODL.aspx.cs @@ -39,7 +39,7 @@ namespace MoonProTablet get { string answ = memLayer.ML.StringSessionObj("IdxMacchina"); - // verifoc: se multi uso selettore tendina... + // verifico: se multi uso selettore tendina... if (isMulti) { if (ddlSubMacc.SelectedValue == "") diff --git a/MP-TAB/WebUserControls/cmp_newODL.ascx b/MP-TAB/WebUserControls/cmp_newODL.ascx index 52507fb3..4b2e63c1 100644 --- a/MP-TAB/WebUserControls/cmp_newODL.ascx +++ b/MP-TAB/WebUserControls/cmp_newODL.ascx @@ -1,5 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_newODL.ascx.cs" Inherits="MoonProTablet.WebUserControls.cmp_newODL" %> +
diff --git a/MP-TAB/WebUserControls/cmp_newODL.ascx.cs b/MP-TAB/WebUserControls/cmp_newODL.ascx.cs index 1bdfc81b..e693b7b4 100644 --- a/MP-TAB/WebUserControls/cmp_newODL.ascx.cs +++ b/MP-TAB/WebUserControls/cmp_newODL.ascx.cs @@ -1,4 +1,5 @@ -using System; +using MapoDb; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -22,6 +23,20 @@ namespace MoonProTablet.WebUserControls } } /// + /// idxMacchina selezionata + /// + public string idxMacchina + { + get + { + return hfIdxMacchina.Value; + } + set + { + hfIdxMacchina.Value = value; + } + } + /// /// imposta valori std /// private void setDefaults() @@ -34,8 +49,15 @@ namespace MoonProTablet.WebUserControls protected void lbtCreaOdlProvv_Click(object sender, EventArgs e) { // effettua creazione ODL provvisorio e riporta a parent... - - + int numPz = 1; + int.TryParse(txtNumPz.Text, out numPz); + int numMin = 0; + int numSec = 0; + int.TryParse(txtTC_min.Text, out numMin); + int.TryParse(txtTC_sec.Text, out numSec); + decimal tCiclo = numMin + ((decimal)numSec) / 60; + // !!!FARE!!! + //DataLayer.obj.taODL.insertProvv(ddlArticolo.SelectedValue, idxMacchina, numPz, tCiclo, txtNote.Text.Trim()); // invio email notifica creazione ODL PROVVISORIO (da riconciliare...) diff --git a/MP-TAB/WebUserControls/cmp_newODL.ascx.designer.cs b/MP-TAB/WebUserControls/cmp_newODL.ascx.designer.cs index d2909a15..82ef0f40 100644 --- a/MP-TAB/WebUserControls/cmp_newODL.ascx.designer.cs +++ b/MP-TAB/WebUserControls/cmp_newODL.ascx.designer.cs @@ -12,6 +12,15 @@ namespace MoonProTablet.WebUserControls { public partial class cmp_newODL { + /// + /// Controllo hfIdxMacchina. + /// + /// + /// 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.HiddenField hfIdxMacchina; + /// /// Controllo divDetail. /// diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx b/MP-TAB/WebUserControls/mod_ODL.ascx index 8b55cff0..574ea9fb 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx +++ b/MP-TAB/WebUserControls/mod_ODL.ascx @@ -64,7 +64,7 @@
-
+
diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index d40fb55a..51c0ed71 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -38,6 +38,7 @@ namespace MoonProTablet.WebUserControls { memLayer.ML.setSessionVal(string.Format("idxMacchina-{0}", uid), value); hfIdxMacchina.Value = value; + cmp_newODL.idxMacchina = value; } } /// @@ -125,6 +126,7 @@ namespace MoonProTablet.WebUserControls checkBtnStatus(); chkCloseOdl.Checked = memLayer.ML.cdvb("chkCloseOdl"); chkCloseOdl.Visible = memLayer.ML.cdvb("showChkCloseOdl"); + divOdlProvv.Visible = memLayer.ML.cdvb("showOdlProvv"); } /// /// Sistema CSS x status enabled/disabled diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs index d5267e0f..fb5fab51 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs @@ -156,6 +156,15 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.WebControls.LinkButton lbtSplitODL; + /// + /// Controllo divOdlProvv. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divOdlProvv; + /// /// Controllo lbtShowCreaOdlProvv. /// diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 350733d0..b388ad67 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -326,6 +326,21 @@ ORDER BY idxODL DESC + + + + dbo.stp_ODL_insertProvv + + + + + + + + + + + @@ -2422,7 +2437,7 @@ FROM dbo.v_RegistroScarti - + @@ -2503,7 +2518,7 @@ FROM dbo.v_RegistroScarti - + @@ -2532,7 +2547,7 @@ FROM dbo.v_RegistroScarti - + @@ -2544,7 +2559,7 @@ FROM dbo.v_RegistroScarti - + @@ -2569,7 +2584,7 @@ FROM dbo.v_RegistroScarti - + @@ -2607,7 +2622,7 @@ FROM dbo.v_RegistroScarti - + @@ -2646,7 +2661,7 @@ FROM dbo.v_RegistroScarti - + @@ -2712,7 +2727,7 @@ FROM dbo.v_RegistroScarti - + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index c5567033..b1e298c3 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -6,28 +6,28 @@ --> - + - + - + - + - + \ No newline at end of file diff --git a/MapoDb/DS_ProdTempi1.Designer.cs b/MapoDb/DS_ProdTempi1.Designer.cs index ad4f00ea..40d83911 100644 --- a/MapoDb/DS_ProdTempi1.Designer.cs +++ b/MapoDb/DS_ProdTempi1.Designer.cs @@ -15636,7 +15636,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[19]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[20]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM dbo.v_ODL_exp\r\nORDER BY idxODL DESC"; @@ -15726,63 +15726,73 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[13].Connection = this.Connection; - this._commandCollection[13].CommandText = "dbo.stp_ODL_insertQuery"; + this._commandCollection[13].CommandText = "dbo.stp_ODL_insertProvv"; this._commandCollection[13].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToAs400", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CommessaAs400", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[14].Connection = this.Connection; - this._commandCollection[14].CommandText = "dbo.stp_ODL_insPostumo"; + this._commandCollection[14].CommandText = "dbo.stp_ODL_insertQuery"; this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToAs400", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CommessaAs400", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; - this._commandCollection[15].CommandText = "dbo.stp_ODL_split"; + this._commandCollection[15].CommandText = "dbo.stp_ODL_insPostumo"; this._commandCollection[15].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCRichAttr", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartNewOdl", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[16] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[16].Connection = this.Connection; - this._commandCollection[16].CommandText = "dbo.stp_ODL_updateQta"; + this._commandCollection[16].CommandText = "dbo.stp_ODL_split"; this._commandCollection[16].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCRichAttr", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StartNewOdl", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[17] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[17].Connection = this.Connection; - this._commandCollection[17].CommandText = "dbo.stp_ODL_update"; + this._commandCollection[17].CommandText = "dbo.stp_ODL_updateQta"; this._commandCollection[17].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataInizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[17].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[18] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[18].Connection = this.Connection; - this._commandCollection[18].CommandText = "dbo.stp_ODL_updateSetup"; + this._commandCollection[18].CommandText = "dbo.stp_ODL_update"; this._commandCollection[18].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCRichAttr", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataInizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFine", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[18].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[19] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[19].Connection = this.Connection; + this._commandCollection[19].CommandText = "dbo.stp_ODL_updateSetup"; + this._commandCollection[19].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TCRichAttr", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[19].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16125,12 +16135,64 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile return returnValue; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int insertProvv(string CodArticolo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, string Note) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; + if ((CodArticolo == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(CodArticolo)); + } + if ((IdxMacchina == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(IdxMacchina)); + } + if ((NumPezzi.HasValue == true)) { + command.Parameters[3].Value = ((int)(NumPezzi.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((TCAssegnato.HasValue == true)) { + command.Parameters[4].Value = ((decimal)(TCAssegnato.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Note == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(Note)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, false)] public virtual int InsertQuery(string CodArticolo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, global::System.Nullable PzPallet, global::System.Nullable ToAs400, string CommessaAs400) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; if ((CodArticolo == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -16194,7 +16256,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insPostumo(global::System.Nullable idxODL, string IdxMacchina) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[15]; if ((idxODL.HasValue == true)) { command.Parameters[1].Value = ((int)(idxODL.Value)); } @@ -16228,7 +16290,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int splitODL(global::System.Nullable idxODL, string IdxMacchina, global::System.Nullable TCRichAttr, string Note, global::System.Nullable StartNewOdl) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[15]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[16]; if ((idxODL.HasValue == true)) { command.Parameters[1].Value = ((int)(idxODL.Value)); } @@ -16280,7 +16342,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQta(global::System.Nullable NumPezzi, global::System.Nullable PzPallet, global::System.Nullable Original_IdxODL) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[16]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[17]; if ((NumPezzi.HasValue == true)) { command.Parameters[1].Value = ((int)(NumPezzi.Value)); } @@ -16321,7 +16383,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] public virtual int UpdateQuery(string CodArticolo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, global::System.Nullable PzPallet, global::System.Nullable DataInizio, global::System.Nullable DataFine, string Note, global::System.Nullable Original_IdxODL) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[17]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18]; if ((CodArticolo == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -16397,7 +16459,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateSetup(global::System.Nullable idxODL, global::System.Nullable TCRichAttr, string Note) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[18]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[19]; if ((idxODL.HasValue == true)) { command.Parameters[1].Value = ((int)(idxODL.Value)); }