diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index 534178a3..7469f113 100644 Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ diff --git a/GMW-RT/bin/GMW_data.dll b/GMW-RT/bin/GMW_data.dll index 93a79878..d0202a6e 100644 Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ diff --git a/GMW/WebUserControls/mod_manSAO.ascx.cs b/GMW/WebUserControls/mod_manSAO.ascx.cs index a65a9bd9..d3692365 100644 --- a/GMW/WebUserControls/mod_manSAO.ascx.cs +++ b/GMW/WebUserControls/mod_manSAO.ascx.cs @@ -333,16 +333,46 @@ namespace GMW.WebUserControls { bool abilita = false; btnElimina.Visible = false; - // eliminata la possibilità di cancellare UDC SE non sono UDC anime + // se ho udc selezionato verifico se sia eliminabile if (udcSel != "") { - try + string currParticolare = ""; + bool isAnima = false; + bool isFinitoLiquidiOk = false; + bool isInLDP = true; + + // se ho trovato particolare provo a calcolare i vari parametri + if (currParticolare != "") { - string currParticolare = MagClass.magazzino.taCartellini.getByUdc(udcSel)[0].Particolare; - btnElimina.Visible = TermClass.Ter.isAnima(currParticolare); + // calcolo particolare corrente + try + { + currParticolare = MagClass.magazzino.taCartellini.getByUdc(udcSel)[0].Particolare; + } + catch + { } + // Cond01: possibile eliminare UDC SE è di tipo UDC anime + try + { + isAnima = TermClass.Ter.isAnima(currParticolare); + } + catch + { } + // Cond02: possibile eliminare UDC SE è di tipo UDC finito liquidi, non spedito/consumato/in LDP + try + { + isFinitoLiquidiOk = TermClass.Ter.isFinitoLiquidiOK(udcSel); + isInLDP = MagClass.magazzino.udcInLdp(udcSel); + } + catch + { } + try + { } + catch + { } + // elimina è visibile SE cond01 o cond02 sono TRUE + btnElimina.Visible = (isAnima || (isFinitoLiquidiOk && !isInLDP)); } - catch - { } } if (idxEvento > 0 && udcSel != "" && MagClass.magazzino.checkUDC(udcSel)) { @@ -418,7 +448,7 @@ namespace GMW.WebUserControls * controllo che l'UDC * - esista * - NON SIA in liste di prelievo - * - IdxPosizione = IdxPosizione2del + * - IdxPosizione > 0 (PRIMA controllavo fosse = IdxPosizione2del) **********************************************/ // check condizioni bool okLDP = false; diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 7043aaf1..c13a2692 100644 Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ diff --git a/GMW/bin/GMW_data.dll b/GMW/bin/GMW_data.dll index 93a79878..d0202a6e 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW/bin/VersGen.dll b/GMW/bin/VersGen.dll index 1c6c4d4a..9984b016 100644 Binary files a/GMW/bin/VersGen.dll and b/GMW/bin/VersGen.dll differ diff --git a/GMW_data/DS_Applicazione.Designer.cs b/GMW_data/DS_Applicazione.Designer.cs index 786bdfbb..324bc1ff 100644 --- a/GMW_data/DS_Applicazione.Designer.cs +++ b/GMW_data/DS_Applicazione.Designer.cs @@ -17320,7 +17320,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[14]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[15]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.ElencoCartellini"; @@ -17344,55 +17344,34 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_UDC_getLast_ByDataTurnoLineaParticolare"; + this._commandCollection[3].CommandText = "dbo.stp_UDC_byStatoPosiz"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].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[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImpianto", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStato", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosMin", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosMax", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_getCartellinoByUdc"; + this._commandCollection[4].CommandText = "dbo.stp_UDC_getLast_ByDataTurnoLineaParticolare"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImpianto", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_UDC_insNewFull"; + this._commandCollection[5].CommandText = "dbo.stp_getCartellinoByUdc"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].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[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.VarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImpianto", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStampo", global::System.Data.SqlDbType.VarChar, 8, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Esponente", global::System.Data.SqlDbType.VarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Figura", global::System.Data.SqlDbType.VarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImballo", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoTot", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoCad", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStato", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DoDeleteUdcParent", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_UDC_insNewFull_fixUDC"; + this._commandCollection[6].CommandText = "dbo.stp_UDC_insNewFull"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -17419,14 +17398,10 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[7].Connection = this.Connection; - this._commandCollection[7].CommandText = "dbo.stp_UDC_insNewFullWithAL"; + this._commandCollection[7].CommandText = "dbo.stp_UDC_insNewFull_fixUDC"; this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SourceAL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataMatrix", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoUdcOut", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCella", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -17453,71 +17428,105 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_riattivaUdc"; + this._commandCollection[8].CommandText = "dbo.stp_UDC_insNewFullWithAL"; this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SourceAL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataMatrix", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoUdcOut", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCella", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCS", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Flusso", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Anno", global::System.Data.SqlDbType.VarChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodCliente", global::System.Data.SqlDbType.VarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImpianto", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStampo", global::System.Data.SqlDbType.VarChar, 8, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Esponente", global::System.Data.SqlDbType.VarChar, 6, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Figura", global::System.Data.SqlDbType.VarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImballo", global::System.Data.SqlDbType.VarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoTot", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoCad", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStato", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DoDeleteUdcParent", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_sbloccaUdc"; + this._commandCollection[9].CommandText = "dbo.stp_riattivaUdc"; this._commandCollection[9].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[9].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[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[9].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[10] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_UDC_associaParent"; + this._commandCollection[10].CommandText = "dbo.stp_sbloccaUdc"; this._commandCollection[10].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[10].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[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@copyAttrUdc", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[10].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[11] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[11].Connection = this.Connection; - this._commandCollection[11].CommandText = "dbo.stp_UDC_delete_byRdQ"; + this._commandCollection[11].CommandText = "dbo.stp_UDC_associaParent"; this._commandCollection[11].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[11].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[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nRapQual", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 6, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExecBatchInter", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC_parent", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@copyAttrUdc", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[12] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[12].Connection = this.Connection; - this._commandCollection[12].CommandText = "dbo.stp_UDC_updateNote"; + this._commandCollection[12].CommandText = "dbo.stp_UDC_delete_byRdQ"; this._commandCollection[12].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[12].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[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nRapQual", global::System.Data.SqlDbType.Decimal, 5, global::System.Data.ParameterDirection.Input, 6, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExecBatchInter", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 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_UDC_update"; + this._commandCollection[13].CommandText = "dbo.stp_UDC_updateNote"; 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("@UDC_edit", global::System.Data.SqlDbType.VarChar, 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("@CodCS", global::System.Data.SqlDbType.VarChar, 2, 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("@Flusso", global::System.Data.SqlDbType.VarChar, 2, 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("@Anno", global::System.Data.SqlDbType.VarChar, 2, 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("@CodCliente", global::System.Data.SqlDbType.VarChar, 6, 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("@Particolare", global::System.Data.SqlDbType.VarChar, 15, 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("@CodImpianto", global::System.Data.SqlDbType.VarChar, 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("@CodStampo", global::System.Data.SqlDbType.VarChar, 8, 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("@Esponente", global::System.Data.SqlDbType.VarChar, 6, 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("@Figura", global::System.Data.SqlDbType.VarChar, 4, 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("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", 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("@CodImballo", global::System.Data.SqlDbType.VarChar, 15, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, 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("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoTot", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoCad", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStato", global::System.Data.SqlDbType.VarChar, 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("@UDC_parent", global::System.Data.SqlDbType.VarChar, 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, 500, 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("@UDC", 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, 500, 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("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, 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_UDC_update"; + 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("@UDC_edit", global::System.Data.SqlDbType.VarChar, 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("@CodCS", global::System.Data.SqlDbType.VarChar, 2, 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("@Flusso", global::System.Data.SqlDbType.VarChar, 2, 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("@Anno", global::System.Data.SqlDbType.VarChar, 2, 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("@CodCliente", global::System.Data.SqlDbType.VarChar, 6, 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("@Particolare", global::System.Data.SqlDbType.VarChar, 15, 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("@CodImpianto", global::System.Data.SqlDbType.VarChar, 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("@CodStampo", global::System.Data.SqlDbType.VarChar, 8, 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("@Esponente", global::System.Data.SqlDbType.VarChar, 6, 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("@Figura", global::System.Data.SqlDbType.VarChar, 4, 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("@DataFus", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TurnoFus", 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("@CodImballo", global::System.Data.SqlDbType.VarChar, 15, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, 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("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoTot", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PesoCad", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStato", global::System.Data.SqlDbType.VarChar, 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("@UDC_parent", global::System.Data.SqlDbType.VarChar, 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("@Note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -17612,8 +17621,43 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Applicazione.ElencoCartelliniDataTable getLast_byDataTurnoParticolare(string CodCS, string Particolare, string CodImpianto, global::System.Nullable DataFus, global::System.Nullable TurnoFus) { + public virtual DS_Applicazione.ElencoCartelliniDataTable getByUdcStatoPosiz(string UDC, string CodStato, global::System.Nullable IdxPosMin, global::System.Nullable IdxPosMax) { this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); + } + if ((CodStato == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodStato)); + } + if ((IdxPosMin.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(IdxPosMin.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((IdxPosMax.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[4].Value = ((int)(IdxPosMax.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; + } + DS_Applicazione.ElencoCartelliniDataTable dataTable = new DS_Applicazione.ElencoCartelliniDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_Applicazione.ElencoCartelliniDataTable getLast_byDataTurnoParticolare(string CodCS, string Particolare, string CodImpianto, global::System.Nullable DataFus, global::System.Nullable TurnoFus) { + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((CodCS == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17654,7 +17698,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_Applicazione.ElencoCartelliniDataTable stp_getByUdc(string UDC) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17695,7 +17739,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno string UDC_parent, global::System.Nullable DoDeleteUdcParent, string Note) { - this.Adapter.SelectCommand = this.CommandCollection[5]; + this.Adapter.SelectCommand = this.CommandCollection[6]; if ((CodCS == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17875,7 +17919,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno string UDC_parent, global::System.Nullable DoDeleteUdcParent, string Note) { - this.Adapter.SelectCommand = this.CommandCollection[6]; + this.Adapter.SelectCommand = this.CommandCollection[7]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -18065,7 +18109,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno string UDC_parent, global::System.Nullable DoDeleteUdcParent, string Note) { - this.Adapter.SelectCommand = this.CommandCollection[7]; + this.Adapter.SelectCommand = this.CommandCollection[8]; if ((AL == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -18274,7 +18318,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno string CodStato, string UDC_parent, string Note) { - this.Adapter.SelectCommand = this.CommandCollection[13]; + this.Adapter.SelectCommand = this.CommandCollection[14]; if ((UDC_edit == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -19407,40 +19451,6 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int stp_riattivaUdc(string UDC, string CodSoggetto) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; - if ((UDC == null)) { - command.Parameters[1].Value = global::System.DBNull.Value; - } - else { - command.Parameters[1].Value = ((string)(UDC)); - } - if ((CodSoggetto == null)) { - command.Parameters[2].Value = global::System.DBNull.Value; - } - else { - command.Parameters[2].Value = ((string)(CodSoggetto)); - } - 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", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int stp_sbloccaUdc(string UDC, string CodSoggetto) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -19474,7 +19484,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int stp_UDC_associaParent(string UDC, string UDC_parent, string CodSoggetto, global::System.Nullable copyAttrUdc) { + public virtual int stp_sbloccaUdc(string UDC, string CodSoggetto) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[10]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; @@ -19482,6 +19492,40 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno else { command.Parameters[1].Value = ((string)(UDC)); } + if ((CodSoggetto == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(CodSoggetto)); + } + 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", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int stp_UDC_associaParent(string UDC, string UDC_parent, string CodSoggetto, global::System.Nullable copyAttrUdc) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[11]; + if ((UDC == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(UDC)); + } if ((UDC_parent == null)) { command.Parameters[2].Value = global::System.DBNull.Value; } @@ -19521,7 +19565,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int stp_UDC_delete_byRdQ(global::System.Nullable nRapQual, global::System.Nullable ExecBatchInter) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[11]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[12]; if ((nRapQual.HasValue == true)) { command.Parameters[1].Value = ((decimal)(nRapQual.Value)); } @@ -19555,7 +19599,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int stp_updateNote(string UDC, string note, string CodSoggetto) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[12]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[13]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/GMW_data/DS_Applicazione.xsd b/GMW_data/DS_Applicazione.xsd index a849ef0e..8cea5650 100644 --- a/GMW_data/DS_Applicazione.xsd +++ b/GMW_data/DS_Applicazione.xsd @@ -717,6 +717,20 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno + + + + dbo.stp_UDC_byStatoPosiz + + + + + + + + + + @@ -2956,12 +2970,12 @@ SELECT codPostazione, stampante FROM ElencoPostazioni WHERE (codPostazione = @co - - - - - - + + + + + + \ No newline at end of file diff --git a/GMW_data/TermClass.cs b/GMW_data/TermClass.cs index cea733cd..db178491 100644 --- a/GMW_data/TermClass.cs +++ b/GMW_data/TermClass.cs @@ -6,14 +6,14 @@ using SteamWare; namespace GMW_data { - /// - /// classe gestione operazioni con terminalino - /// - public class TermClass - { - #region area table adapters + /// + /// classe gestione operazioni con terminalino + /// + public class TermClass + { + #region area table adapters - // variabile di tipo table adapter + // variabile di tipo table adapter #if false public DS_magazzinoTableAdapters.AnagMagTableAdapter taAnagMag; public DS_magazzinoTableAdapters.BlocchiTableAdapter taBlocchi; @@ -34,12 +34,12 @@ namespace GMW_data #endif - /// - /// init dei table adapters - /// - protected void initTA() - { - // istanzio oggetto + /// + /// init dei table adapters + /// + protected void initTA() + { + // istanzio oggetto #if false taAnagMag = new GMW_data.DS_magazzinoTableAdapters.AnagMagTableAdapter(); taBlocchi = new GMW_data.DS_magazzinoTableAdapters.BlocchiTableAdapter(); @@ -58,13 +58,13 @@ namespace GMW_data taVParticolariOverwiew = new GMW_data.DS_magazzinoTableAdapters.V_ParticolariOverviewTableAdapter(); taPartExpFig = new GMW_data.DS_magazzinoTableAdapters.v_particolariEsponenteFiguraTableAdapter(); #endif - } - /// - /// effettua setup dei connection strings da web.config delal singola applicazione - /// - protected virtual void setupConnectionStringBase() - { - // connections del db + } + /// + /// effettua setup dei connection strings da web.config delal singola applicazione + /// + protected virtual void setupConnectionStringBase() + { + // connections del db #if false taAnagMag.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString"); taBlocchi.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString"); @@ -83,26 +83,26 @@ namespace GMW_data taVParticolariOverwiew.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString"); taPartExpFig.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString"); #endif - } + } - #endregion + #endregion - #region Inizializzazione + #region Inizializzazione - protected TermClass() - { - initTA(); - setupConnectionStringBase(); - } + protected TermClass() + { + initTA(); + setupConnectionStringBase(); + } - /// - /// oggetto static per fare chiamate sul magazzino - /// - public static TermClass Ter = new TermClass(); + /// + /// oggetto static per fare chiamate sul magazzino + /// + public static TermClass Ter = new TermClass(); - #endregion + #endregion - #region metodi protected + #region metodi protected #if false /// @@ -162,215 +162,234 @@ namespace GMW_data } #endif - #endregion + #endregion - #region Metodi esposti + #region Metodi esposti - /// - /// Verifica il login utente andando a controllare il CodSoggetto da RilPro e salvando in sessione un oggetto user_std x l'utente corrispondente al cod soggetto secondo la tab soggetti2utente - /// - /// - /// tipo di errore codificato - public esitoLoginTerm doUserLogin(string CodSoggetto) - { - esitoLoginTerm answ = esitoLoginTerm.errore; - try - { - // verifico che il cod operatore passato sia valido per RilPro.AnagOperatori e Soggetti2Utente - int trovatiAnagOp = DataProxy.obj.taAnagOperatore.getByCodSoggetto(CodSoggetto).Rows.Count; - int trovatiS2U = DataProxy.obj.taSogg2Oper.getByCodSoggetto(CodSoggetto).Rows.Count; - if (trovatiAnagOp == 1) - { - if (trovatiS2U == 1) - { - // è ok, proseguo facendo avvio user - DS_Applicazione.Soggetti2UtenteRow rigaOp = DataProxy.obj.taSogg2Oper.getByCodSoggetto(CodSoggetto)[0]; - // inizializzo utente con dati operatore - user_std _utente = new user_std(); - user_std.UtSn.isForcedUser = true; - bool fatto = _utente.startUpUtente(rigaOp.DOMINIO, rigaOp.USER_NAME); - if (fatto) - { - answ = esitoLoginTerm.ok; - logger.lg.scriviLog(String.Format("Forced user identity ok: logged as \t {0}\\{1}", user_std.UtSn.dominio, user_std.UtSn.utente), tipoLog.STARTUP); - } - } - else - { - logger.lg.scriviLog(string.Format("Attenzione: trovati {0} utenti in RilPro AnagOperatori e {1} utenti in Soggetti2Utente per il CodSoggetto {2}: login impossibile!", trovatiAnagOp, trovatiS2U, CodSoggetto), tipoLog.ERROR); - answ = esitoLoginTerm.errore_noUser; - } - } - else - { - logger.lg.scriviLog(string.Format("Attenzione: trovati {0} utenti in RilPro AnagOperatori e {1} utenti in Soggetti2Utente per il CodSoggetto {2}: login impossibile!", trovatiAnagOp, trovatiS2U, CodSoggetto), tipoLog.ERROR); - answ = esitoLoginTerm.errore_noCodSogg; - } - } - catch (Exception e) - { - logger.lg.scriviLog(string.Format("Errore in TermClass.doUserLogin per il CodSoggetto {0}: eccezione {1}", CodSoggetto, e), tipoLog.FATAL); - } - return answ; - } - /// - /// verifica se il codice barcode letto sia un particoalre con codice tipo "P" - /// - /// - /// - public bool isParticolare(string barcodeIN) - { - bool answ = false; - try - { - answ = utils.obj.taSelParticolari.getByConditioValue(barcodeIN, "P").Rows.Count == 1; - } - catch - { } - return answ; - } - /// - /// verifica se il codice barcode letto sia un anima - /// - /// - /// - public bool isAnima(string barcodeIN) - { - bool answ = false; - try - { - answ = utils.obj.taSelParticolari.getByConditioValue(barcodeIN, "A").Rows.Count == 1; - } - catch - { } - return answ; - } - /// - /// verifica il codice barcode letto e restituisce il tipo di valore corrisponente - /// - /// - /// - public tipoCodiceBarcode riconosciBarcode(string barcodeIN) - { - tipoCodiceBarcode answ = tipoCodiceBarcode.ND; - if (barcodeIN != "") - { - // cerco se sia un particolare... - if (utils.obj.taSelParticolari.getByConditioValue(barcodeIN,"*").Rows.Count == 1) - { - answ = tipoCodiceBarcode.Particolare; - } - // se non lo è continuo - if (answ == tipoCodiceBarcode.ND) - { - switch (barcodeIN.Substring(0, 1)) - { - case "O": - answ = tipoCodiceBarcode.Operatore; - break; - case "K": - answ = tipoCodiceBarcode.ListaPrelievo; - break; - //case "P": - //case "A": - // answ = tipoCodiceBarcode.Particolare; - // break; - case "U": - answ = tipoCodiceBarcode.UDC; - break; - case "S": - answ = tipoCodiceBarcode.Cella; - break; - default: - // cerco se la stringa intera abbia un match con le celle... - if (MagClass.magazzino.taCelle.getByCodCella(barcodeIN).Rows.Count == 1) - { - answ = tipoCodiceBarcode.Cella; - } - break; - } - } - } - return answ; - } - /// - /// effettua il reset di tutti i valori in sesisone salvati a valle della scansione di un barcode - /// - /// true/false se resettare UDC selezionato - /// true/false se resettare Cella selezionata - /// true/false se resettare Particolare selezionato - public void resetScanBarcode(bool resetUdc, bool resetCella, bool resetParticolare) - { - if (resetCella) - { - memLayer.ML.emptySessionVal("IdxCella_sel"); - memLayer.ML.emptySessionVal("codCella_sel"); - } - if (resetParticolare) - { - memLayer.ML.emptySessionVal("Particolare_sel"); - } - if (resetUdc) - { - memLayer.ML.emptySessionVal("UDC_sel"); - } - } + /// + /// Verifica il login utente andando a controllare il CodSoggetto da RilPro e salvando in sessione un oggetto user_std x l'utente corrispondente al cod soggetto secondo la tab soggetti2utente + /// + /// + /// tipo di errore codificato + public esitoLoginTerm doUserLogin(string CodSoggetto) + { + esitoLoginTerm answ = esitoLoginTerm.errore; + try + { + // verifico che il cod operatore passato sia valido per RilPro.AnagOperatori e Soggetti2Utente + int trovatiAnagOp = DataProxy.obj.taAnagOperatore.getByCodSoggetto(CodSoggetto).Rows.Count; + int trovatiS2U = DataProxy.obj.taSogg2Oper.getByCodSoggetto(CodSoggetto).Rows.Count; + if (trovatiAnagOp == 1) + { + if (trovatiS2U == 1) + { + // è ok, proseguo facendo avvio user + DS_Applicazione.Soggetti2UtenteRow rigaOp = DataProxy.obj.taSogg2Oper.getByCodSoggetto(CodSoggetto)[0]; + // inizializzo utente con dati operatore + user_std _utente = new user_std(); + user_std.UtSn.isForcedUser = true; + bool fatto = _utente.startUpUtente(rigaOp.DOMINIO, rigaOp.USER_NAME); + if (fatto) + { + answ = esitoLoginTerm.ok; + logger.lg.scriviLog(String.Format("Forced user identity ok: logged as \t {0}\\{1}", user_std.UtSn.dominio, user_std.UtSn.utente), tipoLog.STARTUP); + } + } + else + { + logger.lg.scriviLog(string.Format("Attenzione: trovati {0} utenti in RilPro AnagOperatori e {1} utenti in Soggetti2Utente per il CodSoggetto {2}: login impossibile!", trovatiAnagOp, trovatiS2U, CodSoggetto), tipoLog.ERROR); + answ = esitoLoginTerm.errore_noUser; + } + } + else + { + logger.lg.scriviLog(string.Format("Attenzione: trovati {0} utenti in RilPro AnagOperatori e {1} utenti in Soggetti2Utente per il CodSoggetto {2}: login impossibile!", trovatiAnagOp, trovatiS2U, CodSoggetto), tipoLog.ERROR); + answ = esitoLoginTerm.errore_noCodSogg; + } + } + catch (Exception e) + { + logger.lg.scriviLog(string.Format("Errore in TermClass.doUserLogin per il CodSoggetto {0}: eccezione {1}", CodSoggetto, e), tipoLog.FATAL); + } + return answ; + } + /// + /// verifica se il codice barcode letto sia un particoalre con codice tipo "P" + /// + /// + /// + public bool isParticolare(string barcodeIN) + { + bool answ = false; + try + { + answ = utils.obj.taSelParticolari.getByConditioValue(barcodeIN, "P").Rows.Count == 1; + } + catch + { } + return answ; + } + /// + /// verifica se il codice barcode letto sia un anima + /// + /// + /// + public bool isAnima(string valore) + { + bool answ = false; + try + { + answ = utils.obj.taSelParticolari.getByConditioValue(valore, "A").Rows.Count == 1; + } + catch + { } + return answ; + } + /// + /// verifica se il codice barcode letto sia + /// - FinitoLiquidi + /// - NON consumato ( maggiore di 0 ) + /// - NON spedito ( minore di 200 ) + /// + /// UDC da verificare + /// + public bool isFinitoLiquidiOK(string UDC) + { + bool answ = false; + try + { + answ = DataProxy.obj.taCartellini.getByUdcStatoPosiz(UDC, "FinLiq", 1, 199).Rows.Count == 1; + } + catch + { } + return answ; + } + /// + /// verifica il codice barcode letto e restituisce il tipo di valore corrisponente + /// + /// + /// + public tipoCodiceBarcode riconosciBarcode(string barcodeIN) + { + tipoCodiceBarcode answ = tipoCodiceBarcode.ND; + if (barcodeIN != "") + { + // cerco se sia un particolare... + if (utils.obj.taSelParticolari.getByConditioValue(barcodeIN, "*").Rows.Count == 1) + { + answ = tipoCodiceBarcode.Particolare; + } + // se non lo è continuo + if (answ == tipoCodiceBarcode.ND) + { + switch (barcodeIN.Substring(0, 1)) + { + case "O": + answ = tipoCodiceBarcode.Operatore; + break; + case "K": + answ = tipoCodiceBarcode.ListaPrelievo; + break; + //case "P": + //case "A": + // answ = tipoCodiceBarcode.Particolare; + // break; + case "U": + answ = tipoCodiceBarcode.UDC; + break; + case "S": + answ = tipoCodiceBarcode.Cella; + break; + default: + // cerco se la stringa intera abbia un match con le celle... + if (MagClass.magazzino.taCelle.getByCodCella(barcodeIN).Rows.Count == 1) + { + answ = tipoCodiceBarcode.Cella; + } + break; + } + } + } + return answ; + } + /// + /// effettua il reset di tutti i valori in sesisone salvati a valle della scansione di un barcode + /// + /// true/false se resettare UDC selezionato + /// true/false se resettare Cella selezionata + /// true/false se resettare Particolare selezionato + public void resetScanBarcode(bool resetUdc, bool resetCella, bool resetParticolare) + { + if (resetCella) + { + memLayer.ML.emptySessionVal("IdxCella_sel"); + memLayer.ML.emptySessionVal("codCella_sel"); + } + if (resetParticolare) + { + memLayer.ML.emptySessionVal("Particolare_sel"); + } + if (resetUdc) + { + memLayer.ML.emptySessionVal("UDC_sel"); + } + } - #endregion - } + #endregion + } } /// /// definisce i tipi di codice che il barcode può leggere /// public enum tipoCodiceBarcode { - /// - /// Tipo non riconosciuto - /// - ND, - /// - /// [O] - il barcode rappresenta un codice operatore - /// - Operatore, - /// - /// [K] - il barcode rappresenta una lista di prelievo - /// - ListaPrelievo, - /// - /// [U] - il barcode rappresenta un UDC - /// - UDC, - /// - /// il barcode rappresenta un particolare - /// - Particolare, - /// - /// Cella [S] - /// - Cella, - /// - /// codice gitterbox - /// - Gitterbox, - /// - /// Codice PartNumber come sottoinsieme (iniziale ) di datamatrix BMW - /// - PartNumber, - /// - /// Codice datamatrix - /// - DataMatrix, - /// - /// codice che indica un comando (prefisso da web.config) - /// - Comando, - /// - /// Assieme Logico - /// - AL, - /// - /// Trattamento Termico - /// + /// + /// Tipo non riconosciuto + /// + ND, + /// + /// [O] - il barcode rappresenta un codice operatore + /// + Operatore, + /// + /// [K] - il barcode rappresenta una lista di prelievo + /// + ListaPrelievo, + /// + /// [U] - il barcode rappresenta un UDC + /// + UDC, + /// + /// il barcode rappresenta un particolare + /// + Particolare, + /// + /// Cella [S] + /// + Cella, + /// + /// codice gitterbox + /// + Gitterbox, + /// + /// Codice PartNumber come sottoinsieme (iniziale ) di datamatrix BMW + /// + PartNumber, + /// + /// Codice datamatrix + /// + DataMatrix, + /// + /// codice che indica un comando (prefisso da web.config) + /// + Comando, + /// + /// Assieme Logico + /// + AL, + /// + /// Trattamento Termico + /// TT, /// /// Codice di imballo @@ -386,20 +405,20 @@ public enum tipoCodiceBarcode /// public enum esitoLoginTerm { - /// - /// tutto ok, come true - /// - ok, - /// - /// non è andata, errore generico - /// - errore, - /// - /// errore x mancanza record in tab operatori di RilPro x CodSoggetto - /// - errore_noCodSogg, - /// - /// errore mancanza username corrisponende all'operatore il cui cod soggetto è stato passato - /// - errore_noUser + /// + /// tutto ok, come true + /// + ok, + /// + /// non è andata, errore generico + /// + errore, + /// + /// errore x mancanza record in tab operatori di RilPro x CodSoggetto + /// + errore_noCodSogg, + /// + /// errore mancanza username corrisponende all'operatore il cui cod soggetto è stato passato + /// + errore_noUser } \ No newline at end of file diff --git a/GMW_data/app.config b/GMW_data/app.config index 136a4cb4..aa16a075 100644 --- a/GMW_data/app.config +++ b/GMW_data/app.config @@ -4,7 +4,7 @@ ")] -[assembly: AssemblyFileVersion("2.7.735.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("2.7.736.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("2.7.736.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2007-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+