diff --git a/GMW/GMW.suo b/GMW/GMW.suo
index 1b681bdf..77e24af5 100644
Binary files a/GMW/GMW.suo and b/GMW/GMW.suo differ
diff --git a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
index c701e684..13b523af 100644
--- a/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
+++ b/GMW/GMW/WebUserControls/mod_viewRigheListaPrelievo.ascx.cs
@@ -263,11 +263,15 @@ namespace GMW.WebUserControls
///
public bool scambiaVisible(object statoPrelevata, object udc)
{
- bool answ = false;
- if (udcPrelevato(udc))
+ bool answ = false;
+ // 1° controllo: visibile SOLO se NON completata
+ if (intStatoLista < (int)statoLista.completata)
{
- //answ = true;
- answ = !Convert.ToBoolean(statoPrelevata);
+ if (udcPrelevato(udc))
+ {
+ //answ = true;
+ answ = !Convert.ToBoolean(statoPrelevata);
+ }
}
return answ;
}
diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll
index 646a1d7e..15356b3e 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 5d41378f..d33ea08e 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 646a1d7e..15356b3e 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 37150634..25e50d5e 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 c3041869..6282d3bb 100644
--- a/GMW/GMW_data/DS_magazzino.Designer.cs
+++ b/GMW/GMW_data/DS_magazzino.Designer.cs
@@ -18497,7 +18497,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[6];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.V_ElencoListePrelievo";
@@ -18542,12 +18542,18 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
this._commandCollection[4].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[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
- this._commandCollection[5].CommandText = "dbo.stp_elencoListePrelievoUpdateStato";
+ this._commandCollection[5].CommandText = "dbo.stp_LP_exportToAs400";
this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[5].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[5].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[5].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, "", "", ""));
- this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoLista", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[5].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[6] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[6].Connection = this.Connection;
+ this._commandCollection[6].CommandText = "dbo.stp_elencoListePrelievoUpdateStato";
+ this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[6].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[6].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[6].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, "", "", ""));
+ this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodStatoLista", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -18708,7 +18714,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.ElencoListePrelievoDataTable updateStato(string NewCodSoggetto, string CodListaAttuale, global::System.Nullable CodStatoLista) {
- this.Adapter.SelectCommand = this.CommandCollection[5];
+ this.Adapter.SelectCommand = this.CommandCollection[6];
if ((NewCodSoggetto == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -18758,6 +18764,33 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
}
return returnValue;
}
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ public virtual int stp_LP_exportToAs400(string CodLista) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
+ if ((CodLista == null)) {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[1].Value = ((string)(CodLista));
+ }
+ 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;
+ }
}
///
diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd
index f6a85dba..8a287442 100644
--- a/GMW/GMW_data/DS_magazzino.xsd
+++ b/GMW/GMW_data/DS_magazzino.xsd
@@ -1677,6 +1677,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
+
+
+
+ dbo.stp_LP_exportToAs400
+
+
+
+
+
+
+
@@ -1808,273 +1819,127 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2089,17 +1954,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -2109,14 +1974,270 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss
index bfc6a19a..97694fb2 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.
-->
-
+
diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs
index b1ae8f4f..4fc44fe8 100644
--- a/GMW/GMW_data/MagClass.cs
+++ b/GMW/GMW_data/MagClass.cs
@@ -494,7 +494,7 @@ namespace GMW_data
// se la lista esiste...
if (trovate > 0)
{
- // se la lista è iniziata
+ // se la lista è completata
if (riga.CodStatoLista == (int)statoLista.completata)
{
// ricavo il codtipolista
@@ -515,7 +515,7 @@ namespace GMW_data
foreach (DS_magazzino.RigheListePrelievoRow row in tabellaRigheListaPrelievo.Rows)
{
- // ricavo il codice UDC ... fai con foreach
+ // ricavo il codice UDC...
string UDC = row.UDC;
// mi serve per posizione udc corrente
DS_magazzino.PosizioneUdcCorrenteRow rigaUdcCorrente = taPosUdcCorr.getByUDC(UDC)[0];
@@ -528,6 +528,8 @@ namespace GMW_data
taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.scaricata);
// restituisce ok
answ = esitoOperazione.ok;
+ // ora eseguo stored x copiare in altra tabella (quella per AS...)
+ taElencoListePrelievo.stp_LP_exportToAs400(CodLista);
}
// se è già completata dà errore
else
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 5d41378f..d33ea08e 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 5d41378f..d33ea08e 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 ef9e4e92..a8b563a0 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