diff --git a/GMW/GMW/GMW.csproj b/GMW/GMW/GMW.csproj index bc091fa8..f328c3ad 100644 --- a/GMW/GMW/GMW.csproj +++ b/GMW/GMW/GMW.csproj @@ -386,13 +386,6 @@ mod_confMag.ascx - - mod_creaDatiTest.ascx - ASPXCodeBehind - - - mod_creaDatiTest.ascx - mod_delibera.ascx ASPXCodeBehind @@ -979,7 +972,6 @@ - diff --git a/GMW/GMW/Web.config b/GMW/GMW/Web.config index 6249e666..34cda763 100644 --- a/GMW/GMW/Web.config +++ b/GMW/GMW/Web.config @@ -31,13 +31,13 @@ --> - - - - - - - + + + + + + + @@ -54,13 +54,13 @@ - + - + - + @@ -80,7 +80,7 @@ - + @@ -100,25 +100,25 @@ - - - - - - + + + + + + - - + + - - + + @@ -128,66 +128,66 @@ - - - - - - - + + + + + + + + - + - - + - + - + - + - + - + - + - + - + - + @@ -206,25 +206,25 @@ - + - + - + - - + + - + diff --git a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx index 9caa5647..40eb3497 100644 --- a/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx +++ b/GMW/GMW/WebUserControls/mod_anagBlocchi.ascx @@ -138,7 +138,7 @@ + DeleteMethod="DeleteQuery" InsertMethod="insertQuery" UpdateMethod="UpdateQuery"> diff --git a/GMW/GMW/WebUserControls/mod_anime.ascx.cs b/GMW/GMW/WebUserControls/mod_anime.ascx.cs index c1123b22..f15b2aac 100644 --- a/GMW/GMW/WebUserControls/mod_anime.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_anime.ascx.cs @@ -383,7 +383,7 @@ namespace GMW.WebUserControls try { // creo nuovo UDC del trattamento liquidi - newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "Fin", memLayer.ML.confReadInt("IdxPosizioneAnime"), true, "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year); // !!! "AN" HARD CODED x indicare flusso ANIME + newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "Anim", memLayer.ML.confReadInt("IdxPosizioneAnime"), true, "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year); // !!! "AN" e "Anim" HARD CODED x indicare flusso ANIME } catch (Exception exc) { diff --git a/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs b/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs index 8db6447c..ae470f72 100644 --- a/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_animeMult.ascx.cs @@ -441,7 +441,7 @@ namespace GMW.WebUserControls try { // creo nuovo UDC del trattamento liquidi - newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "Fin", memLayer.ML.confReadInt("IdxPosizioneAnime"), true, "IdxPosizioneAnime", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year); // !!! "AN" HARD CODED x indicare flusso ANIME + newUdcChild = MagClass.magazzino.creaUdc("AN", "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoAnime"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, DateTime.Now, 0, "AnimExt", memLayer.ML.confReadInt("IdxPosizioneAnimeExt"), true, "IdxPosizioneAnimeExt", "UDC_ANIMA", noteTrim, "", DateTime.Now.Year); // !!! "AN" e "AnimExt" HARD CODED x indicare flusso ANIME } catch (Exception exc) { @@ -450,6 +450,23 @@ namespace GMW.WebUserControls // se ho cart liquidi genero (se non ci sono) cart trattamenti if (newUdcChild != "") { + /*************************************************************************************** + * dopo che l'ho creato lo sposto da post anime ext a post anime int (NO UPDATE AS400...) + * IdxPosizioneAnimeExt --> IdxPosizioneAnime + * !!! DEVO CALCOLARE LA CELLA !!! parto dal blocco calcolato da tab transizioni + ***************************************************************************************/ + int idxBloccoTo = StateMachine.SM.getIdxBloccoTo("UDC_ANIMA", memLayer.ML.confReadInt("IdxPosizioneAnimeExt")); + int idxCellaTo = 0; + try + { + idxCellaTo = MagClass.magazzino.taCelle.getByIdxBlocco(idxBloccoTo)[0].IdxCella; + } + catch + { } + if (idxCellaTo != 0) + { + MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), newUdcChild, idxCellaTo, false); + } // ora stampo il nuovo cartellino!!! MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartAnime); } diff --git a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx b/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx deleted file mode 100644 index f1dc50e1..00000000 --- a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx +++ /dev/null @@ -1,46 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_creaDatiTest.ascx.cs" - Inherits="GMW.WebUserControls.mod_creaDatiTest" %> - - - - - - - - - - - - - - - - - - - - -
- CodCS: - - -
- Cod bilancia: - - -
- Media di spazio magazzino libero: - - % -
- Blocco da riempire: - - - - - -
- -
diff --git a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.cs b/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.cs deleted file mode 100644 index 1bc80c26..00000000 --- a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using GMW_data; -using SteamWare; - -namespace GMW.WebUserControls -{ - public partial class mod_creaDatiTest : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) - { - - } - - /// - /// crea in batch gli UDC richiesti - /// - /// - /// - protected void btnCreaUDC_Click(object sender, EventArgs e) - { - int IdxPosizione = memLayer.ML.confReadInt("IdxPosNewFusi"); - int contArtInProd = 0; - // carico dati init - Random rdnGen = new Random(); - // elenco articoli in prod - DS_Applicazione.v_ArtInProdDataTable tabArtInProd = DataProxy.obj.taArtInProd.GetData(); - //elenco stati - DS_Applicazione.AnagStatiProdottoDataTable tabStati = DataProxy.obj.taStatiProd.GetData(); - int nextStato = 0; - // determino il blocco su cui operare - int percLibero = Convert.ToInt32(txtSpazioLibero.Text); - int IdxBlocco = Convert.ToInt32(ddlBlocco.SelectedValue); - // setup IDC gemelli da creare - int numUdcUguali = 1; - // calcolo quanti UDC devo generare - int numUdc2create = MagClass.magazzino.taCelle.getByIdxBlocco(IdxBlocco).Rows.Count; - int UdcCreati = 0; - // setup valori - string CodImpianto = ""; - string Particolare = ""; - string CodStampo = ""; - string esponente = ""; - string figura = ""; - DateTime data; - int turno = 1; - // cod Soggetto sempre uguale - string CodSoggetto = MagClass.magazzino.CodSoggCurrUser; - // tipo dichiarazione fissa - string TipoDichiarazione = "M"; - float tara = 0; - string codCliente = ""; - int qta = 0; - float pesoCad = 0; - float pesoTot = 0; - string CodStato = ""; - string codImballo = "I0054"; - string udc = ""; - string UDC_Parent = ""; - int idxCella = 0; - while (UdcCreati < numUdc2create) - { - // cod impianto va da 01 a 20... ciclo! - if (contArtInProd > 19) contArtInProd = contArtInProd - 20; - CodImpianto = tabArtInProd[contArtInProd].CodImpianto; - // calcolo particolare (a caso) dato il cliente - Particolare = tabArtInProd[contArtInProd].Particolare; - // calcolo codcliente - codCliente = tabArtInProd[contArtInProd].CodCliente; - // calcolo stampo da impianto - CodStampo = tabArtInProd[contArtInProd].CodStampo; - // esponente da stampo - esponente = tabArtInProd[contArtInProd].Esponente; - // figura da stampo - figura = tabArtInProd[contArtInProd].Figura; - // data e turno da dataInizio / dataFine - data = tabArtInProd[contArtInProd].DataInizio.AddDays(rdnGen.Next(5)); - turno = 1 + rdnGen.Next(2); - // cod stato a rotazione - CodStato = tabStati[nextStato].CodStato; - if (nextStato > 3) nextStato = nextStato - 4; - // genero un numero casuale di UDC uguali x particolare, impianto... - numUdcUguali = 5 + rdnGen.Next(5); - DS_Applicazione.ElencoCartelliniDataTable tabUdc; - for (int j = 0; j < numUdcUguali; j++) - { - // tara casuale - tara = 100 + rdnGen.Next(20); - // qta casuale - qta = 50 + rdnGen.Next(30); - // peso cad e totale calcolati - pesoCad = (20 + rdnGen.Next(20)) / 10; - pesoTot = tara * pesoCad * qta; - // creo cartellino tara... - tabUdc = DataProxy.obj.taCartellini.stp_insNew(txtCodCS.Text, txtCodBilancia.Text, string.Format("{0:yy}", DateTime.Now), tara, codImballo, TipoDichiarazione, CodSoggetto); - UDC_Parent = tabUdc[0].UDC; - // creo nuovo cartellino! e ne recupero il nome - tabUdc = DataProxy.obj.taCartellini.stp_insNewFull(txtCodCS.Text, txtCodBilancia.Text, string.Format("{0:yy}", DateTime.Now), codCliente, Particolare, CodImpianto, CodStampo, esponente, figura, data, turno, codImballo, CodSoggetto, tara, IdxPosizione, TipoDichiarazione, "UDC_PESA", qta, pesoTot, pesoCad, CodStato, UDC_Parent, false, ""); // ATTENZIONE: "UDC_PESA" è "hard coded" nel db... !!! - udc = tabUdc[0].UDC; - // calcolo la prima posizione libera da riempire... - idxCella = MagClass.magazzino.taCelle.getLibereByIdxBlocco(IdxBlocco)[0].IdxCella; - // adesso dato l'UDC carico nel blocco - MagClass.magazzino.taPosUdcCorr.Insert(udc, idxCella, txtCodCS.Text, data.AddHours(rdnGen.Next(3))); - UdcCreati++; - } - // aggiorno contatori - contArtInProd++; - nextStato++; - } - } - } -} \ No newline at end of file diff --git a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.designer.cs b/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.designer.cs deleted file mode 100644 index a6244375..00000000 --- a/GMW/GMW/WebUserControls/mod_creaDatiTest.ascx.designer.cs +++ /dev/null @@ -1,70 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace GMW.WebUserControls { - - - public partial class mod_creaDatiTest { - - /// - /// txtCodCS control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtCodCS; - - /// - /// txtCodBilancia control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtCodBilancia; - - /// - /// txtSpazioLibero control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtSpazioLibero; - - /// - /// ddlBlocco control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList ddlBlocco; - - /// - /// odsBlocco control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource odsBlocco; - - /// - /// btnCreaUDC control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnCreaUDC; - } -} diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 4cd38f0f..83a30965 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index 6c0aa6d4..e5a182ad 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/mazzAppSettings.config b/GMW/GMW/mazzAppSettings.config index 3e82a5f8..0a9aa19c 100644 --- a/GMW/GMW/mazzAppSettings.config +++ b/GMW/GMW/mazzAppSettings.config @@ -1,14 +1,14 @@  - + - + - - + + @@ -27,7 +27,7 @@ - + @@ -41,23 +41,23 @@ - + - - - - - - + + + + + + - - + + @@ -65,7 +65,7 @@ - + @@ -75,66 +75,66 @@ - - - - - - - + + + + + + + + - + - - + - + - + - + - + - + - + - + - + - + @@ -153,20 +153,20 @@ - + - + - - - - - - - + + + + + + + \ No newline at end of file diff --git a/GMW/GMW/mazzAppSettingsSP.config b/GMW/GMW/mazzAppSettingsSP.config index b7a956c8..f1ab504e 100644 --- a/GMW/GMW/mazzAppSettingsSP.config +++ b/GMW/GMW/mazzAppSettingsSP.config @@ -7,8 +7,8 @@ - - + + @@ -83,6 +83,7 @@ + @@ -104,7 +105,6 @@ - @@ -134,12 +134,12 @@ - + - + diff --git a/GMW/GMW/mazzAppSettingsSP_test.config b/GMW/GMW/mazzAppSettingsSP_test.config index 751d7ec0..9fb04d99 100644 --- a/GMW/GMW/mazzAppSettingsSP_test.config +++ b/GMW/GMW/mazzAppSettingsSP_test.config @@ -7,8 +7,8 @@ - - + + @@ -64,7 +64,7 @@ - + @@ -83,6 +83,7 @@ + diff --git a/GMW/GMW/mazzAppSettingsTK.config b/GMW/GMW/mazzAppSettingsTK.config index e0601a81..97f959c6 100644 --- a/GMW/GMW/mazzAppSettingsTK.config +++ b/GMW/GMW/mazzAppSettingsTK.config @@ -7,8 +7,8 @@ - - + + @@ -64,7 +64,7 @@ - + @@ -83,6 +83,7 @@ + @@ -103,7 +104,7 @@ - + @@ -133,12 +134,12 @@ - + - + diff --git a/GMW/GMW/mazzAppSettingsTK_test.config b/GMW/GMW/mazzAppSettingsTK_test.config index 18930dec..0a9aa19c 100644 --- a/GMW/GMW/mazzAppSettingsTK_test.config +++ b/GMW/GMW/mazzAppSettingsTK_test.config @@ -7,8 +7,8 @@ - - + + @@ -64,7 +64,7 @@ - + @@ -83,6 +83,7 @@ + @@ -132,7 +133,7 @@ - + diff --git a/GMW/GMW/mazzConnectionStrings.config b/GMW/GMW/mazzConnectionStrings.config index f929e9ae..090a45c1 100644 --- a/GMW/GMW/mazzConnectionStrings.config +++ b/GMW/GMW/mazzConnectionStrings.config @@ -1,3 +1,3 @@  - + \ No newline at end of file diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 4cd38f0f..58bbe4d9 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache index f1ef378e..6bde0f7a 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll index c1f5dd07..83a30965 100644 Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache index 329bfe80..f440c35b 100644 Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_Applicazione.Designer.cs b/GMW/GMW_data/DS_Applicazione.Designer.cs index 27aff091..4f134040 100644 --- a/GMW/GMW_data/DS_Applicazione.Designer.cs +++ b/GMW/GMW_data/DS_Applicazione.Designer.cs @@ -15925,7 +15925,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[14]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[12]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.ElencoCartellini"; @@ -15951,155 +15951,136 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[2].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_annullaUDC"; + this._commandCollection[3].CommandText = "dbo.stp_getCartellinoByUdc"; 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("@UDC", 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 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_insNewFull"; 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("@Flusso", 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("@Anno", 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("@CodCliente", global::System.Data.SqlDbType.VarChar, 6, 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("@CodStampo", global::System.Data.SqlDbType.VarChar, 8, 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("@Esponente", global::System.Data.SqlDbType.VarChar, 6, 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("@Figura", global::System.Data.SqlDbType.VarChar, 4, 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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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[4].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_UDC_insNew"; + this._commandCollection[5].CommandText = "dbo.stp_UDC_insNewFull_fixUDC"; 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("@UDC", global::System.Data.SqlDbType.NVarChar, 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("@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("@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("@CodImballo", 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("@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("@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[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_UDC_insNewFull"; + this._commandCollection[6].CommandText = "dbo.stp_rettMovAs400"; 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("@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, "", "", "")); - this._commandCollection[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Particolare", 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("@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("@CodMagAS", 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].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[6].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[6].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[6].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[6].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[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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.NVarChar, 10, 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_insNewFull_fixUDC"; + this._commandCollection[7].CommandText = "dbo.stp_riattivaUdc"; 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("@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, "", "", "")); - this._commandCollection[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[7].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[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[7].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[7].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[8].Connection = this.Connection; - this._commandCollection[8].CommandText = "dbo.stp_rettMovAs400"; + this._commandCollection[8].CommandText = "dbo.stp_sbloccaUdc"; 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("@Particolare", global::System.Data.SqlDbType.NVarChar, 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", global::System.Data.SqlDbType.NVarChar, 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("@CodMagAS", global::System.Data.SqlDbType.NVarChar, 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("@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("@CodEvento", global::System.Data.SqlDbType.NVarChar, 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("@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[9] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[9].Connection = this.Connection; - this._commandCollection[9].CommandText = "dbo.stp_riattivaUdc"; + this._commandCollection[9].CommandText = "dbo.stp_UDC_associaParent"; 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[9].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[9].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[10].Connection = this.Connection; - this._commandCollection[10].CommandText = "dbo.stp_sbloccaUdc"; + this._commandCollection[10].CommandText = "dbo.stp_UDC_delete_byRdQ"; 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.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[10].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[10].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[11].Connection = this.Connection; - this._commandCollection[11].CommandText = "dbo.stp_UDC_associaParent"; + this._commandCollection[11].CommandText = "dbo.stp_UDC_update"; 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("@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[12] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[12].Connection = this.Connection; - 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("@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].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[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("@Tara", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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[11].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()] @@ -16202,7 +16183,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[3]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -16214,58 +16195,6 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno return dataTable; } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Applicazione.ElencoCartelliniDataTable stp_insNew(string CodCS, string Flusso, string Anno, global::System.Nullable Tara, string CodImballo, string CodTipoDichiaraz, string CodSoggetto) { - this.Adapter.SelectCommand = this.CommandCollection[5]; - if ((CodCS == null)) { - this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodCS)); - } - if ((Flusso == null)) { - this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[2].Value = ((string)(Flusso)); - } - if ((Anno == null)) { - this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[3].Value = ((string)(Anno)); - } - if ((Tara.HasValue == true)) { - this.Adapter.SelectCommand.Parameters[4].Value = ((double)(Tara.Value)); - } - else { - this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; - } - if ((CodImballo == null)) { - this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[5].Value = ((string)(CodImballo)); - } - if ((CodTipoDichiaraz == null)) { - this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[6].Value = ((string)(CodTipoDichiaraz)); - } - if ((CodSoggetto == null)) { - this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value; - } - else { - this.Adapter.SelectCommand.Parameters[7].Value = ((string)(CodSoggetto)); - } - DS_Applicazione.ElencoCartelliniDataTable dataTable = new DS_Applicazione.ElencoCartelliniDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] @@ -16294,7 +16223,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[4]; if ((CodCS == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -16473,7 +16402,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[5]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -16657,7 +16586,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[11]; if ((UDC_edit == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17778,43 +17707,10 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno return this.Update(Original_UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, DisegnoGrezzo, Esponente, CodImpianto, DescImpianto, CodStampo, Figura, DataFus, TurnoFus, CodImballo, CodSoggetto, NumCont, Tara, Qta, CodStato, IdxPosizione, PesoTot, PesoCad, CreateDate, ModDate, Note, Original_UDC, Original_CodCS, Original_CodCliente, Original_RagSociale, Original_Particolare, Original_DescParticolare, Original_DisegnoGrezzo, Original_Esponente, Original_CodImpianto, Original_DescImpianto, Original_CodStampo, Original_Figura, Original_DataFus, Original_TurnoFus, Original_CodImballo, Original_CodSoggetto, Original_NumCont, Original_Tara, Original_Qta, Original_CodStato, Original_IdxPosizione, Original_PesoTot, Original_PesoCad, Original_CreateDate, Original_ModDate, Original_Note); } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int stp_annullaUDC(string UDC, string CodSoggetto) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; - 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.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int stp_rettMovAs400(string Particolare, string UDC, string CodMagAS, global::System.Nullable Qta, string CodEvento) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((Particolare == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -17865,7 +17761,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [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[9]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -17898,7 +17794,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [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[10]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -17931,7 +17827,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int stp_UDC_associaParent(string UDC, string UDC_parent) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[11]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[9]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -17964,7 +17860,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [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[12]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[10]; if ((nRapQual.HasValue == true)) { command.Parameters[1].Value = ((decimal)(nRapQual.Value)); } diff --git a/GMW/GMW_data/DS_Applicazione.xsd b/GMW/GMW_data/DS_Applicazione.xsd index e3eec27a..8c2fde31 100644 --- a/GMW/GMW_data/DS_Applicazione.xsd +++ b/GMW/GMW_data/DS_Applicazione.xsd @@ -719,18 +719,6 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - - - - dbo.stp_annullaUDC - - - - - - - - @@ -742,23 +730,6 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno - - - - dbo.stp_UDC_insNew - - - - - - - - - - - - - @@ -2773,7 +2744,7 @@ SELECT codPostazione, stampante FROM ElencoPostazioni WHERE (codPostazione = @co - + diff --git a/GMW/GMW_data/DS_Applicazione.xss b/GMW/GMW_data/DS_Applicazione.xss index 0a02b942..090f06dc 100644 --- a/GMW/GMW_data/DS_Applicazione.xss +++ b/GMW/GMW_data/DS_Applicazione.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -13,7 +13,7 @@ - + diff --git a/GMW/GMW_data/DS_SM.Designer.cs b/GMW/GMW_data/DS_SM.Designer.cs index c64333d1..b7536b5e 100644 --- a/GMW/GMW_data/DS_SM.Designer.cs +++ b/GMW/GMW_data/DS_SM.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4959 +// Runtime Version:2.0.50727.4963 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -956,6 +956,8 @@ namespace GMW_data { private global::System.Data.DataColumn columntoAs400; + private global::System.Data.DataColumn columnIdxBloccoTo; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public TabTranPosizEventiDataTable() { this.TableName = "TabTranPosizEventi"; @@ -1014,6 +1016,13 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn IdxBloccoToColumn { + get { + return this.columnIdxBloccoTo; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int Count { @@ -1043,13 +1052,14 @@ namespace GMW_data { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public TabTranPosizEventiRow AddTabTranPosizEventiRow(AnagTipoEventoRow parentAnagTipoEventoRowByFK_TabTranPosizEventi_AnagTipoEvento, AnagPosizioniRow parentAnagPosizioniRowByFK_TabTranPosizEventi_AnagPosizioni, int IdxPosizioneTo, bool toAs400) { + public TabTranPosizEventiRow AddTabTranPosizEventiRow(AnagTipoEventoRow parentAnagTipoEventoRowByFK_TabTranPosizEventi_AnagTipoEvento, AnagPosizioniRow parentAnagPosizioniRowByFK_TabTranPosizEventi_AnagPosizioni, int IdxPosizioneTo, bool toAs400, int IdxBloccoTo) { TabTranPosizEventiRow rowTabTranPosizEventiRow = ((TabTranPosizEventiRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, IdxPosizioneTo, - toAs400}; + toAs400, + IdxBloccoTo}; if ((parentAnagTipoEventoRowByFK_TabTranPosizEventi_AnagTipoEvento != null)) { columnValuesArray[0] = parentAnagTipoEventoRowByFK_TabTranPosizEventi_AnagTipoEvento[0]; } @@ -1086,6 +1096,7 @@ namespace GMW_data { this.columnIdxPosizione = base.Columns["IdxPosizione"]; this.columnIdxPosizioneTo = base.Columns["IdxPosizioneTo"]; this.columntoAs400 = base.Columns["toAs400"]; + this.columnIdxBloccoTo = base.Columns["IdxBloccoTo"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -1098,6 +1109,8 @@ namespace GMW_data { base.Columns.Add(this.columnIdxPosizioneTo); this.columntoAs400 = new global::System.Data.DataColumn("toAs400", typeof(bool), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columntoAs400); + this.columnIdxBloccoTo = new global::System.Data.DataColumn("IdxBloccoTo", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnIdxBloccoTo); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodEvento, this.columnIdxPosizione}, true)); @@ -1932,6 +1945,21 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int IdxBloccoTo { + get { + try { + return ((int)(this[this.tableTabTranPosizEventi.IdxBloccoToColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'IdxBloccoTo\' in table \'TabTranPosizEventi\' is DBNull.", e); + } + } + set { + this[this.tableTabTranPosizEventi.IdxBloccoToColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public AnagTipoEventoRow AnagTipoEventoRow { get { @@ -1971,6 +1999,16 @@ namespace GMW_data { public void SettoAs400Null() { this[this.tableTabTranPosizEventi.toAs400Column] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsIdxBloccoToNull() { + return this.IsNull(this.tableTabTranPosizEventi.IdxBloccoToColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetIdxBloccoToNull() { + this[this.tableTabTranPosizEventi.IdxBloccoToColumn] = global::System.Convert.DBNull; + } } /// @@ -3095,39 +3133,46 @@ SELECT CodEvento, DescEvento FROM AnagTipoEvento WHERE (CodEvento = @CodEvento)" tableMapping.ColumnMappings.Add("IdxPosizione", "IdxPosizione"); tableMapping.ColumnMappings.Add("IdxPosizioneTo", "IdxPosizioneTo"); tableMapping.ColumnMappings.Add("toAs400", "toAs400"); + tableMapping.ColumnMappings.Add("IdxBloccoTo", "IdxBloccoTo"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[TabTranPosizEventi] WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400)))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[TabTranPosizEventi] WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodEvento", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPosizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_toAs400", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_toAs400", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[TabTranPosizEventi] ([CodEvento], [IdxPosizione], [IdxPosizioneTo], [toAs400]) VALUES (@CodEvento, @IdxPosizione, @IdxPosizioneTo, @toAs400); -SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[TabTranPosizEventi] ([CodEvento], [IdxPosizione], [IdxPosizioneTo], [IdxBloccoTo], [toAs400]) VALUES (@CodEvento, @IdxPosizione, @IdxPosizioneTo, @IdxBloccoTo, @toAs400); +SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@toAs400", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[TabTranPosizEventi] SET [CodEvento] = @CodEvento, [IdxPosizione] = @IdxPosizione, [IdxPosizioneTo] = @IdxPosizioneTo, [toAs400] = @toAs400 WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))); -SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[TabTranPosizEventi] SET [CodEvento] = @CodEvento, [IdxPosizione] = @IdxPosizione, [IdxPosizioneTo] = @IdxPosizioneTo, [IdxBloccoTo] = @IdxBloccoTo, [toAs400] = @toAs400 WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))); +SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizione", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@toAs400", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodEvento", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPosizione", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizione", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxPosizioneTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxPosizioneTo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxBloccoTo", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxBloccoTo", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_toAs400", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_toAs400", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "toAs400", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } @@ -3248,7 +3293,7 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_toAs400) { + public virtual int Delete(string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_IdxBloccoTo, global::System.Nullable Original_toAs400) { if ((Original_CodEvento == null)) { throw new global::System.ArgumentNullException("Original_CodEvento"); } @@ -3264,14 +3309,22 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value; } - if ((Original_toAs400.HasValue == true)) { + if ((Original_IdxBloccoTo.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[5].Value = ((bool)(Original_toAs400.Value)); + this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_IdxBloccoTo.Value)); } else { this.Adapter.DeleteCommand.Parameters[4].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[5].Value = global::System.DBNull.Value; } + if ((Original_toAs400.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[7].Value = ((bool)(Original_toAs400.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[7].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -3291,7 +3344,7 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string CodEvento, int IdxPosizione, global::System.Nullable IdxPosizioneTo, global::System.Nullable toAs400) { + public virtual int Insert(string CodEvento, int IdxPosizione, global::System.Nullable IdxPosizioneTo, global::System.Nullable IdxBloccoTo, global::System.Nullable toAs400) { if ((CodEvento == null)) { throw new global::System.ArgumentNullException("CodEvento"); } @@ -3305,12 +3358,18 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi else { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } - if ((toAs400.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(toAs400.Value)); + if ((IdxBloccoTo.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(IdxBloccoTo.Value)); } else { this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; } + if ((toAs400.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((bool)(toAs400.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -3330,7 +3389,7 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string CodEvento, int IdxPosizione, global::System.Nullable IdxPosizioneTo, global::System.Nullable toAs400, string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_toAs400) { + public virtual int Update(string CodEvento, int IdxPosizione, global::System.Nullable IdxPosizioneTo, global::System.Nullable IdxBloccoTo, global::System.Nullable toAs400, string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_IdxBloccoTo, global::System.Nullable Original_toAs400) { if ((CodEvento == null)) { throw new global::System.ArgumentNullException("CodEvento"); } @@ -3344,34 +3403,48 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi else { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } - if ((toAs400.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(toAs400.Value)); + if ((IdxBloccoTo.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(IdxBloccoTo.Value)); } else { this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; } + if ((toAs400.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((bool)(toAs400.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } if ((Original_CodEvento == null)) { throw new global::System.ArgumentNullException("Original_CodEvento"); } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_CodEvento)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_CodEvento)); } - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_IdxPosizione)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_IdxPosizione)); if ((Original_IdxPosizioneTo.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_IdxPosizioneTo.Value)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_IdxPosizioneTo.Value)); } else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_IdxBloccoTo.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_IdxBloccoTo.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } if ((Original_toAs400.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(Original_toAs400.Value)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(Original_toAs400.Value)); } else { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -3392,8 +3465,8 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(global::System.Nullable IdxPosizioneTo, global::System.Nullable toAs400, string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_toAs400) { - return this.Update(Original_CodEvento, Original_IdxPosizione, IdxPosizioneTo, toAs400, Original_CodEvento, Original_IdxPosizione, Original_IdxPosizioneTo, Original_toAs400); + public virtual int Update(global::System.Nullable IdxPosizioneTo, global::System.Nullable IdxBloccoTo, global::System.Nullable toAs400, string Original_CodEvento, int Original_IdxPosizione, global::System.Nullable Original_IdxPosizioneTo, global::System.Nullable Original_IdxBloccoTo, global::System.Nullable Original_toAs400) { + return this.Update(Original_CodEvento, Original_IdxPosizione, IdxPosizioneTo, IdxBloccoTo, toAs400, Original_CodEvento, Original_IdxPosizione, Original_IdxPosizioneTo, Original_IdxBloccoTo, Original_toAs400); } } diff --git a/GMW/GMW_data/DS_SM.xsd b/GMW/GMW_data/DS_SM.xsd index 7d254b66..eae8fb3a 100644 --- a/GMW/GMW_data/DS_SM.xsd +++ b/GMW/GMW_data/DS_SM.xsd @@ -117,15 +117,17 @@ SELECT CodEvento, DescEvento FROM AnagTipoEvento WHERE (CodEvento = @CodEvento)< - + - DELETE FROM [dbo].[TabTranPosizEventi] WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))) + DELETE FROM [dbo].[TabTranPosizEventi] WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))) + + @@ -133,12 +135,13 @@ SELECT CodEvento, DescEvento FROM AnagTipoEvento WHERE (CodEvento = @CodEvento)< - INSERT INTO [dbo].[TabTranPosizEventi] ([CodEvento], [IdxPosizione], [IdxPosizioneTo], [toAs400]) VALUES (@CodEvento, @IdxPosizione, @IdxPosizioneTo, @toAs400); -SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione) + INSERT INTO [dbo].[TabTranPosizEventi] ([CodEvento], [IdxPosizione], [IdxPosizioneTo], [IdxBloccoTo], [toAs400]) VALUES (@CodEvento, @IdxPosizione, @IdxPosizioneTo, @IdxBloccoTo, @toAs400); +SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione) + @@ -151,17 +154,20 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi - UPDATE [dbo].[TabTranPosizEventi] SET [CodEvento] = @CodEvento, [IdxPosizione] = @IdxPosizione, [IdxPosizioneTo] = @IdxPosizioneTo, [toAs400] = @toAs400 WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))); -SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione) + UPDATE [dbo].[TabTranPosizEventi] SET [CodEvento] = @CodEvento, [IdxPosizione] = @IdxPosizione, [IdxPosizioneTo] = @IdxPosizioneTo, [IdxBloccoTo] = @IdxBloccoTo, [toAs400] = @toAs400 WHERE (([CodEvento] = @Original_CodEvento) AND ([IdxPosizione] = @Original_IdxPosizione) AND ((@IsNull_IdxPosizioneTo = 1 AND [IdxPosizioneTo] IS NULL) OR ([IdxPosizioneTo] = @Original_IdxPosizioneTo)) AND ((@IsNull_IdxBloccoTo = 1 AND [IdxBloccoTo] IS NULL) OR ([IdxBloccoTo] = @Original_IdxBloccoTo)) AND ((@IsNull_toAs400 = 1 AND [toAs400] IS NULL) OR ([toAs400] = @Original_toAs400))); +SELECT CodEvento, IdxPosizione, IdxPosizioneTo, IdxBloccoTo, toAs400 FROM TabTranPosizEventi WHERE (CodEvento = @CodEvento) AND (IdxPosizione = @IdxPosizione) + + + @@ -174,6 +180,7 @@ SELECT CodEvento, IdxPosizione, IdxPosizioneTo, toAs400 FROM TabTranPosizEventi + @@ -319,22 +326,22 @@ SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (Cod - + - + - - + + @@ -347,14 +354,14 @@ SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (Cod - + - + @@ -367,24 +374,25 @@ SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (Cod - + - - - + + + + - - + + @@ -397,21 +405,21 @@ SELECT CodTipoDelibera, DescDelibera, CodEvento FROM AnagTipoDelibere WHERE (Cod - + - + - + diff --git a/GMW/GMW_data/DS_SM.xss b/GMW/GMW_data/DS_SM.xss index 1dd1eac0..2e6b2bea 100644 --- a/GMW/GMW_data/DS_SM.xss +++ b/GMW/GMW_data/DS_SM.xss @@ -8,7 +8,7 @@ - + diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj index 1bee9cb5..aa26369f 100644 --- a/GMW/GMW_data/GMW_data.csproj +++ b/GMW/GMW_data/GMW_data.csproj @@ -271,6 +271,10 @@ + + + + diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index 30be6a31..e0bcd3e5 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -474,7 +474,7 @@ namespace GMW_data /// Codice dello stato del pezzo (da anagrafica: sabbiato, ...) /// Codice del magazzino in cui inserire l'UDC /// TRUE = genera movimento AS400, FALSE = NON genera movimento di magazzino - /// posizione in cui creare UDC + /// NOME della posizione default in cui creare UDC /// cod evento da associare al movimento mag /// note (opzionali) /// cod UDC pre-calcolato, se "" verrà calcolato dalla query diff --git a/GMW/GMW_data/SqlScripts/V1.2/Anagrafica/GMW_anag_tekal_435.sql b/GMW/GMW_data/SqlScripts/V1.2/Anagrafica/GMW_anag_tekal_435.sql new file mode 100644 index 00000000..1f59edea --- /dev/null +++ b/GMW/GMW_data/SqlScripts/V1.2/Anagrafica/GMW_anag_tekal_435.sql @@ -0,0 +1,21 @@ +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.FUNZIONE + VALUES (N'GMW_anime', N'Utente Anime (Tekal)') +INSERT INTO dbo.FUNZIONE + VALUES (N'GMW_animeMulti', N'Utente Anime (Tekal) - stampa multipla per esterne') +go + +commit transaction +go + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(435, GETDATE()) +GO diff --git a/GMW/GMW_data/SqlScripts/V1.2/GMW_00435.sql b/GMW/GMW_data/SqlScripts/V1.2/GMW_00435.sql index 550a1e9f..4006259a 100644 --- a/GMW/GMW_data/SqlScripts/V1.2/GMW_00435.sql +++ b/GMW/GMW_data/SqlScripts/V1.2/GMW_00435.sql @@ -124,6 +124,98 @@ go commit transaction go +set xact_abort on; +go + +begin transaction; +go + +set ANSI_NULLS on; +go + +/*************************************** +* STORED stp_ParticolariOverview +* +* elenco di overview sullo stato dei magazzini (dettaglio a "maglie larghe") +* +* Steamware, S.E.L. +* mod: 2012.05.18 +* +****************************************/ +alter PROCEDURE stp_magazzinoOverview +( + @CodCS VARCHAR(2), + @particolare NVARCHAR(15) = '' +) +AS + +-- IN PRIMIS: controllo se particolare sia null metto ''... +SET @particolare = ( SELECT ISNULL(@particolare, '') ) + +-- controllo se particolare vuoto o '*' mostro tutto... +IF(@particolare = '' OR @particolare='*') + BEGIN + SELECT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.DescBlocco, + TipoCella.Capienza * Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ AS TotCelle, + TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) AS CelleAttive, + COUNT(PosizioneUdcCorrente.UDC) AS CelleOccupate, + TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) - COUNT(PosizioneUdcCorrente.UDC) AS CelleLibere, + ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest + FROM TipoCella INNER JOIN + AnagMag INNER JOIN + Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS ON TipoCella.CodMag = AnagMag.CodMag AND + TipoCella.CodCS = AnagMag.CodCS LEFT OUTER JOIN + Celle ON TipoCella.IdxTipoCella = Celle.IdxTipoCella AND Blocchi.IdxBlocco = Celle.IdxBlocco LEFT OUTER JOIN + PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella + WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0) + GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.DescBlocco, + Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ, + TipoCella.Capienza + ORDER BY AnagMag.CodMag, Blocchi.CodBlocco + END +ELSE + BEGIN + SELECT AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.DescBlocco, + TipoCella.Capienza * Blocchi.NumX * Blocchi.NumY * Blocchi.NumZ AS TotCelle, + TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) AS CelleAttive, + COUNT(PosizioneUdcCorrente.UDC) AS CelleOccupate, + TipoCella.Capienza * COUNT(DISTINCT Celle.IdxCella) - COUNT(PosizioneUdcCorrente.UDC) AS CelleLibere, + ISNULL(MIN(PosizioneUdcCorrente.DataRif), GETDATE()) AS Oldest, ISNULL(MAX(PosizioneUdcCorrente.DataRif), GETDATE()) AS Newest + FROM TipoCella INNER JOIN + AnagMag INNER JOIN + Blocchi ON AnagMag.CodMag = Blocchi.CodMag AND AnagMag.CodCS = Blocchi.CodCS ON TipoCella.CodMag = AnagMag.CodMag AND + TipoCella.CodCS = AnagMag.CodCS LEFT OUTER JOIN + Celle ON TipoCella.IdxTipoCella = Celle.IdxTipoCella AND Blocchi.IdxBlocco = Celle.IdxBlocco LEFT OUTER JOIN + PosizioneUdcCorrente ON Celle.IdxCella = PosizioneUdcCorrente.IdxCella + INNER JOIN ElencoCartellini ec ON PosizioneUdcCorrente.UDC = ec.UDC + WHERE (Celle.Attiva = 1) AND (AnagMag.CodCS = @CodCS) AND (ISNULL(AnagMag.Nascosto, 0) = 0) AND ec.particolare = @particolare + GROUP BY AnagMag.CodCS, AnagMag.CodMag, AnagMag.DescMag, Blocchi.IdxBlocco, Blocchi.CodBlocco, Blocchi.DescBlocco, + Blocchi.NumX, Blocchi.NumY, Blocchi.NumZ, + TipoCella.Capienza + ORDER BY AnagMag.CodMag, Blocchi.CodBlocco + END + +RETURN +go + +commit; +go + + +set xact_abort on; +go + +begin transaction; +go + +drop procedure stp_annullaUDC; +go + +drop procedure stp_UDC_insNew; +go + +commit; +go diff --git a/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-SP.sql b/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-SP.sql new file mode 100644 index 00000000..c203eba0 --- /dev/null +++ b/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-SP.sql @@ -0,0 +1,70 @@ + + +set xact_abort on +go + +begin transaction +go + +alter table TabTranPosizEventi drop + constraint DF_TabTranPosizEventi_toAs400 , + constraint FK_TabTranPosizEventi_AnagPosizioni , + constraint FK_TabTranPosizEventi_AnagTipoEvento +go + +exec sp_rename 'PK_TabTranPosizEventi', 'tmp__PK_TabTranPosizEventi', 'OBJECT' +go + +exec sp_rename 'TabTranPosizEventi', 'tmp__TabTranPosizEventi_0', 'OBJECT' +go + +create table TabTranPosizEventi( + CodEvento nvarchar(10) not null, + IdxPosizione int not null, + IdxPosizioneTo int, + IdxBloccoTo int, + toAs400 bit constraint DF_TabTranPosizEventi_toAs400 default (1), + + constraint PK_TabTranPosizEventi_1 primary key(CodEvento,IdxPosizione) +) +go + +alter table TabTranPosizEventi add + constraint FK_TabTranPosizEventi_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade, + constraint FK_TabTranPosizEventi_AnagPosizioni foreign key(IdxPosizione) references AnagPosizioni(IdxPosizione) on update cascade +go + +exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'CodEvento' +go + +exec sp_addextendedproperty 'MS_Description', 'posizione (stato) logica di partenza', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxPosizione' +go + +exec sp_addextendedproperty 'MS_Description', 'posizione (stato) logica di arrivo', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxPosizioneTo' +go + +exec sp_addextendedproperty 'MS_Description', 'blocco di destinazione', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxBloccoTo' +go + +insert into TabTranPosizEventi(CodEvento,IdxPosizione,IdxPosizioneTo,toAs400) select CodEvento,IdxPosizione,IdxPosizioneTo,toAs400 from tmp__TabTranPosizEventi_0 +go + +drop table tmp__TabTranPosizEventi_0 +go + +commit +go + + +-- update x zero del blocco... +update TabTranPosizEventi +set IdxBloccoTo=0 +where (ISNULL(IdxBloccoTo,9999) = 9999) + +commit +go + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(436, GETDATE()) +GO diff --git a/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-TK.sql b/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-TK.sql new file mode 100644 index 00000000..e88cc219 --- /dev/null +++ b/GMW/GMW_data/SqlScripts/V1.2/GMW_00436-TK.sql @@ -0,0 +1,232 @@ + + +set xact_abort on +go + +begin transaction +go + +alter table TabTranPosizEventi drop + constraint DF_TabTranPosizEventi_toAs400 , + constraint FK_TabTranPosizEventi_AnagPosizioni , + constraint FK_TabTranPosizEventi_AnagTipoEvento +go + +exec sp_rename 'PK_TabTranPosizEventi', 'tmp__PK_TabTranPosizEventi', 'OBJECT' +go + +exec sp_rename 'TabTranPosizEventi', 'tmp__TabTranPosizEventi_0', 'OBJECT' +go + +create table TabTranPosizEventi( + CodEvento nvarchar(10) not null, + IdxPosizione int not null, + IdxPosizioneTo int, + IdxBloccoTo int, + toAs400 bit constraint DF_TabTranPosizEventi_toAs400 default (1), + + constraint PK_TabTranPosizEventi_1 primary key(CodEvento,IdxPosizione) +) +go + +alter table TabTranPosizEventi add + constraint FK_TabTranPosizEventi_AnagTipoEvento foreign key(CodEvento) references AnagTipoEvento(CodEvento) on update cascade, + constraint FK_TabTranPosizEventi_AnagPosizioni foreign key(IdxPosizione) references AnagPosizioni(IdxPosizione) on update cascade +go + +exec sp_addextendedproperty 'MS_Description', 'NON MODIFICARE: nel codice si usano questi campi x chiamate...', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'CodEvento' +go + +exec sp_addextendedproperty 'MS_Description', 'posizione (stato) logica di partenza', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxPosizione' +go + +exec sp_addextendedproperty 'MS_Description', 'posizione (stato) logica di arrivo', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxPosizioneTo' +go + +exec sp_addextendedproperty 'MS_Description', 'blocco di destinazione', 'SCHEMA', 'dbo', 'TABLE', 'TabTranPosizEventi', 'COLUMN', 'IdxBloccoTo' +go + +insert into TabTranPosizEventi(CodEvento,IdxPosizione,IdxPosizioneTo,toAs400) select CodEvento,IdxPosizione,IdxPosizioneTo,toAs400 from tmp__TabTranPosizEventi_0 +go + +drop table tmp__TabTranPosizEventi_0 +go + +commit +go + + + + +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.AnagPosizioni + VALUES (-2222, N'TK - Anime EXT consumate', 0) +INSERT INTO dbo.AnagPosizioni + VALUES (2222, N'TK - Anime EXT', 0) +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.AnagMag + VALUES (N'2222', N'TK', N'Anime EXT TK', 0) +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +set identity_insert dbo.Blocchi on +go + +INSERT INTO dbo.Blocchi + (IdxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ) + VALUES (64, N'2222', N'TK', N'AE', N'Descrizione n.d.', 1, 1, 1) +go + +set identity_insert dbo.Blocchi off +go + +commit transaction +go + + + +set xact_abort on +go + +begin transaction +go + +set identity_insert dbo.TipoCella on +go + +INSERT INTO dbo.TipoCella + (IdxTipoCella, CodMag, CodCS, Quantita, Capienza, Max_X, Max_Y, Max_Z, Max_Kg, CheckPiena, SetMag) + VALUES (28, N'2222', N'TK', 1, 100, 850, 900, 1300, 1000, 0, 1) +go + +set identity_insert dbo.TipoCella off +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +set identity_insert dbo.Celle on +go + +INSERT INTO dbo.Celle + (IdxCella, CodCS, CodCella, IdxTipoCella, Descrizione, Attiva, Piena, IdxBlocco, X, Y, Z) + VALUES (6201, N'TK', N'AE010101', 28, N'-', 1, 0, 64, 1, 1, 1) +go + +set identity_insert dbo.Celle off +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'DelibFusi' and IdxPosizione=7 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'DelWipPost' and IdxPosizione=305 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'DelWipPre' and IdxPosizione=290 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreAnim' and IdxPosizione=-2 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreAnim' and IdxPosizione=2 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreFin' and IdxPosizione=24 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreFus' and IdxPosizione=7 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreFus' and IdxPosizione=84 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreGbox' and IdxPosizione=24 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'MagPreWip' and IdxPosizione=84 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'SpeWipTerz' and IdxPosizione=290 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'SpeWipTerz' and IdxPosizione=295 +INSERT INTO dbo.TabTranPosizEventi + VALUES (N'UDC_ANIMA', 2, 2222, 0, 0) +INSERT INTO dbo.TabTranPosizEventi + VALUES (N'UDC_ANIMA', 2222, 2, 49, 0) +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_CONS' and IdxPosizione=2 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_CONS' and IdxPosizione=6 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_CONS' and IdxPosizione=24 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_CONS' and IdxPosizione=84 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_RIEN54' and IdxPosizione=88 +UPDATE dbo.TabTranPosizEventi SET + IdxBloccoTo=0 + WHERE CodEvento=N'UDC_RIEN84' and IdxPosizione=88 +go + +commit transaction +go + + + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(436, GETDATE()) +GO diff --git a/GMW/GMW_data/SqlScripts/V1.2/GMW_00437.sql b/GMW/GMW_data/SqlScripts/V1.2/GMW_00437.sql new file mode 100644 index 00000000..1f80a592 --- /dev/null +++ b/GMW/GMW_data/SqlScripts/V1.2/GMW_00437.sql @@ -0,0 +1,251 @@ +-- stati prodotto... +alter table AnagStatiProdotto add + CodGruppo nvarchar(50) +go + + +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.AnagStatiProdotto + VALUES (N'Anim', N'Anima (interna)', N'Finito') +INSERT INTO dbo.AnagStatiProdotto + VALUES (N'AnimExt', N'Anima (esterna)', N'Finito') +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Wip' + WHERE CodStato=N'DaSmat' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Wip' + WHERE CodStato=N'DaTran' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Finito' + WHERE CodStato=N'Fin' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Mp' + WHERE CodStato=N'MP' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Mp' + WHERE CodStato=N'MP-NA' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Wip' + WHERE CodStato=N'Sabb' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Wip' + WHERE CodStato=N'Tran' +UPDATE dbo.AnagStatiProdotto SET + CodGruppo=N'Wip' + WHERE CodStato=N'Wip' +go + +commit transaction +go + + +-- relazioni UDC +set xact_abort on +go + +begin transaction +go + +alter table RelazUDC add + dataMod datetime constraint DF_RelazUDC_dataMod default (getdate()) +go + +update RelazUDC set dataMod=getdate() +go + + +commit +go + + +update RelazUDC +set dataMod ='2012-01-01' +where ISNULL(dataMod,'2012-01-01') = '2012-01-01' +GO + + + +-- blocchi +set xact_abort on +go + +begin transaction +go + +alter table Blocchi drop + constraint i_CodBlocco , + constraint FK_Blocchi_AnagMag +go + +exec sp_rename 'PK_Blocchi', 'tmp__PK_Blocchi', 'OBJECT' +go + +exec sp_rename 'Blocchi', 'tmp__Blocchi_1', 'OBJECT' +go + +create table Blocchi( + IdxBlocco int not null constraint PK_Blocchi primary key, + CodMag nvarchar(50), + CodCS nchar(2), + CodBlocco nvarchar(3) not null constraint i_CodBlocco unique, + DescBlocco nvarchar(50), + NumX int, + NumY int, + NumZ int +) +go + +alter table Blocchi add + constraint FK_Blocchi_AnagMag foreign key(CodMag,CodCS) references AnagMag(CodMag,CodCS) on update cascade +go + +exec sp_addextendedproperty 'MS_Description', 'numero elementi X (colonne)', 'SCHEMA', 'dbo', 'TABLE', 'Blocchi', 'COLUMN', 'NumX' +go + +exec sp_addextendedproperty 'MS_Description', 'numero elementi Y (livelli/ripiani)', 'SCHEMA', 'dbo', 'TABLE', 'Blocchi', 'COLUMN', 'NumY' +go + +exec sp_addextendedproperty 'MS_Description', 'numero elementi Z (profondita)', 'SCHEMA', 'dbo', 'TABLE', 'Blocchi', 'COLUMN', 'NumZ' +go + +insert into Blocchi(IdxBlocco,CodMag,CodCS,CodBlocco,DescBlocco,NumX,NumY,NumZ) select IdxBlocco,CodMag,CodCS,CodBlocco,DescBlocco,NumX,NumY,NumZ from tmp__Blocchi_1 +go + +drop table tmp__Blocchi_1 +go + +commit +go + + +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.AnagMag + VALUES (N'0', N'00', N'Non definito', 0) +go + +commit transaction +go + + +set xact_abort on +go + +begin transaction +go + +INSERT INTO dbo.Blocchi + VALUES (0, N'0', N'00', N'000', N'Non definito', 1, 1, 1) +go + +commit transaction +go + + +-- update transizioni... +alter table TabTranPosizEventi add + constraint FK_TabTranPosizEventi_Blocchi foreign key(IdxBloccoTo) references Blocchi(IdxBlocco) on update cascade +go + + +-- update celle... +set xact_abort on +go + +begin transaction +go + +alter table Celle drop + constraint FK_Celle_TipoCella +go + + +alter table Celle add + constraint FK_Celle_Blocchi foreign key(IdxBlocco) references Blocchi(IdxBlocco) on update cascade +go + +alter table Celle add + constraint FK_Celle_TipoCella foreign key(IdxTipoCella) references TipoCella(IdxTipoCella) +go + +commit +go + +-- update insert blocchi! +set xact_abort on +go + +begin transaction +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_Blocchi_Insert +* +* crea nuovo record blocchi magazzino +* +* Steamware, S.E.L. +* mod: 2012.05.21 +* +****************************************/ +alter PROCEDURE stp_Blocchi_Insert +( + @CodMag NVARCHAR(50), + @CodCS NVARCHAR(2), + @CodBlocco NVARCHAR(3), + @DescBlocco NVARCHAR(50), + @NumX INT, + @NumY INT, + @NumZ INT +) +AS + +BEGIN TRAN + -- inizio calcolando il primo blocco libero x chiave (non è + autoincrement)... + DECLARE @idxBlocco INT + SET @idxBlocco = ( SELECT ISNULL(MAX(idxBlocco),0)+1 AS nextIdxBlocco FROM Blocchi ) + + INSERT INTO Blocchi (idxBlocco, CodMag, CodCS, CodBlocco, DescBlocco, NumX, NumY, NumZ) + VALUES (@idxBlocco, @CodMag, @CodCS, @CodBlocco, @DescBlocco, @NumX, @NumY, @NumZ) + + +COMMIT TRAN + + +RETURN +go + +commit +go + + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(437, GETDATE()) +GO diff --git a/GMW/GMW_data/StateMachine.cs b/GMW/GMW_data/StateMachine.cs index 7a528c5b..f6dabada 100644 --- a/GMW/GMW_data/StateMachine.cs +++ b/GMW/GMW_data/StateMachine.cs @@ -86,7 +86,23 @@ namespace GMW_data { } return answ; } - + /// + /// calcola dalla tabella di transizioni il blocco di destinazione associato all'evento ed alla posizione attuale + /// + /// + /// + /// + public int getIdxBloccoTo(string CodEvento, int idxPosizione) + { + int answ = 0; + try + { + answ = taTTPE.getByEventoPosizione(CodEvento, idxPosizione)[0].IdxBloccoTo; + } + catch + { } + return answ; + } /// /// Singleton accesos a state machine /// diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 6c0aa6d4..60e0c330 100644 Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll index 3d898841..e5a182ad 100644 Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index 6c0aa6d4..60e0c330 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll index a42d5132..2394b65f 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_SM.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_SM.Designer.cs.dll index bb51b2aa..b7e28634 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_SM.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_SM.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index ce16120d..ea1f15c8 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll index 3d898841..e5a182ad 100644 Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll b/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll index 17b6f3fb..6b0df50a 100644 Binary files a/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll and b/GMW/GMW_data/obj/Release/TempPE/DS_Applicazione.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Release/TempPE/DS_SM.Designer.cs.dll b/GMW/GMW_data/obj/Release/TempPE/DS_SM.Designer.cs.dll index eff39400..ccc9db55 100644 Binary files a/GMW/GMW_data/obj/Release/TempPE/DS_SM.Designer.cs.dll and b/GMW/GMW_data/obj/Release/TempPE/DS_SM.Designer.cs.dll differ diff --git a/GMW/GMW_deploy/Release/mazzConnectionStrings.config b/GMW/GMW_deploy/Release/mazzConnectionStrings.config index f929e9ae..090a45c1 100644 --- a/GMW/GMW_deploy/Release/mazzConnectionStrings.config +++ b/GMW/GMW_deploy/Release/mazzConnectionStrings.config @@ -1,3 +1,3 @@  - + \ No newline at end of file diff --git a/GMW/GMW_deploy/Source/WS/AutoCompletamento.asmx.cs b/GMW/GMW_deploy/Source/WS/AutoCompletamento.asmx.cs index 7243aa67..f3c82eb1 100644 --- a/GMW/GMW_deploy/Source/WS/AutoCompletamento.asmx.cs +++ b/GMW/GMW_deploy/Source/WS/AutoCompletamento.asmx.cs @@ -55,6 +55,25 @@ namespace GMW.WS } return suggerimenti.ToArray(); } + + [System.Web.Services.WebMethod] + public string[] elencoParticolariAnime(string prefixText, int count) + { + // inizializzo risposta + List suggerimenti = new List(); + // proseguo SOLO SE min "MinCharAutocomplete" char... + if (count >= memLayer.ML.confReadInt("MinCharAutocomplete")) + { + // elenco candidati + DS_Utility.v_selParticolariDataTable tabParticolari = utils.obj.taSelPart.getByConditioPref("", prefixText); + // aggiungo ogni riga... + foreach (DS_Utility.v_selParticolariRow riga in tabParticolari) + { + suggerimenti.Add(riga.value); + } + } + return suggerimenti.ToArray(); + } [System.Web.Services.WebMethod] public string[] elencoCelle(string prefixText, int count) { diff --git a/GMW/GMW_deploy/Source/mazzConnectionStrings.config b/GMW/GMW_deploy/Source/mazzConnectionStrings.config index f929e9ae..090a45c1 100644 --- a/GMW/GMW_deploy/Source/mazzConnectionStrings.config +++ b/GMW/GMW_deploy/Source/mazzConnectionStrings.config @@ -1,3 +1,3 @@  - + \ No newline at end of file diff --git a/GMW/GMW_test_installer/GMW_test_installer.vdproj b/GMW/GMW_test_installer/GMW_test_installer.vdproj index d5eae61f..0ff84d18 100644 --- a/GMW/GMW_test_installer/GMW_test_installer.vdproj +++ b/GMW/GMW_test_installer/GMW_test_installer.vdproj @@ -301,14 +301,14 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW_test" - "ProductCode" = "8:{68A2FCFA-67CE-417C-8AAE-6BC044AFA777}" - "PackageCode" = "8:{F36C5C9C-C69B-44C6-9AD1-22DCC88DEA1A}" + "ProductCode" = "8:{493EFCC3-43AF-413F-B141-F0A333EE6AD0}" + "PackageCode" = "8:{FF6D51E2-917D-467C-87D6-B9805CEF7840}" "UpgradeCode" = "8:{6FD64E39-D93B-4ADA-ADF3-303A1BCA49C2}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.1.433" + "ProductVersion" = "8:1.1.437" "Manufacturer" = "8:SteamWare s.r.l." "ARPHELPTELEPHONE" = "8:+39-035460560" "ARPHELPLINK" = "8:http://www.steamware.net" diff --git a/GMW/GMW_test_installer/Release/GMW_test_installer.msi b/GMW/GMW_test_installer/Release/GMW_test_installer.msi index f60bd322..d21943ce 100644 Binary files a/GMW/GMW_test_installer/Release/GMW_test_installer.msi and b/GMW/GMW_test_installer/Release/GMW_test_installer.msi differ