diff --git a/MP-Admin/WebUserControls/mod_gestioneODL.ascx b/MP-Admin/WebUserControls/mod_gestioneODL.ascx index 0d9319de..0b75a69b 100644 --- a/MP-Admin/WebUserControls/mod_gestioneODL.ascx +++ b/MP-Admin/WebUserControls/mod_gestioneODL.ascx @@ -45,8 +45,7 @@ - + <%-- diff --git a/MP-Admin/WebUserControls/mod_gestioneODL.ascx.cs b/MP-Admin/WebUserControls/mod_gestioneODL.ascx.cs index 6dee29f2..19efb041 100644 --- a/MP-Admin/WebUserControls/mod_gestioneODL.ascx.cs +++ b/MP-Admin/WebUserControls/mod_gestioneODL.ascx.cs @@ -60,10 +60,11 @@ namespace MoonPro_site.WebUserControls SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); // mostro edit quantità... divEditQta.Visible = true; + btnNewOdl.Visible = true; + mod_newOdl1.Visible = false; var riga = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0]; numPz = riga.NumPezzi; pzPallet = riga.PzPallet; - //txtNewQta.Text = DataLayer.obj.taODL.getByIdx(idxOdlSel, false)[0].NumPezzi.ToString(); } /// /// traduce gli header delle colonne @@ -191,6 +192,9 @@ namespace MoonPro_site.WebUserControls SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); grView.SelectedIndex = -1; grView.DataBind(); + divEditQta.Visible = false; + mod_newOdl1.Visible = false; + btnNewOdl.Visible = true; lblWarning.Visible = false; if (eh_resetSelezione != null) { @@ -278,7 +282,10 @@ namespace MoonPro_site.WebUserControls { // mostro controllo creazione ODL mod_newOdl1.Visible = true; + divEditQta.Visible = false; btnNewOdl.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); } /// /// formatot url x stampa ODL @@ -339,7 +346,7 @@ namespace MoonPro_site.WebUserControls { if (idxOdlSel > 0) { - DataLayer.obj.taODL.updateQta(numPz, idxOdlSel); + DataLayer.obj.taODL.updateQta(numPz, pzPallet, idxOdlSel); } updateCtrl(); } @@ -395,13 +402,15 @@ namespace MoonPro_site.WebUserControls { get { - int answ = 0; + int answ = 1; try { answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); } catch { } + // controllo sia > 0... + if (answ < 1) answ = 1; return answ; } set diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index e2f57eca..5825ac5c 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -342,6 +342,7 @@ ORDER BY idxODL DESC + diff --git a/MapoDb/DS_ProdTempi1.Designer.cs b/MapoDb/DS_ProdTempi1.Designer.cs index 4ee43f59..e1ea8e58 100644 --- a/MapoDb/DS_ProdTempi1.Designer.cs +++ b/MapoDb/DS_ProdTempi1.Designer.cs @@ -13862,6 +13862,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[14].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[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PzPallet", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxODL", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; @@ -14330,7 +14331,7 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile [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 updateQta(global::System.Nullable NumPezzi, global::System.Nullable Original_IdxODL) { + public virtual int updateQta(global::System.Nullable NumPezzi, global::System.Nullable PzPallet, global::System.Nullable Original_IdxODL) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; if ((NumPezzi.HasValue == true)) { command.Parameters[1].Value = ((int)(NumPezzi.Value)); @@ -14338,12 +14339,18 @@ SELECT IdxMacchina, CodArticolo, DataOraRif, TCMedio, PzProd FROM TempiCicloRile else { command.Parameters[1].Value = global::System.DBNull.Value; } - if ((Original_IdxODL.HasValue == true)) { - command.Parameters[2].Value = ((int)(Original_IdxODL.Value)); + if ((PzPallet.HasValue == true)) { + command.Parameters[2].Value = ((int)(PzPallet.Value)); } else { command.Parameters[2].Value = global::System.DBNull.Value; } + if ((Original_IdxODL.HasValue == true)) { + command.Parameters[3].Value = ((int)(Original_IdxODL.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) {