From 44d796ab0e9ea60baacc3a51c8d79c5e87a68229 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 26 Oct 2018 18:21:36 +0200 Subject: [PATCH] Bozza gestione filtro con controllo (da completare) --- MP-Admin/WebUserControls/mod_gestPromODL.ascx | 40 ++++++++++++------- .../WebUserControls/mod_gestPromODL.ascx.cs | 36 +++++++++++++++-- 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx b/MP-Admin/WebUserControls/mod_gestPromODL.ascx index 5978bc5d..10bc98d4 100644 --- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx +++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx @@ -35,16 +35,23 @@
Filtri attivi -
-
- Articolo - -
-
- Macchina -
-
+
+
+
+ Articolo +
+ +
+ reset +
+
+
+
+ Macchina + +
+
@@ -87,8 +94,10 @@
- - + + + <%# Eval("CodArticolo") %> +
@@ -100,10 +109,11 @@ - - -
- + + + <%# Eval("Nome") %> +
<%# Eval("CodMacchina") %>
+
diff --git a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs index 8a777cad..cfde38da 100644 --- a/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs +++ b/MP-Admin/WebUserControls/mod_gestPromODL.ascx.cs @@ -9,6 +9,10 @@ namespace MoonProAdmin.WebUserControls { public partial class mod_gestPromODL : System.Web.UI.UserControl { + /// + /// Evento selezione filtro + /// + public event EventHandler eh_selFilt; /// /// Determina se sia solo readonly il controllo... /// @@ -469,25 +473,49 @@ namespace MoonProAdmin.WebUserControls protected void txtFiltCodArt_TextChanged(object sender, EventArgs e) { - updateTable(); + updateGrView(); } protected void txtFiltIdxMacc_TextChanged(object sender, EventArgs e) { - updateTable(); + updateGrView(); } protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) { - updateTable(); + updateGrView(); } /// /// Aggiorno Gridview /// - private void updateTable() + private void updateGrView() { grView.DataBind(); } + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelArt_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo + txtFiltCodArt.Text = lb.CommandArgument; + updateGrView(); + } + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelMacc_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo + txtFiltIdxMacc.Text = lb.CommandArgument; + updateGrView(); + } } } \ No newline at end of file