106 lines
2.4 KiB
C#
106 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace PUB.WebUserContols
|
|
{
|
|
public partial class mod_ER_grid : System.Web.UI.UserControl
|
|
{
|
|
public event EventHandler eh_selCond;
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
}
|
|
|
|
protected void lbtReset_Click(object sender, EventArgs e)
|
|
{
|
|
grViewElRich.EditIndex = -1;
|
|
grViewElRich.SelectedIndex = -1;
|
|
grViewElRich.DataBind();
|
|
}
|
|
|
|
protected void grViewElRich_RowEditing(object sender, GridViewEditEventArgs e)
|
|
{
|
|
// imposto selezione a riga in edit
|
|
grViewElRich.SelectedIndex = -1;
|
|
}
|
|
|
|
protected void grViewElRich_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
|
|
{
|
|
grViewElRich.EditIndex = -1;
|
|
}
|
|
|
|
protected void grViewElRich_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
|
|
{
|
|
grViewElRich.EditIndex = -1;
|
|
grViewElRich.SelectedIndex = -1;
|
|
}
|
|
/// <summary>
|
|
/// Gestione condominio
|
|
/// </summary>
|
|
public string idxCond
|
|
{
|
|
get
|
|
{
|
|
return hfCondominio.Value;
|
|
}
|
|
set
|
|
{
|
|
hfCondominio.Value = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Min stato filtraggio
|
|
/// </summary>
|
|
public string StatoMin
|
|
{
|
|
get
|
|
{
|
|
return hfStatoMin.Value;
|
|
}
|
|
set
|
|
{
|
|
hfStatoMin.Value = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Max stato filtraggio
|
|
/// </summary>
|
|
public string StatoMax
|
|
{
|
|
get
|
|
{
|
|
return hfStatoMax.Value;
|
|
}
|
|
set
|
|
{
|
|
hfStatoMax.Value = value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Selezionato un condominio --> riporto selezione
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void lbtSelCond_Click(object sender, EventArgs e)
|
|
{
|
|
LinkButton lb = (LinkButton)sender;
|
|
int idxCond = 0;
|
|
int.TryParse(lb.CommandArgument, out idxCond);
|
|
// sollevo evento selezione condominio...
|
|
eh_selCond?.Invoke(this, new SelCondEventArgs(idxCond));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Evento parametrico sel condominio
|
|
/// </summary>
|
|
public class SelCondEventArgs : EventArgs
|
|
{
|
|
public SelCondEventArgs(int newIdxCond)
|
|
{ idxCond = newIdxCond; }
|
|
public int idxCond { get; set; }
|
|
}
|
|
} |