diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll
index 6a6101b3..8c2a568d 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 7bd0d263..1e0a0c29 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 35a826d9..15ccc10c 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 6a6101b3..8c2a568d 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 685cd581..fea040b1 100644
Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ
diff --git a/GMW/GMW_Term/Web.config b/GMW/GMW_Term/Web.config
index 6410e67f..4d4a42f6 100644
--- a/GMW/GMW_Term/Web.config
+++ b/GMW/GMW_Term/Web.config
@@ -58,7 +58,7 @@
-
+
diff --git a/GMW/GMW_Term/WebUserControls/mod_listePrelievo.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_listePrelievo.ascx.cs
index 1ad30474..7e4f35bc 100644
--- a/GMW/GMW_Term/WebUserControls/mod_listePrelievo.ascx.cs
+++ b/GMW/GMW_Term/WebUserControls/mod_listePrelievo.ascx.cs
@@ -429,17 +429,25 @@ namespace GMW_Term.WebUserControls
e.Cancel = true;
break;
case "CompletaListaPrelievo":
- GMW_data.MagClass.magazzino.completaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
- updateOds();
- grView.EditIndex = -1;
- grView.DataBind();
- // sollevo evento nuovo valore...
- if (eh_nuovoValore != null)
+ esitoOperazione esitoCompleta = GMW_data.MagClass.magazzino.completaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
+ if (esitoCompleta == esitoOperazione.ok)
{
- eh_nuovoValore(this, new EventArgs());
+ updateOds();
+ grView.EditIndex = -1;
+ grView.DataBind();
+ // sollevo evento nuovo valore...
+ if (eh_nuovoValore != null)
+ {
+ eh_nuovoValore(this, new EventArgs());
+ }
+ // tolgo dalla session la lista prelievo attuale...
+ memLayer.ML.emptySessionVal("CodLista_sel");
+ }
+ else if (esitoCompleta == esitoOperazione.errore_noUdc)
+ {
+ GMW_data.MagClass.magazzino.attivaListaPrelievo(memLayer.ML.StringSessionObj("CodCS"), codLista, CodSoggetto);
+ logger.lg.scriviLog(string.Format("Lista di prelievo {0} rilasciata poiché senza UDC prelevati da aprte dell'opertore {1}", codLista, CodSoggetto), tipoLog.INFO);
}
- // tolgo dalla session la lista prelievo attuale...
- memLayer.ML.emptySessionVal("CodLista_sel");
// blocco update!
e.Cancel = true;
break;
@@ -822,8 +830,8 @@ namespace GMW_Term.WebUserControls
public string trimma(string testo, int maxChar)
{
- string answ= testo;
- if(testo.Length > maxChar)
+ string answ = testo;
+ if (testo.Length > maxChar)
{
answ = testo.Substring(0, 10);
}
diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll
index 8a117b47..ee08ffd9 100644
Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll
index 7bd0d263..b9f3330e 100644
Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ
diff --git a/GMW/GMW_Term/mazzAppSettings.config b/GMW/GMW_Term/mazzAppSettings.config
index d64930e7..33fbca08 100644
--- a/GMW/GMW_Term/mazzAppSettings.config
+++ b/GMW/GMW_Term/mazzAppSettings.config
@@ -7,7 +7,7 @@
-
+
diff --git a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
index 1f077ee0..2cd39128 100644
--- a/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
+++ b/GMW/GMW_Term_installer/GMW_Term_installer.vdproj
@@ -330,14 +330,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:GMW_Term"
- "ProductCode" = "8:{F7E67D25-BDD8-4AA3-817F-875B81C8DE9A}"
- "PackageCode" = "8:{17F23C03-F3B4-4A0C-B4B8-39CFE9ED77E5}"
+ "ProductCode" = "8:{A0F61B97-AE51-4A05-98E0-FD6D524EFB93}"
+ "PackageCode" = "8:{779D3101-7377-4B65-90E8-80F2A3F38F7D}"
"UpgradeCode" = "8:{B348C50D-8DAD-4430-AEF0-60800C94CB78}"
"RestartWWWService" = "11:TRUE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:1.0.335"
+ "ProductVersion" = "8:1.0.336"
"Manufacturer" = "8:SteamWare s.r.l."
"ARPHELPTELEPHONE" = "8:+39-035460560"
"ARPHELPLINK" = "8:http://www.steamware.net"
diff --git a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi
index 700cc0c9..85e86da1 100644
Binary files a/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi and b/GMW/GMW_Term_installer/Release/GMW_Term_installer.msi differ
diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs
index 8077e849..77c1acbc 100644
--- a/GMW/GMW_data/DS_magazzino.Designer.cs
+++ b/GMW/GMW_data/DS_magazzino.Designer.cs
@@ -22336,7 +22336,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[8];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9];
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";
@@ -22349,44 +22349,50 @@ 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_righePrelevateByUdc";
+ this._commandCollection[2].CommandText = "dbo.stp_getRigaPrelievoByCodListaPrelevate";
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, 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_setAnnullaUdcPrelevato";
+ this._commandCollection[3].CommandText = "dbo.stp_righePrelevateByUdc";
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[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, "", "", ""));
this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[4].Connection = this.Connection;
- this._commandCollection[4].CommandText = "dbo.stp_RigheListePrelievo_eliminaNonPrelevate";
+ this._commandCollection[4].CommandText = "dbo.stp_setAnnullaUdcPrelevato";
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.VarChar, 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("@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, "", "", ""));
this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[5].Connection = this.Connection;
- this._commandCollection[5].CommandText = "dbo.stp_RLP_sbloccaNonPrelevate";
+ this._commandCollection[5].CommandText = "dbo.stp_RigheListePrelievo_eliminaNonPrelevate";
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("@CodLista", global::System.Data.SqlDbType.NVarChar, 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("@UDC", global::System.Data.SqlDbType.NVarChar, 50, 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("@CodLista", global::System.Data.SqlDbType.VarChar, 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_RLP_updateQty";
+ this._commandCollection[6].CommandText = "dbo.stp_RLP_sbloccaNonPrelevate";
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("@UDC", global::System.Data.SqlDbType.VarChar, 50, 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("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[6].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].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[7] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[7].Connection = this.Connection;
- this._commandCollection[7].CommandText = "dbo.stp_UDC_upsertPrelevato";
+ this._commandCollection[7].CommandText = "dbo.stp_RLP_updateQty";
this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure;
this._commandCollection[7].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[7].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[7].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[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[8].Connection = this.Connection;
+ this._commandCollection[8].CommandText = "dbo.stp_UDC_upsertPrelevato";
+ this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure;
+ this._commandCollection[8].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[8].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[8].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()]
@@ -22430,8 +22436,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 getPrelevateByUdc(string UDC) {
+ public virtual DS_magazzino.RigheListePrelievoDataTable getByCodListaPrelevate(string CodLista) {
this.Adapter.SelectCommand = this.CommandCollection[2];
+ if ((CodLista == null)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(CodLista));
+ }
+ 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 getPrelevateByUdc(string UDC) {
+ this.Adapter.SelectCommand = this.CommandCollection[3];
if ((UDC == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -22447,7 +22469,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 setAnnullaUdcPrelevato(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;
}
@@ -22469,7 +22491,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[7];
+ this.Adapter.SelectCommand = this.CommandCollection[8];
if ((CodLista == null)) {
this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -22690,7 +22712,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RigheListePrelievo_eliminaNonPrelevate(string CodLista) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
if ((CodLista == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -22717,7 +22739,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RLP_sbloccaNonPrelevate(string CodLista, string UDC) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
if ((CodLista == null)) {
command.Parameters[1].Value = global::System.DBNull.Value;
}
@@ -22750,7 +22772,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int stp_RLP_updateQty(string UDC, global::System.Nullable Qta) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7];
if ((UDC == 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 a3c06a0a..39683a1e 100644
--- a/GMW/GMW_data/DS_magazzino.xsd
+++ b/GMW/GMW_data/DS_magazzino.xsd
@@ -1748,6 +1748,17 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co
+
+
+
+ dbo.stp_getRigaPrelievoByCodListaPrelevate
+
+
+
+
+
+
+
@@ -2539,274 +2550,127 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2821,18 +2685,18 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -2842,7 +2706,154 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2856,99 +2867,99 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
@@ -2959,6 +2970,343 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2975,358 +3323,21 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -3339,131 +3350,131 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
-
+
+
-
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -3483,8 +3494,8 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
-
+
+
@@ -3497,74 +3508,74 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss
index d4a012c5..56c8ca74 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 @@
-
+
@@ -112,7 +112,7 @@
208
- 846
+ 820
@@ -123,7 +123,7 @@
949
- 330
+ 339
949
diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj
index e58015a2..1e20b57d 100644
--- a/GMW/GMW_data/GMW_data.csproj
+++ b/GMW/GMW_data/GMW_data.csproj
@@ -161,6 +161,7 @@
SettingsSingleFileGenerator
Settings.Designer.cs
+
diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs
index 3be4d76d..f6f58da7 100644
--- a/GMW/GMW_data/MagClass.cs
+++ b/GMW/GMW_data/MagClass.cs
@@ -859,34 +859,43 @@ namespace GMW_data
// se la lista è ancora non completata
if (riga.CodStatoLista == (int)statoLista.iniziata)
{
- // ricavo il codtipolista
- string codTipoListaAttuale = riga.CodTipoLista;
-
- //leggo da tipoLista prelievo alcuni dati (es codcella di destinazione)
- DS_magazzino.TipoListaPrelievoDataTable tabellaTipoLista = taTipoListaPrelievo.getByCodTipoLista(codTipoListaAttuale);
- DS_magazzino.TipoListaPrelievoRow rigaTipoLista = tabellaTipoLista[0];
-
- // leggo da righe lista prelievo il dato udc che mi serve
- DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodLista(CodLista);
- DS_magazzino.RigheListePrelievoRow rigaListaPrelievo = tabellaRigheListaPrelievo[0];
-
- // leggo il codice della cella...
- string codCellaDestAttuale = rigaTipoLista.CodCella;
- // lo trasformo x avere la cella di destinazione...
- int idxCellaTo = taCelle.getByCodCella(codCellaDestAttuale)[0].IdxCella;
- // sposto ("metto a terra") gli UDC
- foreach (DS_magazzino.RigheListePrelievoRow row in tabellaRigheListaPrelievo.Rows)
+ // controllo se ALMENO un UDC sia stsato prelevato
+ int numUdcPrelevati = taRigheListePrelievo.getByCodListaPrelevate(CodLista).Rows.Count;
+ if (numUdcPrelevati > 0)
{
- // ricavo il codice UDC...
- string _UDC = row.UDC;
- // sposto UDC
- spostaUDC(CodCS, _UDC, idxCellaTo, false);
- // dopo aver spostato UDC sistemo eventuali Righe di Prelievo x lo stesso UDC pending...
- magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, _UDC);
- }
+ // ricavo il codtipolista
+ string codTipoListaAttuale = riga.CodTipoLista;
- taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.completata);
- answ = esitoOperazione.ok;
+ //leggo da tipoLista prelievo alcuni dati (es codcella di destinazione)
+ DS_magazzino.TipoListaPrelievoDataTable tabellaTipoLista = taTipoListaPrelievo.getByCodTipoLista(codTipoListaAttuale);
+ DS_magazzino.TipoListaPrelievoRow rigaTipoLista = tabellaTipoLista[0];
+
+ // leggo da righe lista prelievo il dato udc che mi serve
+ DS_magazzino.RigheListePrelievoDataTable tabellaRigheListaPrelievo = taRigheListePrelievo.getByCodLista(CodLista);
+ DS_magazzino.RigheListePrelievoRow rigaListaPrelievo = tabellaRigheListaPrelievo[0];
+
+ // leggo il codice della cella...
+ string codCellaDestAttuale = rigaTipoLista.CodCella;
+ // lo trasformo x avere la cella di destinazione...
+ int idxCellaTo = taCelle.getByCodCella(codCellaDestAttuale)[0].IdxCella;
+ // sposto ("metto a terra") gli UDC
+ foreach (DS_magazzino.RigheListePrelievoRow row in tabellaRigheListaPrelievo.Rows)
+ {
+ // ricavo il codice UDC...
+ string _UDC = row.UDC;
+ // sposto UDC
+ spostaUDC(CodCS, _UDC, idxCellaTo, false);
+ // dopo aver spostato UDC sistemo eventuali Righe di Prelievo x lo stesso UDC pending...
+ magazzino.taRigheListePrelievo.stp_RLP_sbloccaNonPrelevate(CodLista, _UDC);
+ }
+
+ taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.completata);
+ answ = esitoOperazione.ok;
+ }
+ else //nessun UDC prelevato
+ {
+ answ = esitoOperazione.errore_noUdc;
+ }
}
// se è già completata o NON iniziata dà errore
else
@@ -1299,7 +1308,8 @@ public enum esitoOperazione
errore, // non è andata, errore generico
errore_mismatch, // errore x mancanza corrispondenza tra dati (particolare-esponente-figura di lista ed UDC, ad esempio)
errore_readOnly, // errore xché ild ato è read only o bloccato (es lista di prelievo già completata, NON posso riprenderla in carico)
- errore_posUDC // errore perché UDC è in una posizione che non consente l'operazione indicata
+ errore_posUDC, // errore perché UDC è in una posizione che non consente l'operazione indicata
+ errore_noUdc
}
public enum statoLista
diff --git a/GMW/GMW_data/SqlScripts/GMW_00336.sql b/GMW/GMW_data/SqlScripts/GMW_00336.sql
new file mode 100644
index 00000000..cdfe2422
--- /dev/null
+++ b/GMW/GMW_data/SqlScripts/GMW_00336.sql
@@ -0,0 +1,125 @@
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_getRigaPrelievoByCodListaPrelevate
+* restituisce elenco delle SOLE righe prelevate (UDC)
+*
+* Steamware, S.E.L.
+* mod: 2010.12.10
+*
+************************************/
+create PROCEDURE stp_getRigaPrelievoByCodListaPrelevate
+(
+ @CodLista NVARCHAR(12)
+)
+AS
+
+SELECT *
+FROM RigheListePrelievo
+WHERE (CodLista = @CodLista) AND Prelevato = 1
+go
+
+commit
+go
+
+
+set xact_abort on
+go
+
+begin transaction
+go
+
+set ANSI_NULLS on
+go
+
+/***************************************
+* STORED stp_UDC_delibera
+*
+* fa la delibera dell'UDC andando a processare la state machien e quindi eventualmente cambiando la sua posizione
+*
+* Steamware, S.E.L.
+* mod: 2010.09.13
+*
+************************************/
+alter PROCEDURE stp_UDC_delibera
+(
+ @CodTipoDelibera NVARCHAR(50),
+ @UDC NVARCHAR(50),
+ @CodSoggetto NVARCHAR(17),
+ @CodCS VARCHAR(2)
+)
+
+AS
+
+BEGIN TRAN
+ DECLARE @IdxPosizioneTo AS INT
+ DECLARE @IdxPosizioneFrom AS INT
+ DECLARE @IdxPosizionePre AS NVARCHAR(50)
+ DECLARE @IdxCellaPre AS INT
+ DECLARE @IdxCellaTo AS INT
+
+ -- ricavo cella ATTUALE
+ SET @IdxCellaPre = (SELECT IdxCella FROM PosizioneUdcCorrente WHERE UDC = @UDC)
+
+ -- ricavo posizione ATTUALE
+ SET @IdxPosizionePre = (SELECT TOP 1 b.CodMag FROM Celle c INNER JOIN Blocchi b ON c.IdxBlocco=b.IdxBlocco WHERE c.IdxCella = @IdxCellaPre)
+
+
+ -- registro delibera
+ INSERT INTO DELIBERE
+ VALUES (@CodTipoDelibera, @UDC, GETDATE(), @CodSoggetto)
+
+ -- ricavo nuova posizione
+ SET @IdxPosizioneTo = (SELECT tt.IdxPosizioneTo
+ FROM TabTranPosizEventi tt INNER JOIN AnagTipoDelibere atd ON tt.CodEvento = atd.CodEvento
+ WHERE (atd.CodTipoDelibera = @CodTipoDelibera))
+
+ -- ricavo posizione TEORICA VECCHIA
+ SET @IdxPosizioneFrom = (SELECT tt.IdxPosizione
+ FROM TabTranPosizEventi tt INNER JOIN AnagTipoDelibere atd ON tt.CodEvento = atd.CodEvento
+ WHERE (atd.CodTipoDelibera = @CodTipoDelibera))
+
+ -- calcolo la prima cella della nuova posizione...
+ SET @IdxCellaTo = (
+ SELECT TOP 1 IdxCella FROM Celle
+ WHERE IdxBlocco = (
+ SELECT IdxBlocco FROM Blocchi
+ WHERE CodMag=CAST(@IdxPosizioneTo AS NVARCHAR(50)))
+ )
+
+ -- faccio update posizione
+ UPDATE ElencoCartellini
+ SET IdxPosizione = @IdxPosizioneTo, ModDate = GETDATE()
+ WHERE UDC = @UDC
+
+ -- controllo posizioni actual e from teorica: SE e SOLO SE corrispondono faccio spostamento...
+ IF(CAST(@IdxPosizioneFrom AS NVARCHAR(50)) = @IdxPosizionePre)
+ BEGIN
+ -- ora cambio anche la posizione corrente dell'UDC (e tramite trigger storicizza...)
+ EXEC stp_spostaUdc @CodCS, @UDC, @IdxCellaTo, 0
+ END
+
+COMMIT TRAN
+
+
+RETURN
+go
+
+commit
+go
+
+
+
+
+
+
+-- registro versione...
+INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(336, GETDATE())
+GO
diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll
index 7bd0d263..1e0a0c29 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 ba92c82c..15ccc10c 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/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll
index dbb489c6..b9f3330e 100644
Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/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 7bd0d263..1e0a0c29 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 f4bc0b4a..29eeb133 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 ae40ef5a..42434d3c 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
diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll
index dbb489c6..b9f3330e 100644
Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ