diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx b/PUB/WebUserContols/mod_ER_richieste.ascx index 46fe354..5b85d17 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx +++ b/PUB/WebUserContols/mod_ER_richieste.ascx @@ -1,12 +1,12 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_richieste.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_richieste" %> <%@ Register Src="~/WebUserContols/mod_ER_grid.ascx" TagPrefix="uc1" TagName="mod_ER_grid" %> <%@ Register Src="~/WebUserContols/mod_ER_insNew.ascx" TagPrefix="uc1" TagName="mod_ER_insNew" %> - +<%@ Register Src="~/WebUserContols/mod_ER_selCondominio.ascx" TagPrefix="uc1" TagName="mod_ER_selCondominio" %>
Richieste
-
+ <%--
@@ -18,7 +18,8 @@ -
+
--%> +
Apri nuova » @@ -26,49 +27,6 @@
- <%--
Inserimento nuova richiesta
-
-
Area
-
- - - - -
-
Fornitore
-
- - - - - - - - - -
-
- - -
-
Messaggio
-
- -
-
Contatto
-
- -
-
Tel Contatto
-
- -
-
- - Registra richiesta - -
-
--%>
Elenco Richieste Aperte Amministratore
diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.cs index fdbcf77..6d240e9 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx.cs +++ b/PUB/WebUserContols/mod_ER_richieste.ascx.cs @@ -12,12 +12,13 @@ namespace PUB.WebUserContols { if (!Page.IsPostBack) { - fixSelCondomini(); // salvo le selezioni... saveSelections(); } mod_ER_grid.eh_selCond += Mod_ER_grid_eh_selCond; + mod_ER_selCondominio.eh_selected += Mod_ER_selCondominio_eh_selected; } + /// /// modalità edit corrente /// @@ -32,27 +33,9 @@ namespace PUB.WebUserContols memLayer.ML.setSessionVal("ER_EditMode", value); } } - /// - /// Imposta metodo sel condomini... - /// - private void fixSelCondomini() + private void Mod_ER_selCondominio_eh_selected(object sender, EventArgs e) { - odsCondomini.SelectParameters.Clear(); - switch (currMode) - { - case ER_EditMode.mND: - break; - case ER_EditMode.mAmministratore: - odsCondomini.SelectMethod = "getByAmm"; - odsCondomini.SelectParameters.Add("idxAmm", DbType.Int32, memLayer.ML.StringSessionObj("idxAmm")); - break; - case ER_EditMode.mFornitore: - odsCondomini.SelectMethod = "getByForn"; - odsCondomini.SelectParameters.Add("idxFornitore", DbType.Int32, memLayer.ML.StringSessionObj("idxFornitore")); - break; - default: - break; - } + saveSelections(); } private void Mod_ER_grid_eh_selCond(object sender, EventArgs e) @@ -62,7 +45,7 @@ namespace PUB.WebUserContols // imposto! try { - ddlCondominio.SelectedValue = ce.idxCond.ToString(); + mod_ER_selCondominio.condSelected = ce.idxCond.ToString(); } catch { } @@ -71,20 +54,17 @@ namespace PUB.WebUserContols private void saveSelections() { - mod_ER_grid.idxCond = ddlCondominio.SelectedValue; - mod_ER_insNew.idxCond = ddlCondominio.SelectedValue; - } - - protected void ddlCondominio_SelectedIndexChanged(object sender, EventArgs e) - { - // se la selezione c'è --> permetto AGGIUNGI - lbtAddNew.Visible = (ddlCondominio.SelectedIndex > 0); - saveSelections(); + mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected; + mod_ER_insNew.idxCond = mod_ER_selCondominio.condSelected; } protected void lbtAddNew_Click(object sender, EventArgs e) { - toggleAddNew(); + // ABILITO SOLO in modalità amministratore... + if (currMode == ER_EditMode.mAmministratore) + { + toggleAddNew(); + } } private void toggleAddNew() @@ -116,8 +96,7 @@ namespace PUB.WebUserContols lbtAddNew.Visible = false; divInsNew.Visible = false; divElenco.Visible = true; - ddlCondominio.SelectedIndex = 0; - ddlCondominio.DataBind(); + mod_ER_selCondominio.condSelected = "0"; saveSelections(); } } diff --git a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs index 3a8dce5..28d9121 100644 --- a/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs +++ b/PUB/WebUserContols/mod_ER_richieste.ascx.designer.cs @@ -13,31 +13,13 @@ namespace PUB.WebUserContols { public partial class mod_ER_richieste { /// - /// Controllo lbtResetCond. + /// Controllo mod_ER_selCondominio. /// /// /// 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.LinkButton lbtResetCond; - - /// - /// Controllo ddlCondominio. - /// - /// - /// 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 ddlCondominio; - - /// - /// Controllo odsCondomini. - /// - /// - /// 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 odsCondomini; + protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio; /// /// Controllo lbtAddNew.