<%# 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.
///