diff --git a/MP-TAB/ODL.aspx.cs b/MP-TAB/ODL.aspx.cs index bc0b205c..37954eb8 100644 --- a/MP-TAB/ODL.aspx.cs +++ b/MP-TAB/ODL.aspx.cs @@ -40,7 +40,7 @@ namespace MoonProTablet { get { - string answ = memLayer.ML.StringSessionObj("IdxMacchina"); + string answ = idxMacchinaSession; // verifico: se multi uso selettore tendina... if (isMulti) { @@ -67,12 +67,22 @@ namespace MoonProTablet private void fixSelMacc() { divSelMacc.Visible = isMulti; + if (isMulti) + { + // salvo selezione submacc + ddlSubMacc.DataBind(); + subMaccSel = ddlSubMacc.SelectedValue; + } } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { checkAll(); + if (isMulti) + { + mod_dettMacchina1.doUpdate(); + } } mod_ODL1.eh_reqUpdate += Mod_ODL1_eh_reqUpdate; } @@ -89,7 +99,7 @@ namespace MoonProTablet private void checkAll() { fixSelMacc(); - Session["TipoLink"] = "EditMacch"; + memLayer.ML.setSessionVal("TipoLink", "EditMacch"); // imposto idxMacchina x subControl... mod_ODL1.idxMacchina = idxMacchina; checkConfProd(); diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index 828752b9..e40e5638 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -50,6 +50,14 @@ namespace MoonProTablet.WebUserControls if (!Page.IsPostBack) { checkAll(); + if (isMulti) + { + // sollevo evento! + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + } } } /// @@ -237,6 +245,12 @@ namespace MoonProTablet.WebUserControls private void fixSelMacc() { divSelMacc.Visible = isMulti; + if (isMulti) + { + // salvo selezione submacc + ddlSubMacc.DataBind(); + subMaccSel = ddlSubMacc.SelectedValue; + } } /// /// restituisce css disabled SE odl NON OK... diff --git a/MP-TAB/WebUserControls/mod_dettMacchina.ascx b/MP-TAB/WebUserControls/mod_dettMacchina.ascx index cf90f0f3..31b9b4ca 100644 --- a/MP-TAB/WebUserControls/mod_dettMacchina.ascx +++ b/MP-TAB/WebUserControls/mod_dettMacchina.ascx @@ -58,10 +58,11 @@ - - + + diff --git a/MP-TAB/WebUserControls/mod_mappaStato.ascx.cs b/MP-TAB/WebUserControls/mod_mappaStato.ascx.cs index bdf28eea..fc308e25 100644 --- a/MP-TAB/WebUserControls/mod_mappaStato.ascx.cs +++ b/MP-TAB/WebUserControls/mod_mappaStato.ascx.cs @@ -43,6 +43,7 @@ namespace MoonProTablet.WebUserControls { LinkButton lnkbtn = (LinkButton)sender; memLayer.ML.setSessionVal("IdxMacchina", lnkbtn.CommandArgument); + memLayer.ML.setSessionVal("subMaccSel", lnkbtn.CommandArgument); Response.Redirect("~/DettaglioMacchina.aspx"); } /// diff --git a/MapoDb/DS_ProdTempi.Designer.cs b/MapoDb/DS_ProdTempi.Designer.cs index 8cc9b0dc..40b44c42 100644 --- a/MapoDb/DS_ProdTempi.Designer.cs +++ b/MapoDb/DS_ProdTempi.Designer.cs @@ -24569,7 +24569,7 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArticolo, Disegno, NumPezzi, TCAssegnato, DataInizioODL, Semaforo, idxStato, DescrizioneStato, durata, PezziProd, PezziConf, TempoOn, TempoAuto, TempoRun, @@ -24584,23 +24584,30 @@ FROM MappaStatoExpl"; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 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_MSE_getByIdxMacchina"; + this._commandCollection[2].CommandText = "dbo.stp_MSE_getByIdxMacchAndSub"; 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("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 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("@IdxMacchSub", global::System.Data.SqlDbType.NVarChar, 50, 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_MSE_getData"; + this._commandCollection[3].CommandText = "dbo.stp_MSE_getByIdxMacchina"; 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("@maxAgeSec", 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("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 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_MSE_getDataByOpr"; + this._commandCollection[4].CommandText = "dbo.stp_MSE_getData"; 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("@maxAgeSec", 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("@MatrOpr", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_MSE_getDataByOpr"; + 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("@maxAgeSec", 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("@MatrOpr", 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()] @@ -24631,7 +24638,7 @@ FROM MappaStatoExpl"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_ProdTempi.MappaStatoExplDataTable getByIdxMacchina(string IdxMacchina) { + public virtual DS_ProdTempi.MappaStatoExplDataTable getByIdxMaccAndSub(string IdxMacchina, string IdxMacchSub) { this.Adapter.SelectCommand = this.CommandCollection[2]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -24639,6 +24646,29 @@ FROM MappaStatoExpl"; else { this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina)); } + if ((IdxMacchSub == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(IdxMacchSub)); + } + DS_ProdTempi.MappaStatoExplDataTable dataTable = new DS_ProdTempi.MappaStatoExplDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_ProdTempi.MappaStatoExplDataTable getByIdxMacchina(string IdxMacchina) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((IdxMacchina == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina)); + } DS_ProdTempi.MappaStatoExplDataTable dataTable = new DS_ProdTempi.MappaStatoExplDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -24649,7 +24679,7 @@ FROM MappaStatoExpl"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_ProdTempi.MappaStatoExplDataTable getByRefreshData(global::System.Nullable maxAgeSec) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((maxAgeSec.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(maxAgeSec.Value)); } @@ -24666,7 +24696,7 @@ FROM MappaStatoExpl"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_ProdTempi.MappaStatoExplDataTable getByRefreshDataOpr(global::System.Nullable maxAgeSec, global::System.Nullable MatrOpr) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((maxAgeSec.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(maxAgeSec.Value)); } diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 4bf8e7e8..058ee778 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -1741,6 +1741,18 @@ SELECT RowNum, lastUpdate, IdxMacchina, CodMacchina, Nome, url, idxODL, CodArtic + + + + dbo.stp_MSE_getByIdxMacchAndSub + + + + + + + + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index 2546506a..db6cd882 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -4,32 +4,32 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - + - + - + - + \ No newline at end of file