update elenco cond x interventi conclusi

This commit is contained in:
Samuele E. Locatelli
2018-08-08 18:45:23 +02:00
parent 8fca00806b
commit d6cac4fc07
4 changed files with 13 additions and 55 deletions
+3 -13
View File
@@ -1,22 +1,12 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_conclusi.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_conclusi" %>
<%@ Register Src="~/WebUserContols/mod_ER_grid.ascx" TagPrefix="uc1" TagName="mod_ER_grid" %>
<%@ Register Src="~/WebUserContols/mod_ER_selCondominio.ascx" TagPrefix="uc1" TagName="mod_ER_selCondominio" %>
<div class="card">
<div class="card-header alert alert-success text-uppercase align-middle p-2">
<h5>Conclusi</h5>
<div class="input-group mb-3">
<div class="input-group-prepend">
<asp:LinkButton runat="server" ID="lbtResetCond" class="btn btn-outline-secondary" type="button" OnClick="lbtResetCond_Click"><i class="fas fa-ban"></i></asp:LinkButton>
</div>
<asp:DropDownList runat="server" ID="ddlCondominio" DataSourceID="odsCondomini" DataTextField="nome" DataValueField="idxCond" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="ddlCondominio_SelectedIndexChanged" CssClass="form-control">
<asp:ListItem Text="-- Selezionare Condominio --" Value="0"></asp:ListItem>
</asp:DropDownList>
<asp:ObjectDataSource runat="server" ID="odsCondomini" SelectMethod="getByAmm" TypeName="Data.DS_appTableAdapters.AnagCondominiTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="1" Name="idxAmm" SessionField="idxAmm" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<uc1:mod_ER_selCondominio runat="server" ID="mod_ER_selCondominio" />
</div>
<div class="card-body">
<h5 class="card-title">Elenco degli interventi conclusi</h5>
+8 -14
View File
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace PUB.WebUserContols
{
@@ -17,8 +13,12 @@ namespace PUB.WebUserContols
saveSelections();
}
mod_ER_grid.eh_selCond += Mod_ER_grid_eh_selCond;
mod_ER_selCondominio.eh_selected += Mod_ER_selCondominio_eh_selected;
}
private void Mod_ER_selCondominio_eh_selected(object sender, EventArgs e)
{
saveSelections();
}
private void Mod_ER_grid_eh_selCond(object sender, EventArgs e)
{
// recupero evento tipizzato
@@ -26,7 +26,7 @@ namespace PUB.WebUserContols
// imposto!
try
{
ddlCondominio.SelectedValue = ce.idxCond.ToString();
mod_ER_selCondominio.condSelected = ce.idxCond.ToString();
}
catch
{ }
@@ -35,18 +35,12 @@ namespace PUB.WebUserContols
private void saveSelections()
{
mod_ER_grid.idxCond = ddlCondominio.SelectedValue;
}
protected void ddlCondominio_SelectedIndexChanged(object sender, EventArgs e)
{
saveSelections();
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
}
protected void lbtResetCond_Click(object sender, EventArgs e)
{
ddlCondominio.SelectedIndex = 0;
ddlCondominio.DataBind();
mod_ER_selCondominio.condSelected = "0";
saveSelections();
}
}
+2 -20
View File
@@ -13,31 +13,13 @@ namespace PUB.WebUserContols {
public partial class mod_ER_conclusi {
/// <summary>
/// Controllo lbtResetCond.
/// Controllo mod_ER_selCondominio.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtResetCond;
/// <summary>
/// Controllo ddlCondominio.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlCondominio;
/// <summary>
/// Controllo odsCondomini.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource odsCondomini;
protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio;
/// <summary>
/// Controllo mod_ER_grid.
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace PUB.WebUserContols
{
@@ -42,10 +38,6 @@ namespace PUB.WebUserContols
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
}
protected void ddlCondominio_SelectedIndexChanged(object sender, EventArgs e)
{
saveSelections();
}
protected void lbtResetCond_Click(object sender, EventArgs e)
{
mod_ER_selCondominio.condSelected = "0";