diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll
index 81cb0561..32ae4613 100644
Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ
diff --git a/GMW-RT/bin/GMW_data.dll b/GMW-RT/bin/GMW_data.dll
index 323dab89..153a44d9 100644
Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ
diff --git a/GMW-RT/bin/SteamWare.dll b/GMW-RT/bin/SteamWare.dll
index 8099bdb8..95b2d3ad 100644
Binary files a/GMW-RT/bin/SteamWare.dll and b/GMW-RT/bin/SteamWare.dll differ
diff --git a/GMW-UT/bin/GMW-UT.dll b/GMW-UT/bin/GMW-UT.dll
index dbc4b71d..6fb7c5b6 100644
Binary files a/GMW-UT/bin/GMW-UT.dll and b/GMW-UT/bin/GMW-UT.dll differ
diff --git a/GMW-UT/bin/GMW_data.dll b/GMW-UT/bin/GMW_data.dll
index 323dab89..153a44d9 100644
Binary files a/GMW-UT/bin/GMW_data.dll and b/GMW-UT/bin/GMW_data.dll differ
diff --git a/GMW-UT/bin/SteamWare.dll b/GMW-UT/bin/SteamWare.dll
index 8099bdb8..95b2d3ad 100644
Binary files a/GMW-UT/bin/SteamWare.dll and b/GMW-UT/bin/SteamWare.dll differ
diff --git a/GMW/WebUserControls/mod_rimuoviNC.ascx.cs b/GMW/WebUserControls/mod_rimuoviNC.ascx.cs
index dc54c1c1..ff6b7f68 100644
--- a/GMW/WebUserControls/mod_rimuoviNC.ascx.cs
+++ b/GMW/WebUserControls/mod_rimuoviNC.ascx.cs
@@ -87,7 +87,7 @@ namespace GMW.WebUserControls
{
case tipoCodiceBarcode.Comando:
// verifico se contenga uno dei 3 tipi di selezione operativa...
- string RNC_Mode = barcodeIn.Replace(memLayer.ML.confReadString("prefComandi"),"");
+ string RNC_Mode = barcodeIn.Replace(memLayer.ML.confReadString("prefComandi"), "");
if (RNC_Mode != "")
{
Response.Redirect(string.Format("{0}?RNC_Mode={1}", user_std.pagCorrente, RNC_Mode));
@@ -95,29 +95,24 @@ namespace GMW.WebUserControls
doUpdate();
break;
case tipoCodiceBarcode.UDC:
- // verifico UDC
- //if (checkUDC(barcodeIn))
- //{
- // string AL = "";
- // // recupero da UDC
- // try
- // {
- // AL = MagClass.magazzino.taAL2UDC.getByUDC(barcodeIn)[0].AL;
- // }
- // catch
- // {
- // Postazione.warningText = traduci("ErroreUdcNonAl");
- // Postazione.CssClass = "stileComandoKo";
- // }
- // if (AL != "")
- // {
- // // verifico AL
- // if (checkAL(AL))
- // {
- // sourceAL = AL;
- // }
- // }
- //}
+ // verifico UDC a seconda di azione richiesta...
+ string attrRes = "";
+ string attr2chk = "";
+ if (memLayer.ML.QSS("RNC_Mode") == "rem")
+ {
+ attrRes = "NC";
+ attr2chk = "DE";
+ }
+ else
+ {
+ attrRes = "DE";
+ attr2chk = "NC";
+ }
+ if (checkUDC(barcodeIn, attrRes, attr2chk))
+ {
+ // proseguo assegnado/togliendo attributo...
+ // !!!FARE!!!
+ }
doUpdate();
break;
default:
@@ -146,5 +141,32 @@ namespace GMW.WebUserControls
txtBarcode.Focus();
}
+ ///
+ /// Verifica l'UDC se sia ok x procedere:
+ /// - esista
+ /// - abbia una NC (successiva all'ultima DElibera)
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected bool checkUDC(string UDC, string AttrRes, string AttrCheck)
+ {
+ bool answ = false;
+ //faccio 3 controlli...
+ bool udcOk = MagClass.magazzino.checkUDC(UDC);
+ bool udcHasNC = (DataProxy.obj.taUDC2NC.getNcPending(UDC, AttrRes, AttrCheck).Rows.Count > 0);
+ // condizioni tutte soddisfatte?
+ answ = (udcOk && udcHasNC);
+ if (!answ)
+ {
+ Postazione.warningText = traduci("ErroreUdcRNC");
+ }
+ else
+ {
+ Postazione.warningText = "";
+ }
+ return answ;
+ }
}
}
\ No newline at end of file
diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll
index b6aeec43..ce8619b2 100644
Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ
diff --git a/GMW/bin/GMW_data.dll b/GMW/bin/GMW_data.dll
index 323dab89..153a44d9 100644
Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ
diff --git a/GMW/bin/SteamWare.dll b/GMW/bin/SteamWare.dll
index 8099bdb8..95b2d3ad 100644
Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ
diff --git a/GMW_data/DS_Applicazione.Designer.cs b/GMW_data/DS_Applicazione.Designer.cs
index 111cf031..76f82055 100644
--- a/GMW_data/DS_Applicazione.Designer.cs
+++ b/GMW_data/DS_Applicazione.Designer.cs
@@ -27017,7 +27017,7 @@ SELECT IdxNC, CodNC, DescrNC, TipoCart, DataFrom, DataTo, SearchNote, DtCreaz, I
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
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 *\r\nFROM v_UDC_NC";
@@ -27041,12 +27041,20 @@ SELECT IdxNC, CodNC, DescrNC, TipoCart, DataFrom, DataTo, SearchNote, DtCreaz, I
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxNC", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_ENC2U_toggle";
+ this._commandCollection[3].CommandText = "dbo.stp_ENC2U_getNcPending";
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("@IdxNC", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 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.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("@IsSel", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@attrRes", global::System.Data.SqlDbType.NVarChar, 2, 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("@attr2chk", global::System.Data.SqlDbType.NVarChar, 2, 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_ENC2U_toggle";
+ 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("@IdxNC", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsSel", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -27137,11 +27145,40 @@ SELECT IdxNC, CodNC, DescrNC, TipoCart, DataFrom, DataTo, SearchNote, DtCreaz, I
return dataTable;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_Applicazione.UDC_NCDataTable getNcPending(string UDC, string attrRes, string attr2chk) {
+ this.Adapter.SelectCommand = this.CommandCollection[3];
+ if ((UDC == null)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC));
+ }
+ if ((attrRes == null)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((string)(attrRes));
+ }
+ if ((attr2chk == null)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((string)(attr2chk));
+ }
+ DS_Applicazione.UDC_NCDataTable dataTable = new DS_Applicazione.UDC_NCDataTable();
+ this.Adapter.Fill(dataTable);
+ return dataTable;
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
public virtual int toggleSel(global::System.Nullable IdxNC, string UDC, global::System.Nullable IsSel) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3];
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4];
if ((IdxNC.HasValue == true)) {
command.Parameters[1].Value = ((int)(IdxNC.Value));
}
diff --git a/GMW_data/DS_Applicazione.xsd b/GMW_data/DS_Applicazione.xsd
index 6f5b4d1d..052a4dc6 100644
--- a/GMW_data/DS_Applicazione.xsd
+++ b/GMW_data/DS_Applicazione.xsd
@@ -4,7 +4,7 @@
-
+
@@ -2057,6 +2057,19 @@ FROM v_UDC_NC
+
+
+
+ dbo.stp_ENC2U_getNcPending
+
+
+
+
+
+
+
+
+
diff --git a/GMW_data/DS_Applicazione.xss b/GMW_data/DS_Applicazione.xss
index f3726a8e..7a98a289 100644
--- a/GMW_data/DS_Applicazione.xss
+++ b/GMW_data/DS_Applicazione.xss
@@ -27,8 +27,8 @@
-
-
+
+