diff --git a/WebSites/WebGIM/mod_elencoMtzProg.ascx b/WebSites/WebGIM/mod_elencoMtzProg.ascx
index 4524297..efc9297 100644
--- a/WebSites/WebGIM/mod_elencoMtzProg.ascx
+++ b/WebSites/WebGIM/mod_elencoMtzProg.ascx
@@ -1,8 +1,42 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_elencoMtzProg.ascx.cs"
Inherits="mod_elencoMtzProg" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
-
- area filtraggi vari
+<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
+
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
@@ -70,6 +104,10 @@
DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">
+
+
diff --git a/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs b/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs
index 4365a10..ce7fc88 100644
--- a/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs
+++ b/WebSites/WebGIM/mod_elencoMtzProg.ascx.cs
@@ -25,16 +25,10 @@ public partial class mod_elencoMtzProg : ApplicationUserControl
{
base.traduciObj();
btnShowNew.Text = traduci("btnShowNew");
+ lblFiltMacchina.Text = traduci("lblFiltMacchina");
+ lblFiltTipo.Text = traduci("lblFiltTipo");
}
- ///
- /// wrap traduzione
- ///
- ///
- ///
- public string traduci(object lemma)
- {
- return user_std.UtSn.Traduci(lemma.ToString());
- }
+
///
/// cambio visibilità pannello new data
///
@@ -212,5 +206,70 @@ public partial class mod_elencoMtzProg : ApplicationUserControl
{
base.OnInit(e);
_idxGridView = "idxIntPro";
+ if (!Page.IsPostBack)
+ {
+ mod_filtroImpianto.ods = odsImpianti;
+ mod_filtroMacchina.ods = odsMacchine;
+ mod_filtroTipo.ods = odsTipo;
+ }
+ mod_filtroTipo.eh_selValore += new EventHandler(mod_filtroTipo_eh_selValore);
+ mod_filtroMacchina.eh_selValore += new EventHandler(mod_filtroMacchina_eh_selValore);
+ }
+
+ void mod_filtroMacchina_eh_selValore(object sender, EventArgs e)
+ {
+ // chiamo procedura ricostruzione ods con filtri...
+ checkFixOds();
+ }
+ void mod_filtroTipo_eh_selValore(object sender, EventArgs e)
+ {
+ // chiamo procedura ricostruzione ods con filtri...
+ checkFixOds();
+ }
+ ///
+ /// sistemo filtraggio con valori selezionati
+ ///
+ private void checkFixOds()
+ {
+ ods.FilterExpression = "( codMacchina LIKE '%{0}%' OR nomeMacchina LIKE '%{0}%' OR descrizione LIKE '%{0}%' )";
+ //ods.FilterParameters.Clear();
+ //SessionParameter ricerca = new SessionParameter("ricerca","valoreCercato");
+ //ods.FilterParameters.Add(ricerca);
+ if (mod_filtroTipo.valoreInt != 0)
+ {
+ ods.FilterExpression += " AND (idxTipo = {1})";
+ }
+ if (mod_filtroMacchina.valoreInt != 0)
+ {
+ ods.FilterExpression += " AND (idxMacchina = {2})";
+ }
+ ods.DataBind();
+ }
+ ///
+ /// chiamato post modifica valore check/selezione nel selettore filtro impianto
+ ///
+ ///
+ ///
+ public void eh_selectedImpianto(object sender, EventArgs e)
+ {
+ if (mod_filtroImpianto.valoreInt != 0)
+ {
+ if (!mod_filtroMacchina.Visible)
+ {
+ lblFiltMacchina.Visible = true;
+ mod_filtroMacchina.Visible = true;
+ }
+ else
+ {
+ mod_filtroMacchina.reset();
+ }
+ mod_filtroMacchina.ods = odsMacchine;
+ }
+ else
+ {
+ mod_filtroMacchina.reset();
+ lblFiltMacchina.Visible = false;
+ mod_filtroMacchina.Visible = false;
+ }
}
}
diff --git a/WebSites/WebGIM/mod_filtro.ascx b/WebSites/WebGIM/mod_filtro.ascx
index 8d3ec36..56942b1 100644
--- a/WebSites/WebGIM/mod_filtro.ascx
+++ b/WebSites/WebGIM/mod_filtro.ascx
@@ -1,7 +1,7 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mod_filtro.ascx.cs" Inherits="mod_filtro" %>
-
-
\ No newline at end of file
diff --git a/WebSites/WebGIM/mod_filtro.ascx.cs b/WebSites/WebGIM/mod_filtro.ascx.cs
index 9b9d85f..0ca6a57 100644
--- a/WebSites/WebGIM/mod_filtro.ascx.cs
+++ b/WebSites/WebGIM/mod_filtro.ascx.cs
@@ -12,6 +12,7 @@ using SteamWare;
public partial class mod_filtro : ApplicationUserControl
{
+ protected string _css;
protected ObjectDataSource _ods;
protected string _valore
{
@@ -215,6 +216,7 @@ public partial class mod_filtro : ApplicationUserControl
public event EventHandler eh_selValore;
+
///
/// determina se sia possibile (de)selezionare il check di filtraggio, altrimenti sempre attivo
///
@@ -281,4 +283,27 @@ public partial class mod_filtro : ApplicationUserControl
bindControlli();
}
}
+ ///
+ /// css applicato agli elementi del controllo
+ ///
+ public string css
+ {
+ get
+ {
+ return _css;
+ }
+ set
+ {
+ _css = value;
+ }
+ }
+ ///
+ /// resetta il controllo (un-checked)
+ ///
+ public void reset()
+ {
+ chkFilt.Checked = false;
+ dlFilt.Visible = false;
+ memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID));
+ }
}
\ No newline at end of file