diff --git a/GMW/GMW.suo b/GMW/GMW.suo index 8ae0cda1..734135ff 100644 Binary files a/GMW/GMW.suo and b/GMW/GMW.suo differ diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 09a52171..ea5d31ca 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 fb9d2755..efd68f93 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 09a52171..ea5d31ca 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 1d1f6080..8299ae94 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs index c2ed384a..9fd657e0 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -11855,9 +11855,10 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella = this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxCella", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "SELECT *\r\nFROM dbo.PosizioneUdcCorrente\r\nwhere UDC = @UDC"; - this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "UDC", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].CommandText = "dbo.stp_getPosizioneByUdc"; + 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.NVarChar, 50, 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_spostaUdc"; @@ -11951,10 +11952,10 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella = public virtual DS_magazzino.PosizioneUdcCorrenteDataTable getByUDC(string UDC) { this.Adapter.SelectCommand = this.CommandCollection[4]; if ((UDC == null)) { - throw new global::System.ArgumentNullException("UDC"); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(UDC)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); } DS_magazzino.PosizioneUdcCorrenteDataTable dataTable = new DS_magazzino.PosizioneUdcCorrenteDataTable(); this.Adapter.Fill(dataTable); @@ -16463,11 +16464,10 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT CodCS, CodCliente, CodImballo, CodLista, CodSoggetto, CodTipoLista, Comple" + - "tata, DataCreaz, DescParticolare, DisegnoGrezzo, Esponente, Iniziata, Particolar" + - "e, QtaTot, RagSociale FROM ElencoListePrelievo WHERE (CodLista = @CodLista)"; - this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, "CodLista", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].CommandText = "dbo.stp_getElencoListaByCodLista"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; this._commandCollection[2].CommandText = "dbo.stp_creaListaPrelievo"; @@ -16529,10 +16529,10 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg public virtual DS_magazzino.ElencoListePrelievoDataTable getByCodLista(string CodLista) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((CodLista == null)) { - throw new global::System.ArgumentNullException("CodLista"); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CodLista)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista)); } DS_magazzino.ElencoListePrelievoDataTable dataTable = new DS_magazzino.ElencoListePrelievoDataTable(); this.Adapter.Fill(dataTable); @@ -17293,9 +17293,10 @@ SELECT CodTipoLista, DescrLista, IdxPosizione, CodCella FROM TipoListaPrelievo W this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT *\r\nFROM dbo.TipoListaPrelievo\r\nwhere CodTipoLista = @CodTipoLista"; - this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoLista", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "CodTipoLista", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].CommandText = "dbo.stp_getTipoListaByCodTipoLista"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoLista", global::System.Data.SqlDbType.NVarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -17326,10 +17327,10 @@ SELECT CodTipoLista, DescrLista, IdxPosizione, CodCella FROM TipoListaPrelievo W public virtual DS_magazzino.TipoListaPrelievoDataTable getByCodTipoLista(string CodTipoLista) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((CodTipoLista == null)) { - throw new global::System.ArgumentNullException("CodTipoLista"); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CodTipoLista)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodTipoLista)); } DS_magazzino.TipoListaPrelievoDataTable dataTable = new DS_magazzino.TipoListaPrelievoDataTable(); this.Adapter.Fill(dataTable); @@ -17702,16 +17703,24 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM dbo.RigheListePrelievo"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "SELECT *\r\nFROM dbo.RigheListePrelievo\r\nwhere CodLista = @CodLista"; - this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, "CodLista", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].CommandText = "dbo.stp_getRigaPrelievoByCodLista"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_setAnnullaUdcPrelevato"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].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, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -17742,10 +17751,32 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co public virtual DS_magazzino.RigheListePrelievoDataTable getByCodLista(string CodLista) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((CodLista == null)) { - throw new global::System.ArgumentNullException("CodLista"); + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(CodLista)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista)); + } + DS_magazzino.RigheListePrelievoDataTable dataTable = new DS_magazzino.RigheListePrelievoDataTable(); + 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)] + public virtual DS_magazzino.RigheListePrelievoDataTable setAnnullaUdcPrelevato(string CodLista, string UDC) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((CodLista == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista)); + } + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(UDC)); } DS_magazzino.RigheListePrelievoDataTable dataTable = new DS_magazzino.RigheListePrelievoDataTable(); this.Adapter.Fill(dataTable); diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 258de4a8..83d94f5d 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -446,14 +446,13 @@ SELECT UDC, IdxCella, CodCS, DataRif FROM PosizioneUdcCorrente WHERE (IdxCella = - + - - SELECT * -FROM dbo.PosizioneUdcCorrente -where UDC = @UDC + + dbo.stp_getPosizioneByUdc - + + @@ -1471,12 +1470,13 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg - + - - SELECT CodCS, CodCliente, CodImballo, CodLista, CodSoggetto, CodTipoLista, Completata, DataCreaz, DescParticolare, DisegnoGrezzo, Esponente, Iniziata, Particolare, QtaTot, RagSociale FROM ElencoListePrelievo WHERE (CodLista = @CodLista) + + dbo.stp_getElencoListaByCodLista - + + @@ -1590,14 +1590,13 @@ SELECT CodTipoLista, DescrLista, IdxPosizione, CodCella FROM TipoListaPrelievo W - + - - SELECT * -FROM dbo.TipoListaPrelievo -where CodTipoLista = @CodTipoLista + + dbo.stp_getTipoListaByCodTipoLista - + + @@ -1670,14 +1669,25 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + - - SELECT * -FROM dbo.RigheListePrelievo -where CodLista = @CodLista + + dbo.stp_getRigaPrelievoByCodLista - + + + + + + + + + + dbo.stp_setAnnullaUdcPrelevato + + + + diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index 05250962..561db68e 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -4,11 +4,11 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + @@ -18,9 +18,9 @@ - - - + + + @@ -63,15 +63,15 @@ 693 - 800 + 803 676 - 800 + 803 676 - 773 + 795 @@ -99,7 +99,7 @@ - + 697 @@ -111,7 +111,7 @@ - + 109 @@ -123,7 +123,7 @@ - + 335 diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index 2012c033..3c97044e 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -389,9 +389,9 @@ namespace GMW_data /// codice della lista di prelievo /// Codice UDC /// esito comando - public bool annullaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC) + public esitoOperazione annullaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC) { - bool answ = false; + esitoOperazione answ = esitoOperazione.errore_mismatch; /* * Questa funzione va chiamata da web o da terminalino ogni volta che si fa un annullamento di avvenuto prelievo, ovvero il carrellista ha ANNULLATO un prelievo di un UDC associato ad una lista @@ -405,6 +405,21 @@ namespace GMW_data * * */ + // ricavo dati + DS_magazzino.RigheListePrelievoDataTable tabella = taRigheListePrelievo.getByCodLista(CodLista); + DS_magazzino.RigheListePrelievoRow riga = tabella[0]; + + // se i dati esistono procedo - eseguo stored che setta non prelevato = false per la riga selezionata + if (tabella.Rows.Count > 0) + { + taRigheListePrelievo.setAnnullaUdcPrelevato(CodLista, UDC); + answ = esitoOperazione.ok; + } + + else + { + answ = esitoOperazione.errore_mismatch; + } return answ; } diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index fb9d2755..efd68f93 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/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index fb9d2755..efd68f93 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_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index fc11393a..38dcdc05 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