diff --git a/GMW/GMW.suo b/GMW/GMW.suo index 734135ff..d5f134db 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 ea5d31ca..8a313e43 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 efd68f93..aa898b7f 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 ea5d31ca..8a313e43 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 8299ae94..578235e9 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 9fd657e0..fbeddae7 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -10105,28 +10105,34 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [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 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 FROM dbo.ElencoCartellini"; 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 = "dbo.stp_getUDC_Older"; + this._commandCollection[1].CommandText = "dbo.stp_getDetailsUdcByUdc"; 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("@ESPONENTE", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PARTICOLARE", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].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[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_UDC_updateQty"; + this._commandCollection[2].CommandText = "dbo.stp_getUDC_Older"; 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("@UDC", global::System.Data.SqlDbType.VarChar, 20, 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("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 16, 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ESPONENTE", global::System.Data.SqlDbType.VarChar, 50, 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("@PARTICOLARE", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_UDC_updateQty"; + 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, 20, 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, 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("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, 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("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10154,8 +10160,24 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [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.ElencoCartelliniDataTable getOlderUDC(string ESPONENTE, string PARTICOLARE) { + public virtual DS_magazzino.ElencoCartelliniDataTable getDetailsUdcByUdc(string UDC) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); + } + DS_magazzino.ElencoCartelliniDataTable dataTable = new DS_magazzino.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)] + public virtual DS_magazzino.ElencoCartelliniDataTable getOlderUDC(string ESPONENTE, string PARTICOLARE) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((ESPONENTE == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -10177,7 +10199,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_magazzino.ElencoCartelliniDataTable updateQty(string UDC, string CodSoggetto, string CodTipoDichiaraz, string CodEvento, global::System.Nullable Qta) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -17703,7 +17725,7 @@ 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[3]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; 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"; @@ -17716,11 +17738,25 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co 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].CommandText = "dbo.stp_insertRigaListaNew"; 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, "", "", "")); + this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_setAnnullaUdcPrelevato"; + 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("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, 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("@UDC", global::System.Data.SqlDbType.NVarChar, 50, 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_setUdcPrelevato"; + 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("@CodLista", global::System.Data.SqlDbType.NVarChar, 12, 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", 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()] @@ -17764,7 +17800,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co [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) { + public virtual DS_magazzino.RigheListePrelievoDataTable insertRigaListaNew(string CodLista, string UDC) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((CodLista == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -17783,6 +17819,50 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co 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[3]; + 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); + 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 setUdcPrelevato(string CodLista, string UDC) { + this.Adapter.SelectCommand = this.CommandCollection[4]; + 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); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(DS_magazzino.RigheListePrelievoDataTable dataTable) { diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 83d94f5d..ecb81b55 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -217,6 +217,17 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno + + + + dbo.stp_getDetailsUdcByUdc + + + + + + + @@ -1680,6 +1691,18 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + dbo.stp_insertRigaListaNew + + + + + + + + @@ -1692,6 +1715,18 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + dbo.stp_setUdcPrelevato + + + + + + + + @@ -1703,6 +1738,154 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1712,120 +1895,117 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1840,178 +2020,143 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2025,102 +2170,159 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2135,123 +2337,36 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - + + + + + + + + + + @@ -2259,95 +2374,15 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + @@ -2357,26 +2392,26 @@ 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 561db68e..108de4f1 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -4,9 +4,9 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + @@ -20,7 +20,7 @@ - + @@ -115,7 +115,7 @@ 109 - 782 + 799 109 diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index 3c97044e..caf361e7 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -346,6 +346,45 @@ namespace GMW_data return answ; } + /// + /// Verifica la corrispondenza dati tra RigheListePrelievo ed ElencoCartellini + /// + /// + /// + /// + /// + public bool verificaDatiUdc(string CodCS, string CodLista, string UDC) + { + bool answ = false; + + DS_magazzino.ElencoListePrelievoDataTable tabellaElenco = taElencoListePrelievo.getByCodLista(CodLista); + DS_magazzino.ElencoListePrelievoRow rigaElenco = tabellaElenco[0]; + + DS_magazzino.ElencoCartelliniDataTable tabellaUDC = taElencoCartellini.getDetailsUdcByUdc(UDC); + DS_magazzino.ElencoCartelliniRow rigaUDC = tabellaUDC[0]; + + // ricavo dati da confrontare - da codlista ricavo particolare/esponente/figura + string particolareCodLista = rigaElenco.Particolare; + string esponenteCodLista = rigaElenco.Esponente; + // string figuraCodLista; + + //stessi dati da UDC + string particolareUDC = rigaUDC.Particolare; + string esponenteUDC = rigaUDC.Esponente; + // string figuraUDC; + + if (particolareCodLista == particolareUDC && esponenteCodLista == esponenteUDC) + { + answ = true; + } + else + { + answ = false; + } + + return answ; + } + /// /// Conferma che un dato UDC è stato prelevato per soddisfare la lista di prelievo ed aggiorna o aggiunge riga in RigheListePrelievo /// @@ -356,32 +395,54 @@ namespace GMW_data public esitoOperazione confermaUdcPrelevatoPerLista(string CodCS, string CodLista, string UDC) { esitoOperazione answ = esitoOperazione.errore; - - /* conferma solo gli udc prenotati (non da terminalino ma da terminale ...) - * - * due casi: usato da finestra web standard - confermo singola riga lista già creata e proposta e la confermo come prelevata (stored che fa update) - * altro caso: più da terminalino -> trovo un altro cassone non proposto con stesso cod particolare - il carrellista ha trovato un altro udc e lo associa alla lista di prelievo - CodLista - li spara entrambi e dà conferma che ha prelevato quello che potrebbe non essere tra le righe previste -> stored che se esiste riga fa update se no la crea come proposto = false e prelevato = true - - - - + /* - * Questa funzione va chiamata da web o da terminalino ogni volta che si fa una conferma di avvenuto prelievo, ovvero il carrellista ha DAVVERO prelevato un UDC associato ad una lista - * * - in primis controllo: dal CodLista ottengo particolare/esponente/figura * - controllo da UDC gli stessi dati * - se i dati non corrispondono esco e mando falso (non è permesso scaricare x una lista di prelievo particolari "sbagliati" --> in questo caso vedere l'enum in fondo al codice ed usare esitoOperazione.errore_mismatch - * * - se i dati corrispondono allora * - cerco, se esiste riga x questo UDC metto solo check come prelevato * - se non c'è riga x questo UDC la creo e metto prelevato = si, proposto = no (1/0) - * * - se tutto ok passo esito ok - * * */ - return answ; + // ricavo dati da ta + DS_magazzino.RigheListePrelievoDataTable tabellaRighe = taRigheListePrelievo.getByCodLista(CodLista); + DS_magazzino.RigheListePrelievoRow rigaRighe = tabellaRighe[0]; + + // verifico che i dati corrispondano con il metodo relativo (vedi sopra) + bool datiUdcOk = verificaDatiUdc(CodCS, CodLista, UDC); + + // se i dati esistono procedo - prima verifico le condizioni poi eseguo stored + if (tabellaRighe.Rows.Count > 0) + { + // se i dati non corrispondono dò errore mismatch + if (datiUdcOk) + { + // questo ok da computer vedere poi per terminalino + taRigheListePrelievo.setUdcPrelevato(CodLista, UDC); + answ = esitoOperazione.ok; + } + else + { + return answ = esitoOperazione.errore_mismatch; + } + } + + else + { + // se non esiste riga la creo e setto come prelevato + taRigheListePrelievo.insertRigaListaNew(CodLista, UDC); + + // restituisco ok + answ = esitoOperazione.ok; + } + + return answ; } + + + /// /// annulla il prelievo di un UDC, aggiornando RigheListePrelievo (solo preventivato...) /// diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index efd68f93..aa898b7f 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 efd68f93..aa898b7f 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 6d7c44ba..307e592c 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_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index 38dcdc05..6c048e9a 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