diff --git a/GMW/GMW/GMW.csproj b/GMW/GMW/GMW.csproj index 5977467c..0cde506b 100644 --- a/GMW/GMW/GMW.csproj +++ b/GMW/GMW/GMW.csproj @@ -820,6 +820,15 @@ + + + + + + + + + diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx index 3ec80a91..3fb8c882 100644 --- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx @@ -5,7 +5,7 @@ TagPrefix="uc1" %> <%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %> <%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc3" %> - +
diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx index 8db6ef5b..5fb5e829 100644 --- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx @@ -38,7 +38,7 @@ @@ -48,6 +48,12 @@ OnClick="imgAnnullato_Click" /> + + diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs index 765972ea..b719e671 100644 --- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs @@ -171,12 +171,6 @@ namespace GMW.WebUserControls /// protected void grView_SelectedIndexChanged(object sender, EventArgs e) { -#if false - // salvo in session il lo stato scelto... - SteamWare.memLayer.ML.setSessionVal("DescStato_sel", grView.SelectedDataKey["DescStato"], false); - // salvo anche l'esponente scelto... - SteamWare.memLayer.ML.setSessionVal("Esponente_sel", grView.SelectedDataKey["Esponente"], false); -#endif // sollevo evento nuovo valore... if (eh_selValore != null) { @@ -189,10 +183,6 @@ namespace GMW.WebUserControls /// public void resetSelezione() { -#if false - SteamWare.memLayer.ML.emptySessionVal("DescStato_sel"); - SteamWare.memLayer.ML.emptySessionVal("Esponente_sel"); -#endif grView.SelectedIndex = -1; grView.DataBind(); lblWarning.Visible = false; @@ -202,28 +192,74 @@ namespace GMW.WebUserControls } } /// + /// fornisce verifica se l'udc sia già stato prelevato altrove... + /// + /// + /// + public bool udcPrelevato(object udc) + { + return GMW_data.MagClass.magazzino.taRigheListePrelievo.getPrelevateByUdc(udc.ToString()).Rows.Count > 0; + } + /// /// verifica se sia prelevabile /// - /// + /// + /// /// - public bool prelevaEnabled(object statoPrelevata) + public bool prelevaEnabled(object statoPrelevata, object udc) { bool answ = prelievoEnabled; if (prelievoEnabled) { - try + // controllo se non risulti prelevato l'UDC in un altra lista... + if (udcPrelevato(udc)) { - answ = !Convert.ToBoolean(statoPrelevata); + answ = false; + } + else + { + try + { + answ = !Convert.ToBoolean(statoPrelevata); + } + catch + { } } - catch - { } } return answ; } /// + /// verifica se sia scambiabile + /// + /// + /// + /// + public bool scambiaEnabled(object statoPrelevata, object udc) + { + bool answ = prelievoEnabled; + if (prelievoEnabled) + { + // controllo se non risulti prelevato l'UDC in un altra lista... + if (!udcPrelevato(udc)) + { + answ = false; + } + else + { + try + { + answ = !Convert.ToBoolean(statoPrelevata); + } + catch + { } + } + } + return answ; + } + /// /// verifica se sia annullabile il prelievo /// - /// + /// /// public bool annullaEnabled(object annullaPrelevata) { @@ -258,6 +294,15 @@ namespace GMW.WebUserControls SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "annullaPrelievo"); } /// + /// salvo in session che il prox comando è confermare prelievo... + /// + /// + /// + protected void imgScambia_Click(object sender, ImageClickEventArgs e) + { + SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "scambiaFifo"); + } + /// /// in caso di aggiornamento verifico se sia salvato un comando inizia o completa lista prelievo... /// /// @@ -278,7 +323,11 @@ namespace GMW.WebUserControls switch (_comando) { case "confermaPrelievo": - GMW_data.MagClass.magazzino.confermaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC); + // controllo SE sia ancora prelevabile questo UDC... + if (!udcPrelevato(UDC)) + { + GMW_data.MagClass.magazzino.confermaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC); + } updateOdsDaFiltro(); grView.EditIndex = -1; grView.DataBind(); @@ -303,6 +352,19 @@ namespace GMW.WebUserControls // blocco update! e.Cancel = true; break; + case "scambiaFifo": + //GMW_data.MagClass.magazzino.annullaUdcPrelevatoPerLista(memLayer.ML.StringSessionObj("CodCS"), codLista, UDC); + updateOdsDaFiltro(); + grView.EditIndex = -1; + grView.DataBind(); + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + // blocco update! + e.Cancel = true; + break; default: // faccio update! break; diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 46e9f8d5..7682988c 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 d0d00fa3..175e30a5 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/images/recycle_green_l.png b/GMW/GMW/images/recycle_green_l.png new file mode 100644 index 00000000..53a95f6f Binary files /dev/null and b/GMW/GMW/images/recycle_green_l.png differ diff --git a/GMW/GMW/images/recycle_green_m.png b/GMW/GMW/images/recycle_green_m.png new file mode 100644 index 00000000..aa81afea Binary files /dev/null and b/GMW/GMW/images/recycle_green_m.png differ diff --git a/GMW/GMW/images/recycle_green_s.png b/GMW/GMW/images/recycle_green_s.png new file mode 100644 index 00000000..c3a939ba Binary files /dev/null and b/GMW/GMW/images/recycle_green_s.png differ diff --git a/GMW/GMW/images/recycle_orange_l.png b/GMW/GMW/images/recycle_orange_l.png new file mode 100644 index 00000000..5726ffd6 Binary files /dev/null and b/GMW/GMW/images/recycle_orange_l.png differ diff --git a/GMW/GMW/images/recycle_orange_m.png b/GMW/GMW/images/recycle_orange_m.png new file mode 100644 index 00000000..ce55acdd Binary files /dev/null and b/GMW/GMW/images/recycle_orange_m.png differ diff --git a/GMW/GMW/images/recycle_orange_s.png b/GMW/GMW/images/recycle_orange_s.png new file mode 100644 index 00000000..8c22c675 Binary files /dev/null and b/GMW/GMW/images/recycle_orange_s.png differ diff --git a/GMW/GMW/images/recycle_red_l.png b/GMW/GMW/images/recycle_red_l.png new file mode 100644 index 00000000..28be1399 Binary files /dev/null and b/GMW/GMW/images/recycle_red_l.png differ diff --git a/GMW/GMW/images/recycle_red_m.png b/GMW/GMW/images/recycle_red_m.png new file mode 100644 index 00000000..bb9dcfaf Binary files /dev/null and b/GMW/GMW/images/recycle_red_m.png differ diff --git a/GMW/GMW/images/recycle_red_s.png b/GMW/GMW/images/recycle_red_s.png new file mode 100644 index 00000000..59a27199 Binary files /dev/null and b/GMW/GMW/images/recycle_red_s.png differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 46e9f8d5..7682988c 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 6ce8a1af..1583f29c 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 c2463326..78848f4c 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -16835,7 +16835,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[4]; + 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"; @@ -16848,18 +16848,24 @@ 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_righePrelevateByUdc"; 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[2].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] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_UDC_upsertPrelevato"; + 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_UDC_upsertPrelevato"; + 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()] @@ -16903,8 +16909,24 @@ 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 getPrelevateByUdc(string UDC) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].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 setAnnullaUdcPrelevato(string CodLista, string UDC) { + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((CodLista == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -16926,7 +16948,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_magazzino.RigheListePrelievoDataTable upsertPrelevato(string CodLista, string UDC) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((CodLista == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index c5d2c232..561820cc 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -1509,6 +1509,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + dbo.stp_righePrelevateByUdc + + + + + + + @@ -1634,6 +1645,154 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1643,120 +1802,117 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1771,178 +1927,143 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1956,102 +2077,210 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + + + + + + + + + + - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2066,248 +2295,30 @@ 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 eaeff728..49df5a38 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -19,7 +19,7 @@ - + @@ -102,12 +102,12 @@ - 109 + 133 659 - 109 - 901 + 133 + 846 @@ -115,11 +115,11 @@ 393 - 1004 + 949 - 306 - 1004 + 363 + 949 diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index d0d00fa3..175e30a5 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 d0d00fa3..175e30a5 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 0616919f..059ba2d7 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