diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx b/MP-Tablet/WebUserControls/mod_confProd.ascx index da68e4c9..53152b61 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx @@ -1,6 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_confProd.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_confProd" %>
-
+
@@ -8,6 +8,14 @@
+
+ + + + + + +
diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs index b182a90c..74a06fc3 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx.cs +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx.cs @@ -28,11 +28,37 @@ namespace MoonProTablet.WebUserControls { if (!Page.IsPostBack) { - lblOut.Text = ""; - switchBtnConferma(false); - btnShowConfProd.Visible = odlOk; + checkAll(); } } + + private void checkAll() + { + lblOut.Text = ""; + switchBtnConferma(false); + fixSelMacc(); + btnShowConfProd.Visible = odlOk; + } + + /// + /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) + /// + protected bool isMulti + { + get + { + return DataLayer.isMulti(idxMacchinaSession); + } + } + + /// + /// Se la machcina è MULTI --> mostro selettore + /// + private void fixSelMacc() + { + divSelMacc.Visible = isMulti; + } + /// /// Verifica ODL OK (ovvero caricato x macchina...) /// @@ -60,6 +86,26 @@ namespace MoonProTablet.WebUserControls /// idx macchina selezionata /// public string idxMacchina + { + get + { + string answ = memLayer.ML.StringSessionObj("IdxMacchina"); + // verifoc: se multi uso selettore tendina... + if (isMulti) + { + answ = ddlSubMacc.SelectedValue; + } + return answ; + } + set + { + memLayer.ML.setSessionVal("IdxMacchina", value); + } + } + /// + /// idx macchina selezionata + /// + public string idxMacchinaSession { get { @@ -339,5 +385,10 @@ namespace MoonProTablet.WebUserControls { updatePzBuoni(); } + + protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e) + { + checkAll(); + } } } \ No newline at end of file diff --git a/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs b/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs index 01c961c5..bab613a8 100644 --- a/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs +++ b/MP-Tablet/WebUserControls/mod_confProd.ascx.designer.cs @@ -30,6 +30,33 @@ namespace MoonProTablet.WebUserControls { /// protected global::System.Web.UI.WebControls.Button btnSalva; + /// + /// 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 ods. + /// + /// + /// 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 ods; + /// /// Controllo lblNumPezzi. /// diff --git a/MP-Tablet/WebUserControls/mod_dettMacchina.ascx b/MP-Tablet/WebUserControls/mod_dettMacchina.ascx index 451a922c..ec154595 100644 --- a/MP-Tablet/WebUserControls/mod_dettMacchina.ascx +++ b/MP-Tablet/WebUserControls/mod_dettMacchina.ascx @@ -7,7 +7,7 @@