From e4c1f9750c2ac85aee20da71cc88681399ee3d23 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 4 Oct 2018 19:39:55 +0200 Subject: [PATCH] Fix sel subMacc su PianoProd in TAB --- Jenkinsfile | 2 +- MP-TAB/WebUserControls/mod_pianoProdMacc.ascx | 20 ++- .../WebUserControls/mod_pianoProdMacc.ascx.cs | 115 +++++++++++++++++- .../mod_pianoProdMacc.ascx.designer.cs | 27 ++++ 4 files changed, 156 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c1776a08..c1bde394 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=848']) { + withEnv(['NEXT_BUILD_NUMBER=849']) { // env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx index 30d78f6c..5aa902f6 100644 --- a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx +++ b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx @@ -2,7 +2,17 @@
-

ELENCO PROSSIMI PODL

+

Previsione P-ODL

+
+
+ + + + + + +
+
@@ -19,7 +29,7 @@ - +
<%# Eval("DueDate","{0:dd.MM.yy}") %> @@ -46,7 +56,7 @@ - +
@@ -58,7 +68,7 @@ - +
Tot: <%# Eval("NumPezzi") %> @@ -79,7 +89,7 @@ - + diff --git a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.cs b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.cs index 58f41f87..ef3885bc 100644 --- a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.cs +++ b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.cs @@ -1,4 +1,6 @@ -using System; +using MapoDb; +using SteamWare; +using System; namespace MoonProTablet.WebUserControls { @@ -6,7 +8,10 @@ namespace MoonProTablet.WebUserControls { protected void Page_Load(object sender, EventArgs e) { - + if (!Page.IsPostBack) + { + fixSelMaccPianoProd(); + } } public string TCMinSec(object _TC) { @@ -27,5 +32,111 @@ namespace MoonProTablet.WebUserControls return TC_MinSec; } + /// + /// idx macchina selezionata + /// + public string idxMacchina + { + get + { + string answ = memLayer.ML.StringSessionObj("IdxMacchina"); + // verifoc: se multi uso selettore tendina... + if (isMulti) + { + if (ddlSubMacc.SelectedValue == "") + { + ddlSubMacc.DataBind(); + } + if (ddlSubMacc.SelectedValue != "") + { + answ = ddlSubMacc.SelectedValue; + } + } + return answ; + } + set + { + memLayer.ML.setSessionVal("IdxMacchina", value); + } + } + /// + /// idx macchina selezionata + /// + public string idxMacchinaSession + { + get + { + return memLayer.ML.StringSessionObj("IdxMacchina"); + } + set + { + memLayer.ML.setSessionVal("IdxMacchina", value); + } + } + protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) + { + subMaccSel = ddlSubMacc.SelectedValue; + fixSelMaccPianoProd(); + fixSelMacc(); + } + + private void fixSelMaccPianoProd() + { + if (isMulti) + { + memLayer.ML.setSessionVal("IdxMacchinaPianoProd", subMaccSel); + } + else + { + memLayer.ML.setSessionVal("IdxMacchinaPianoProd", idxMacchinaSession); + } + } + + 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 + { } + } + } + /// + /// Sotto sistema (macchina) selezionato + /// + public string subMaccSel + { + get + { + return memLayer.ML.StringSessionObj("subMaccSel"); + } + set + { + memLayer.ML.setSessionVal("subMaccSel", value); + } + } + /// + /// Se la machcina è MULTI --> mostro selettore + /// + private void fixSelMacc() + { + divSelMacc.Visible = isMulti; + fixSelMaccPianoProd(); + } + /// + /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) + /// + protected bool isMulti + { + get + { + return DataLayer.isMulti(idxMacchinaSession); + } + } } } \ No newline at end of file diff --git a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.designer.cs b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.designer.cs index 6f67ea69..196384d7 100644 --- a/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.designer.cs +++ b/MP-TAB/WebUserControls/mod_pianoProdMacc.ascx.designer.cs @@ -12,6 +12,33 @@ namespace MoonProTablet.WebUserControls { public partial class mod_pianoProdMacc { + /// + /// Controllo divSelMacc. + /// + /// + /// Campo generato automaticamente. + /// 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. + /// + /// + /// 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.DropDownList ddlSubMacc; + + /// + /// Controllo odsMacc. + /// + /// + /// 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.ObjectDataSource odsMacc; + /// /// Controllo chkOnlyMacc. ///