diff --git a/GMW/WebUserControls/mod_PostProveMecc.ascx b/GMW/WebUserControls/mod_PostProveMecc.ascx
index 38507f80..5ec24f41 100644
--- a/GMW/WebUserControls/mod_PostProveMecc.ascx
+++ b/GMW/WebUserControls/mod_PostProveMecc.ascx
@@ -8,6 +8,8 @@
+
<%:traduci("Reset") %>
+
@@ -55,6 +57,7 @@
+
@@ -90,6 +93,7 @@
@@ -137,6 +141,7 @@
+
diff --git a/GMW/WebUserControls/mod_PostProveMecc.ascx.cs b/GMW/WebUserControls/mod_PostProveMecc.ascx.cs
index 0b429271..8cf17088 100644
--- a/GMW/WebUserControls/mod_PostProveMecc.ascx.cs
+++ b/GMW/WebUserControls/mod_PostProveMecc.ascx.cs
@@ -79,9 +79,11 @@ namespace GMW.WebUserControls
///
private void resetIN()
{
+ grViewDPM.SelectedIndex = -1;
+ grViewTT.SelectedIndex = -1;
barcodeIn = "";
NumTT_Delib = "";
- NumTT_Delib = "";
+ NumTT_NoDelib = "";
EsitoPM = "";
}
///
@@ -108,6 +110,34 @@ namespace GMW.WebUserControls
}
}
///
+ /// Verifica l'AL se sia ok x procedere:
+ /// - Tipo "R"
+ /// - Attivo
+ ///
+ ///
+ ///
+ protected bool checkAL(string AL)
+ {
+ bool answ = false;
+ try
+ {
+ answ = MagClass.magazzino.taEA.getByAL_TipoAttivo(AL, "T").Rows.Count > 0;
+ }
+ catch
+ { }
+ if (!answ)
+ {
+ Postazione.warningText = traduci("ErroreAlNonRxAttivo");
+ Postazione.CssClass = "stileComandoKo";
+ }
+ else
+ {
+ Postazione.warningText = "";
+ Postazione.CssClass = "stileComandoOk";
+ }
+ return answ;
+ }
+ ///
/// controlla se ci sia un barcode
///
private void checkBarcode()
@@ -128,7 +158,6 @@ namespace GMW.WebUserControls
*
* */
-#if false
if (barcodeIn != "")
{
Postazione.messaggiText = string.Format("{0}: {1}", traduci("BCodeIns"), barcodeIn);
@@ -138,35 +167,17 @@ namespace GMW.WebUserControls
// verifico AL
if (checkAL(barcodeIn))
{
- sourceAL = barcodeIn;
+ // calcolo TT
+ NumTT_NoDelib = MagClass.magazzino.taET.getByAL(barcodeIn)[0].Trattamento;
+ // lo imposto come source o dest...
+ NumTT_Delib = NumTT_NoDelib;
}
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;
- }
- }
- }
- doUpdate();
+ case tipoCodiceBarcode.TT:
+ // imposto il trattamento termico nei 2 filtri...
+ NumTT_NoDelib = barcodeIn;
+ NumTT_Delib = barcodeIn;
break;
case tipoCodiceBarcode.Comando:
// se è reset cancello tutto!
@@ -191,8 +202,7 @@ namespace GMW.WebUserControls
{
Postazione.messaggiText = traduci("AttesaBCode");
Postazione.CssClass = "stileAttesa";
- }
-#endif
+ }
doUpdate();
}
///
@@ -208,22 +218,22 @@ namespace GMW.WebUserControls
{
eh_reqUpdate(this, new EventArgs());
}
- // controllo SE ho AL allora seleziono NumTratt o EsitoPM...
- if (barcodeIn == "")
+ // determino focus a seconda di cosa ho già in selezione..
+ if (EsitoPM != "")
{
- txtBarcode.Focus();
+ lbtDeliberaTT.Focus();
}
else
{
- if (EsitoPM== "")
+ if (NumTT_Delib != "" || NumTT_NoDelib != "")
{
txtEsitoPM.Focus();
}
else
{
- lbtDeliberaTT.Focus();
+ txtBarcode.Focus();
}
- }
+ }
}
///
/// fix visibilità btnStampa
@@ -234,7 +244,7 @@ namespace GMW.WebUserControls
bool btnVis = (NumTT_Delib != "" || NumTT_NoDelib != "");
divEsitoPM.Visible = btnVis;
// posso stampare se ho numero tratt ed EsitoPM..
- btnVis = (NumTT_Delib != "" || NumTT_NoDelib != "" && EsitoPM != "");
+ btnVis = ((NumTT_Delib != "" || NumTT_NoDelib != "") && EsitoPM != "");
divDelibera.Visible = btnVis;
}
///
@@ -248,12 +258,21 @@ namespace GMW.WebUserControls
decimal PM = 0;
try
{
- PM = Convert.ToDecimal(txtEsitoPM.Text.Trim().Replace(".",","));
+ PM = Convert.ToDecimal(txtEsitoPM.Text.Trim().Replace(".", ","));
}
catch { }
if (PM != 0)
{
- MagClass.magazzino.taET.updatePM(barcodeIn, PM, DateTime.Now, MagClass.magazzino.CodSoggCurrUser);
+ string numTratt = "";
+ if (NumTT_Delib != "")
+ {
+ numTratt = NumTT_Delib;
+ }
+ else if (NumTT_NoDelib != "")
+ {
+ numTratt = NumTT_NoDelib;
+ }
+ MagClass.magazzino.taET.updatePM(numTratt, PM, DateTime.Now, MagClass.magazzino.CodSoggCurrUser);
// svuota selezioni delibere
resetIN();
Postazione.CssClass = "stileAttesa";
@@ -294,7 +313,9 @@ namespace GMW.WebUserControls
protected void grViewDPM_SelectedIndexChanged(object sender, EventArgs e)
{
NumTT_Delib = grViewDPM.SelectedDataKey["Trattamento"].ToString();
+ NumTT_NoDelib = NumTT_Delib;
barcodeIn = NumTT_Delib;
+ //grViewDPM.SelectedIndex = -1;
checkBarcode();
}
///
@@ -305,8 +326,34 @@ namespace GMW.WebUserControls
protected void grViewTT_SelectedIndexChanged(object sender, EventArgs e)
{
NumTT_NoDelib = grViewTT.SelectedDataKey["Trattamento"].ToString();
+ NumTT_Delib = NumTT_NoDelib;
barcodeIn = NumTT_NoDelib;
+ //grViewTT.SelecktedIndex = -1;
checkBarcode();
}
+ ///
+ /// reset selezione AL non deliberato
+ ///
+ ///
+ ///
+ protected void lbtnResetNoPM_Click(object sender, EventArgs e)
+ {
+ NumTT_Delib = "";
+ NumTT_NoDelib = "";
+ doUpdate();
+ }
+ ///
+ /// reset selezione AL già deliberato
+ ///
+ ///
+ ///
+ protected void lbtnResetPM_Click(object sender, EventArgs e)
+ {
+ NumTT_Delib = "";
+ NumTT_NoDelib = "";
+ doUpdate();
+ }
+
+
}
}
\ No newline at end of file
diff --git a/GMW/WebUserControls/mod_PostProveMecc.ascx.designer.cs b/GMW/WebUserControls/mod_PostProveMecc.ascx.designer.cs
index 8a432017..dd9444b0 100644
--- a/GMW/WebUserControls/mod_PostProveMecc.ascx.designer.cs
+++ b/GMW/WebUserControls/mod_PostProveMecc.ascx.designer.cs
@@ -21,6 +21,15 @@ namespace GMW.WebUserControls {
///
protected global::System.Web.UI.WebControls.Label lblNtDelib;
+ ///
+ /// lbtnResetPM control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtnResetPM;
+
///
/// grViewDPM control.
///
@@ -111,6 +120,15 @@ namespace GMW.WebUserControls {
///
protected global::System.Web.UI.WebControls.Label lblNtNoDelib;
+ ///
+ /// lbtnResetNoPM control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtnResetNoPM;
+
///
/// grViewTT control.
///
diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll
index 50a4740b..400028ea 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 eebb375f..69bd5fe7 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 984d4162..428a2f3b 100644
Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ
diff --git a/GMW_data/DS_magazzino.Designer.cs b/GMW_data/DS_magazzino.Designer.cs
index c338ffdd..0827088e 100644
--- a/GMW_data/DS_magazzino.Designer.cs
+++ b/GMW_data/DS_magazzino.Designer.cs
@@ -39807,18 +39807,19 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat
this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.VarChar, 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_ET_getByKey";
+ this._commandCollection[2].CommandText = "dbo.stp_ET_getByPeriodoPM";
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("@DataStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
+ this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Trattamento", 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("@HasPM", 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_ET_getByPeriodoPM";
+ this._commandCollection[3].CommandText = "dbo.stp_ET_getByTratt";
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("@DataStart", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataEnd", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@HasPM", 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("@Trattamento", 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_ET_updatePM";
@@ -39875,25 +39876,8 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat
[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_magazzino.ElencoTrattamentiDataTable getByKey(string Trattamento) {
+ public virtual DS_magazzino.ElencoTrattamentiDataTable getByPeriodo(global::System.Nullable DataStart, global::System.Nullable DataEnd, string Trattamento, global::System.Nullable HasPM) {
this.Adapter.SelectCommand = this.CommandCollection[2];
- if ((Trattamento == null)) {
- this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
- }
- else {
- this.Adapter.SelectCommand.Parameters[1].Value = ((string)(Trattamento));
- }
- DS_magazzino.ElencoTrattamentiDataTable dataTable = new DS_magazzino.ElencoTrattamentiDataTable();
- 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")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
- public virtual DS_magazzino.ElencoTrattamentiDataTable getByPeriodo(global::System.Nullable DataStart, global::System.Nullable DataEnd, global::System.Nullable HasPM) {
- this.Adapter.SelectCommand = this.CommandCollection[3];
if ((DataStart.HasValue == true)) {
this.Adapter.SelectCommand.Parameters[1].Value = ((System.DateTime)(DataStart.Value));
}
@@ -39906,11 +39890,34 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat
else {
this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
- if ((HasPM.HasValue == true)) {
- this.Adapter.SelectCommand.Parameters[3].Value = ((int)(HasPM.Value));
+ if ((Trattamento == null)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
else {
- this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
+ this.Adapter.SelectCommand.Parameters[3].Value = ((string)(Trattamento));
+ }
+ if ((HasPM.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[4].Value = ((int)(HasPM.Value));
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
+ }
+ DS_magazzino.ElencoTrattamentiDataTable dataTable = new DS_magazzino.ElencoTrattamentiDataTable();
+ 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")]
+ [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)]
+ public virtual DS_magazzino.ElencoTrattamentiDataTable getByTratt(string Trattamento) {
+ this.Adapter.SelectCommand = this.CommandCollection[3];
+ if ((Trattamento == null)) {
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(Trattamento));
}
DS_magazzino.ElencoTrattamentiDataTable dataTable = new DS_magazzino.ElencoTrattamentiDataTable();
this.Adapter.Fill(dataTable);
diff --git a/GMW_data/DS_magazzino.xsd b/GMW_data/DS_magazzino.xsd
index 861a29ab..c49b2858 100644
--- a/GMW_data/DS_magazzino.xsd
+++ b/GMW_data/DS_magazzino.xsd
@@ -3822,17 +3822,6 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat
-
-
-
- dbo.stp_ET_getByKey
-
-
-
-
-
-
-
@@ -3841,11 +3830,23 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat
+
+
+
+
+ dbo.stp_ET_getByTratt
+
+
+
+
+
+
+
diff --git a/GMW_data/MagClass.cs b/GMW_data/MagClass.cs
index d0da1bd9..81e8dbe1 100644
--- a/GMW_data/MagClass.cs
+++ b/GMW_data/MagClass.cs
@@ -2331,6 +2331,10 @@ namespace GMW_data
{
answ = tipoCodiceBarcode.PartNumber;
}
+ else if (magazzino.taET.getByTratt(valore).Rows.Count > 0)
+ {
+ answ = tipoCodiceBarcode.TT;
+ }
else
{
try
diff --git a/GMW_data/TermClass.cs b/GMW_data/TermClass.cs
index 54fb6366..5bc1fd42 100644
--- a/GMW_data/TermClass.cs
+++ b/GMW_data/TermClass.cs
@@ -367,7 +367,11 @@ public enum tipoCodiceBarcode
///
/// Assieme Logico
///
- AL
+ AL,
+ ///
+ /// Trattamento Termico
+ ///
+ TT
}
///
/// elenco degli esiti per una sessione di login da terminalino
diff --git a/VersGen/GMW.cs b/VersGen/GMW.cs
index 8a67741a..7c3c302d 100644
--- a/VersGen/GMW.cs
+++ b/VersGen/GMW.cs
@@ -5,7 +5,7 @@
using System.Reflection;
-[assembly: AssemblyVersion("2.5.622.1533")]
-[assembly: AssemblyFileVersion("2.5.622.1533")]
+[assembly: AssemblyVersion("2.5.623.1536")]
+[assembly: AssemblyFileVersion("2.5.623.1536")]
//[assembly: AssemblyCopyright("© Steamware 2007-2014")]
//[assembly: AssemblyCompany("Steamware")]
diff --git a/VersGen/GMW.tt b/VersGen/GMW.tt
index 893c5811..6f24e5fb 100644
--- a/VersGen/GMW.tt
+++ b/VersGen/GMW.tt
@@ -6,8 +6,8 @@
using System.Reflection;
-[assembly: AssemblyVersion("2.5.622.<#= this.RevisionNumber #>")]
-[assembly: AssemblyFileVersion("2.5.622.<#= this.RevisionNumber #>")]
+[assembly: AssemblyVersion("2.5.623.<#= this.RevisionNumber #>")]
+[assembly: AssemblyFileVersion("2.5.623.<#= this.RevisionNumber #>")]
//[assembly: AssemblyCopyright("© Steamware 2007-<#= DateTime.Now.Year #>")]
//[assembly: AssemblyCompany("Steamware")]
<#+