diff --git a/GMW/GMW/GMW.csproj b/GMW/GMW/GMW.csproj index d7267525..b71338ec 100644 --- a/GMW/GMW/GMW.csproj +++ b/GMW/GMW/GMW.csproj @@ -241,18 +241,21 @@ mod_anagBlocchi.ascx + ASPXCodeBehind mod_anagBlocchi.ascx mod_anagCelle.ascx + ASPXCodeBehind mod_anagCelle.ascx mod_anagMagazzini.ascx + ASPXCodeBehind mod_anagMagazzini.ascx @@ -266,12 +269,14 @@ mod_chLang.ascx + ASPXCodeBehind mod_chLang.ascx mod_confMag.ascx + ASPXCodeBehind mod_confMag.ascx @@ -285,6 +290,7 @@ mod_delibera.ascx + ASPXCodeBehind mod_delibera.ascx @@ -312,18 +318,21 @@ mod_detailParticolari.ascx + ASPXCodeBehind mod_detailParticolari.ascx mod_detailUDC.ascx + ASPXCodeBehind mod_detailUDC.ascx mod_dettaglioBlocco.ascx + ASPXCodeBehind mod_dettaglioBlocco.ascx @@ -337,6 +346,7 @@ mod_elencoListePrelievo.ascx + ASPXCodeBehind mod_elencoListePrelievo.ascx @@ -378,30 +388,35 @@ mod_filtro.ascx + ASPXCodeBehind mod_filtro.ascx mod_lemmiVocab.ascx + ASPXCodeBehind mod_lemmiVocab.ascx mod_listParticolari.ascx + ASPXCodeBehind mod_listParticolari.ascx mod_login.ascx + ASPXCodeBehind mod_login.ascx mod_main_help.ascx + ASPXCodeBehind mod_main_help.ascx @@ -422,12 +437,14 @@ mod_menuSx.ascx + ASPXCodeBehind mod_menuSx.ascx mod_menuTop.ascx + ASPXCodeBehind mod_menuTop.ascx @@ -455,18 +472,21 @@ mod_pageTitleAndSearch.ascx + ASPXCodeBehind mod_pageTitleAndSearch.ascx mod_paretoPartByFullSpec.ascx + ASPXCodeBehind mod_paretoPartByFullSpec.ascx mod_paretoUdcBlocco.ascx + ASPXCodeBehind mod_paretoUdcBlocco.ascx @@ -480,6 +500,7 @@ mod_ricercaGenerica.ascx + ASPXCodeBehind mod_ricercaGenerica.ascx @@ -493,6 +514,7 @@ mod_listImballi.ascx + ASPXCodeBehind mod_listImballi.ascx @@ -548,30 +570,35 @@ mod_selettore_ajax.ascx + ASPXCodeBehind mod_selettore_ajax.ascx mod_listUDC.ascx + ASPXCodeBehind mod_listUDC.ascx mod_statoMag.ascx + ASPXCodeBehind mod_statoMag.ascx mod_tipoCella.ascx + ASPXCodeBehind mod_tipoCella.ascx mod_UdcCella.ascx + ASPXCodeBehind mod_UdcCella.ascx @@ -585,12 +612,14 @@ mod_viewRigheListaPrelievo.ascx + ASPXCodeBehind mod_viewRigheListaPrelievo.ascx mod_vocabolario.ascx + ASPXCodeBehind mod_vocabolario.ascx diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs index feec98d6..5b96bf6c 100644 --- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx.cs @@ -311,7 +311,8 @@ namespace GMW.WebUserControls mod_periodoAnalisi1.eh_doUpdate += new EventHandler(mod_periodoAnalisi1_eh_doUpdate); mod_nuovaListaPrelievo1.eh_nuovoValore += new EventHandler(mod_nuovaListaPrelievo1_eh_nuovoValore); } - /// + + /// /// mostra oggetti x creare una nuova lista di prelievo /// /// diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx index dbadda8d..90e8a6c0 100644 --- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx @@ -51,12 +51,18 @@ ReadOnly="true" /> - + + Visible="true" /> + + + + CommandArgument="ScambiaUdc" ToolTip='<%# traduci("ScambiaUdc") %>' Visible='<%# scambiaVisible(Eval("Prelevato"), Eval("UDC")) %>' + Enabled='<%# scambiaEnabled(Eval("Prelevato"), Eval("UDC")) %>' ImageUrl="~/images/recycle_orange_s.png" + OnClick="imgScambia_Click" /> @@ -83,9 +91,10 @@ - + UpdateMethod="updateUDC" DeleteMethod="DeleteQuery" + onupdated="ods_Updated"> @@ -95,6 +104,10 @@ + + + +    diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs index 13b523af..5da9bade 100644 --- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs @@ -235,7 +235,7 @@ namespace GMW.WebUserControls /// public bool scambiaEnabled(object statoPrelevata, object udc) { - bool answ = (intStatoLista <= ((int) statoLista.completata)); + bool answ = (intStatoLista <= ((int)statoLista.completata)); if (answ) { // controllo se non risulti prelevato l'UDC in un altra lista... @@ -263,7 +263,7 @@ namespace GMW.WebUserControls /// public bool scambiaVisible(object statoPrelevata, object udc) { - bool answ = false; + bool answ = false; // 1° controllo: visibile SOLO se NON completata if (intStatoLista < (int)statoLista.completata) { @@ -296,6 +296,26 @@ namespace GMW.WebUserControls return answ; } /// + /// verifica se sia cancellabile + /// + /// + /// + /// + public bool delEnabled(object statoPrelevata, object udc) + { + bool answ = editRigheEnabled; + if (editRigheEnabled) + { + try + { + answ = !Convert.ToBoolean(statoPrelevata); + } + catch + { } + } + return answ; + } + /// /// verifica se sia annullabile il prelievo /// /// @@ -340,7 +360,7 @@ namespace GMW.WebUserControls 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... /// @@ -416,20 +436,27 @@ namespace GMW.WebUserControls /// protected void btnNew_Click(object sender, EventArgs e) { - // reset selezione... - resetSelezione(); - // mostro il footer oppure la riga dei dettagli x nuovo... - if (grView.FooterRow != null) - { - grView.FooterRow.Visible = true; - } + GMW_data.MagClass.magazzino.addUdcPerLista(memLayer.ML.StringSessionObj("CodLista_sel")); // sollevo evento nuovo valore... if (eh_nuovoValore != null) { eh_nuovoValore(this, new EventArgs()); } } - + /// + /// post update... + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + grView.DataBind(); + } /// /// determina se sia permesso modificare le righe di prelievo con altri UDC equivalenti /// @@ -464,5 +491,7 @@ namespace GMW.WebUserControls } #endregion + + } } \ No newline at end of file diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index aaa9af0f..0dc1f28e 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 7bbf5b2b..74a2d071 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 aaa9af0f..0dc1f28e 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 f4274e5b..05f5e494 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 405876a9..77d62241 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -20133,7 +20133,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[4]; 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, CodCella, CodMag, CodBlocco, X, Y" + @@ -20141,18 +20141,25 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co 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_getRigaPrelievoPosizioneByCodLista"; + this._commandCollection[1].CommandText = "dbo.stp_RLP_delete"; 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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodLista", global::System.Data.SqlDbType.VarChar, 12, 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("@Original_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_LP_updateUDC"; + this._commandCollection[2].CommandText = "dbo.stp_getRigaPrelievoPosizioneByCodLista"; 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("@Original_CodLista", global::System.Data.SqlDbType.VarChar, 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("@Original_UDC", 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("@UDC", 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("@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] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "dbo.stp_LP_updateUDC"; + 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("@Original_CodLista", global::System.Data.SqlDbType.VarChar, 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("@Original_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("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -20181,7 +20188,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.v_righeListePrelievoPosizioneDataTable getByCodLista(string CodLista) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((CodLista == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -20193,10 +20200,43 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int DeleteQuery(string Original_CodLista, string Original_UDC) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_CodLista == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(Original_CodLista)); + } + if ((Original_UDC == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(Original_UDC)); + } + 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 updateUDC(string Original_CodLista, string Original_UDC, string UDC) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((Original_CodLista == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 01b63900..761310cf 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -1846,6 +1846,18 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + + + + dbo.stp_RLP_delete + + + + + + + + @@ -1857,7 +1869,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co - + dbo.stp_LP_updateUDC diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index 08757fdf..87eca52e 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -8,23 +8,23 @@ - + - - - + + + - + - - - - - - - + + + + + + + @@ -63,7 +63,7 @@ - + 712 @@ -135,7 +135,7 @@ - + 392 diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index eb0345d1..1eaca2f9 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -921,6 +921,35 @@ namespace GMW_data return answ; } /// + /// Aggiunge UN SOLO UDC in logica FIFO tra gli UDC "liberi" disponibili + /// + /// codice della lista di prelievo + /// esito comando + public esitoOperazione addUdcPerLista(string CodLista) + { + esitoOperazione answ = esitoOperazione.errore; + try + { + // ricavo dati + DS_magazzino.ElencoListePrelievoRow riga = taElencoListePrelievo.getByCodLista(CodLista)[0]; + // rigenero righe UDC da prelevare + DS_magazzino.ElencoCartelliniDataTable tabellaElencoCartellini = new DS_magazzino.ElencoCartelliniDataTable(); + // aggiungo l'UDC + vecchio (se c'è) + try + { + tabellaElencoCartellini.ImportRow(taElencoCartellini.getUdcUnusedOlder(CodLista)[0]); + } + catch(Exception e) + { + logger.lg.scriviLog(String.Format("Errore in aggiunta UDC a lista prelievo: {0}", e), tipoLog.EXCEPTION); + } + allocaRigheListaPrelievo(riga.QtaTot, CodLista, tabellaElencoCartellini); + } + catch + { } + return answ; + } + /// /// vero/falso che l'utent eha una lista di prelievo attiva /// public bool userHasActiveLP diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 7bbf5b2b..74a2d071 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 7bbf5b2b..74a2d071 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 90b60014..a27a1600 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