diff --git a/MP-TAB/BasePage.cs b/MP-TAB/BasePage.cs index 3eee1556..832693f4 100644 --- a/MP-TAB/BasePage.cs +++ b/MP-TAB/BasePage.cs @@ -157,6 +157,17 @@ namespace MoonProTablet } } + /// + /// Num giorni configurati x selezione ODL in scadenza + /// + public int numDaySelOdl + { + get + { + return memLayer.ML.CRI("numDaySelOdl"); + } + } + /// /// Sotto sistema (macchina) selezionato /// diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index 9b4595a2..ac472f16 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -223,6 +223,17 @@ namespace MoonProTablet.WebUserControls } } + /// + /// Num giorni configurati x selezione ODL in scadenza + /// + public int numDaySelOdl + { + get + { + return memLayer.ML.CRI("numDaySelOdl"); + } + } + /// /// Sotto sistema (macchina) selezionato in sessione /// diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx b/MP-TAB/WebUserControls/mod_ODL.ascx index 6ae17ff1..62337c8d 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx +++ b/MP-TAB/WebUserControls/mod_ODL.ascx @@ -47,6 +47,7 @@ + @@ -54,6 +55,7 @@ +
diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index a9fae22c..ff597ab4 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -489,7 +489,7 @@ namespace MoonProTablet.WebUserControls logger.lg.scriviLog(string.Format("Eccezione in recupero dati currHasOdl! {0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); } // deve controllare abbia ODL o PROMESSE odl... - bool hasNewOdl = DataLayerObj.taSelOdlFree.getUnused(idxMacchinaFix, chkTutti.Checked).Rows.Count > 1; + bool hasNewOdl = DataLayerObj.taSelOdlFree.getUnused(idxMacchinaFix, chkTutti.Checked, numDaySelOdl).Rows.Count > 1; // sistemo buttons! lbtStartAttr.Enabled = (isEnabled && (!inAttr && hasNewOdl)); lbtEndProd.Enabled = (isEnabled && (!inAttr && currHasOdl)); @@ -1279,6 +1279,7 @@ namespace MoonProTablet.WebUserControls // verifico parametro attivabilità come filtraggio bool OptOdlStartAttivabili = memLayer.ML.cdvb("OptOdlStartAttivabili"); hfFiltroAttivabili.Value = $"{OptOdlStartAttivabili}"; + hfNumDayOdl.Value = $"{numDaySelOdl}"; // fix buttons fixSplitBtn(false); } diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs index 5566b6b8..9ea5b15b 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.designer.cs @@ -95,6 +95,15 @@ namespace MoonProTablet.WebUserControls /// protected global::System.Web.UI.WebControls.HiddenField hfFiltroAttivabili; + /// + /// Controllo hfNumDayOdl. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfNumDayOdl; + /// /// Controllo odsODL. /// diff --git a/MP-TAB/fixODL.aspx b/MP-TAB/fixODL.aspx index 580c14b3..8ac21f07 100644 --- a/MP-TAB/fixODL.aspx +++ b/MP-TAB/fixODL.aspx @@ -3,79 +3,81 @@ <%@ Register Src="~/WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %> -
- -
- - - - - - +
+ +
+ + + + + + +
+
+
+

Riassegnazione ODL

+ Ultimi ODL lavorati: +
+
+
+
+ + + + + + + + <%----%> + + +
+
+
+ +
+ + + + +
+ + + + + + + + +
+ + + + + + + + + + +
+
+
+
+ + + + + + + + + + +
+
+ Imposta ODL +
+
-
-
-

Riassegnazione ODL

- Ultimi ODL lavorati: -
-
-
-
- - - - - - - - <%----%> - - -
-
-
- -
- - - - -
- - - - - - - - -
- - - - - - - - - - -
-
-
-
- - - - - - - - -
-
- Imposta ODL -
-
-
- + \ No newline at end of file diff --git a/MP-TAB/fixODL.aspx.cs b/MP-TAB/fixODL.aspx.cs index 2296ce18..5d843eac 100644 --- a/MP-TAB/fixODL.aspx.cs +++ b/MP-TAB/fixODL.aspx.cs @@ -7,23 +7,8 @@ namespace MoonProTablet { public partial class fixODL : BasePage { - /// - /// Caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - fixSelMacc(); - hfIdxMacchina.Value = idxMacchinaSel; - fixBtnImpostaODL(); - DateTime adesso = DateTime.Now; - hfDataTo.Value = adesso.ToString(); - hfDataFrom.Value = adesso.AddMonths(-1).ToString(); - } - } + #region Public Properties + /// /// idx macchina selezionata /// @@ -51,51 +36,7 @@ namespace MoonProTablet memLayer.ML.setSessionVal("IdxMacchina", value); } } - protected void ddlSubMacc_DataBound(object sender, EventArgs e) - { - // se ho in memoria un valore LO REIMPOSTO... - if (subMaccSel != "") - { - // provo a preselezionare... - try - { - ddlSubMacc.SelectedValue = subMaccSel; - } - catch - { } - } - } - protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) - { - subMaccSel = ddlSubMacc.SelectedValue; - checkAll(); - } - private void checkAll() - { - fixSelMacc(); - hfIdxMacchina.Value = idxMacchinaSel; - } - /// - /// Se la machcina è MULTI --> mostro selettore - /// - private void fixSelMacc() - { - divSelMacc.Visible = isMulti; - if (isMulti) - { - // salvo selezione submacc - ddlSubMacc.DataBind(); - subMaccSel = ddlSubMacc.SelectedValue; - } - } - private void fixBtnImpostaODL() - { - // verifico se selezionato un ODL sorgente... - lbtSetODL.Visible = idxOdlSel > 0; - // salvo in sessione... - idxODL = idxOdlSel; - } /// /// idx macchina selezionata /// @@ -114,11 +55,68 @@ namespace MoonProTablet } } + #endregion Public Properties + + #region Private Methods + + private void checkAll() + { + fixSelMacc(); + hfIdxMacchina.Value = idxMacchinaSel; + } + + private void fixBtnImpostaODL() + { + // verifico se selezionato un ODL sorgente... + lbtSetODL.Visible = idxOdlSel > 0; + // salvo in sessione... + idxODL = idxOdlSel; + } + + /// + /// Se la machcina è MULTI --> mostro selettore + /// + private void fixSelMacc() + { + divSelMacc.Visible = isMulti; + if (isMulti) + { + // salvo selezione submacc + ddlSubMacc.DataBind(); + subMaccSel = ddlSubMacc.SelectedValue; + } + } + + #endregion Private Methods + + #region Protected Methods protected void ddlODL_SelectedIndexChanged(object sender, EventArgs e) { fixBtnImpostaODL(); } + + protected void ddlSubMacc_DataBound(object sender, EventArgs e) + { + // se ho in memoria un valore LO REIMPOSTO... + if (subMaccSel != "") + { + // provo a preselezionare... + try + { + ddlSubMacc.SelectedValue = subMaccSel; + } + catch + { } + } + } + + protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) + { + subMaccSel = ddlSubMacc.SelectedValue; + checkAll(); + } + /// /// Registra attivazione ODL per macchina corrente... /// @@ -156,5 +154,26 @@ namespace MoonProTablet // forzo COMUNQUE redirect... Response.Redirect("ODL"); } + + /// + /// Caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + fixSelMacc(); + hfIdxMacchina.Value = idxMacchinaSel; + fixBtnImpostaODL(); + DateTime adesso = DateTime.Now; + hfDataTo.Value = adesso.ToString(); + hfDataFrom.Value = adesso.AddMonths(-1).ToString(); + hfNumDayOdl.Value = $"{numDaySelOdl}"; + } + } + + #endregion Protected Methods } } \ No newline at end of file diff --git a/MP-TAB/fixODL.aspx.designer.cs b/MP-TAB/fixODL.aspx.designer.cs index 021c4629..685b5899 100644 --- a/MP-TAB/fixODL.aspx.designer.cs +++ b/MP-TAB/fixODL.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace MoonProTablet { - - - public partial class fixODL { - +namespace MoonProTablet +{ + + + public partial class fixODL + { + /// /// Controllo mod_dettMacchina1. /// @@ -20,7 +22,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1; - + /// /// Controllo divSelMacc. /// @@ -29,7 +31,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSelMacc; - + /// /// Controllo ddlSubMacc. /// @@ -38,7 +40,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlSubMacc; - + /// /// Controllo ods. /// @@ -47,7 +49,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; - + /// /// Controllo grViewLastODL. /// @@ -56,7 +58,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.GridView grViewLastODL; - + /// /// Controllo odsLastODL. /// @@ -65,7 +67,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsLastODL; - + /// /// Controllo hfIdxMacchina. /// @@ -74,7 +76,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfIdxMacchina; - + /// /// Controllo hfDataFrom. /// @@ -83,7 +85,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfDataFrom; - + /// /// Controllo hfDataTo. /// @@ -92,7 +94,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HiddenField hfDataTo; - + /// /// Controllo ddlODL. /// @@ -101,7 +103,7 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.DropDownList ddlODL; - + /// /// Controllo odsOdlAvail. /// @@ -110,7 +112,16 @@ namespace MoonProTablet { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsOdlAvail; - + + /// + /// Controllo hfNumDayOdl. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfNumDayOdl; + /// /// Controllo lbtSetODL. /// diff --git a/MapoDb/DS_Utility.Designer.cs b/MapoDb/DS_Utility.Designer.cs index 5ed08974..035eacd6 100644 --- a/MapoDb/DS_Utility.Designer.cs +++ b/MapoDb/DS_Utility.Designer.cs @@ -7838,6 +7838,7 @@ SELECT IdxMacchina, IdxStato, InizioStato, Value, CodArticolo, TempoCicloBase, P this._commandCollection[1].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[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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showAll", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@numDayAdd", 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()] @@ -7868,7 +7869,7 @@ SELECT IdxMacchina, IdxStato, InizioStato, Value, CodArticolo, TempoCicloBase, P [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_Utility.v_selODLDataTable getUnused(string IdxMacchina, global::System.Nullable showAll) { + public virtual DS_Utility.v_selODLDataTable getUnused(string IdxMacchina, global::System.Nullable showAll, global::System.Nullable numDayAdd) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -7882,6 +7883,12 @@ SELECT IdxMacchina, IdxStato, InizioStato, Value, CodArticolo, TempoCicloBase, P else { this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } + if ((numDayAdd.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[3].Value = ((int)(numDayAdd.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } DS_Utility.v_selODLDataTable dataTable = new DS_Utility.v_selODLDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/MapoDb/DS_Utility.cs b/MapoDb/DS_Utility.cs index a7e30c17..970ee25d 100644 --- a/MapoDb/DS_Utility.cs +++ b/MapoDb/DS_Utility.cs @@ -2,7 +2,7 @@ { - public partial class DS_Utility - { - } + public partial class DS_Utility + { + } } diff --git a/MapoDb/DS_Utility.xsd b/MapoDb/DS_Utility.xsd index 836c8cf0..2380a017 100644 --- a/MapoDb/DS_Utility.xsd +++ b/MapoDb/DS_Utility.xsd @@ -188,6 +188,7 @@ ORDER BY label + @@ -582,7 +583,7 @@ FROM dbo.v_selCauScarto - + @@ -596,7 +597,7 @@ FROM dbo.v_selCauScarto - + @@ -611,7 +612,7 @@ FROM dbo.v_selCauScarto - + @@ -625,7 +626,7 @@ FROM dbo.v_selCauScarto - + @@ -645,7 +646,7 @@ FROM dbo.v_selCauScarto - + @@ -714,7 +715,7 @@ FROM dbo.v_selCauScarto - + @@ -750,7 +751,7 @@ FROM dbo.v_selCauScarto - + @@ -801,7 +802,7 @@ FROM dbo.v_selCauScarto - + @@ -809,7 +810,7 @@ FROM dbo.v_selCauScarto - + @@ -843,7 +844,7 @@ FROM dbo.v_selCauScarto - + @@ -870,7 +871,7 @@ FROM dbo.v_selCauScarto - + diff --git a/MapoDb/DS_Utility.xss b/MapoDb/DS_Utility.xss index 6b49559a..a9e07e05 100644 --- a/MapoDb/DS_Utility.xss +++ b/MapoDb/DS_Utility.xss @@ -9,7 +9,7 @@ - + @@ -17,8 +17,8 @@ - - + + \ No newline at end of file