diff --git a/GMW/GMW.suo b/GMW/GMW.suo index 3cb2d915..7bcd1114 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 c8b3b68b..695587c5 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 659ef0e5..327e11ad 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/bin/SteamWare.dll b/GMW/GMW/bin/SteamWare.dll index 38db19f3..6586ad46 100644 Binary files a/GMW/GMW/bin/SteamWare.dll and b/GMW/GMW/bin/SteamWare.dll differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index c8b3b68b..695587c5 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 d3526bf3..11480acb 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW/testFunzioni.aspx b/GMW/GMW/testFunzioni.aspx index 71ca2a2c..8dc21c13 100644 --- a/GMW/GMW/testFunzioni.aspx +++ b/GMW/GMW/testFunzioni.aspx @@ -13,7 +13,11 @@ - + +
+ diff --git a/GMW/GMW/testFunzioni.aspx.cs b/GMW/GMW/testFunzioni.aspx.cs index 7dea96e7..01d4e909 100644 --- a/GMW/GMW/testFunzioni.aspx.cs +++ b/GMW/GMW/testFunzioni.aspx.cs @@ -18,7 +18,11 @@ namespace GMW protected void Button1_Click(object sender, EventArgs e) { MagClass.magazzino.creaListaPrelievo("MA", "20", "P00505005162", "NEUTRO", "10", 1500, "I0054"); + } + protected void Button2_Click(object sender, EventArgs e) + { + MagClass.magazzino.iniziaListaPrelievo("MA", "KMA100600005", "0000000000000080"); } } } diff --git a/GMW/GMW/testFunzioni.aspx.designer.cs b/GMW/GMW/testFunzioni.aspx.designer.cs index 5cd6d107..cd21a6cd 100644 --- a/GMW/GMW/testFunzioni.aspx.designer.cs +++ b/GMW/GMW/testFunzioni.aspx.designer.cs @@ -39,5 +39,14 @@ namespace GMW { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Button2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button2; } } diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs index d210b877..17a77df9 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -16771,7 +16771,7 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[4]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM dbo.ElencoListePrelievo"; @@ -16801,6 +16801,13 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Esponente", global::System.Data.SqlDbType.NVarChar, 6, 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("@CodImballo", global::System.Data.SqlDbType.NVarChar, 15, 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("@QtaTot", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, 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_updateCodSoggettoListePrelievo"; + 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("@NewCodSoggetto", global::System.Data.SqlDbType.NChar, 16, 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("@CodListaAttuale", global::System.Data.SqlDbType.VarChar, 12, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16929,6 +16936,28 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg 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.ElencoListePrelievoDataTable updateCodSoggetto(string NewCodSoggetto, string CodListaAttuale) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((NewCodSoggetto == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(NewCodSoggetto)); + } + if ((CodListaAttuale == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(CodListaAttuale)); + } + DS_magazzino.ElencoListePrelievoDataTable dataTable = new DS_magazzino.ElencoListePrelievoDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(DS_magazzino.ElencoListePrelievoDataTable dataTable) { diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index fa7c2d69..59740f7b 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -1549,6 +1549,18 @@ SELECT CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSogg + + + + dbo.stp_updateCodSoggettoListePrelievo + + + + + + + + @@ -1627,6 +1639,154 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1636,120 +1796,117 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1764,178 +1921,143 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1949,102 +2071,180 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2059,241 +2259,53 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + - + - - - + + + - + - + - - - + + + diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index c1327eea..ad3d1a3d 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -19,7 +19,7 @@ - + @@ -99,11 +99,11 @@ 671 - 959 + 966 - 659 - 959 + 644 + 966 @@ -122,12 +122,12 @@ - 359 - 821 + 344 + 828 266 - 821 + 828 266 diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index 0d022153..7589bbcf 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -292,13 +292,29 @@ namespace GMW_data // la query recupera la lista in base al CodLista o TAB o RIGA - //DS_magazzino.ElencoListePrelievoDataTable tabella = taElencoListePrelievo.getByCodLista(CodLista); - //DS_magazzino.ElencoListePrelievoRow riga = taElencoListePrelievo.getByCodLista(CodLista)[0]; + DS_magazzino.ElencoListePrelievoDataTable tabella = taElencoListePrelievo.getByCodLista(CodLista); + DS_magazzino.ElencoListePrelievoRow riga = tabella[0]; - //if (tabella.Rows.Count > 0) - //{ - - //} + // se la lista esiste... + if (tabella.Rows.Count > 0) + { + // se la lista è ancora non completata + if (riga.Completata == false) + { + taElencoListePrelievo.updateCodSoggetto(CodSoggetto, CodLista); + answ = esitoOperazione.ok; + } + // se è già completata dà errore + else + { + answ = esitoOperazione.errore_readOnly; + } + } + // se la lista non esiste dai errore + else + { + answ = esitoOperazione.errore; + } diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 659ef0e5..327e11ad 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/Debug/SteamWare.dll b/GMW/GMW_data/bin/Debug/SteamWare.dll index 38db19f3..6586ad46 100644 Binary files a/GMW/GMW_data/bin/Debug/SteamWare.dll and b/GMW/GMW_data/bin/Debug/SteamWare.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index 659ef0e5..327e11ad 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/ResolveAssemblyReference.cache b/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache index 55a0b168..6d2c0655 100644 Binary files a/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_data/obj/Debug/ResolveAssemblyReference.cache 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 31f24829..298ebae6 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