Files
b2bcondomini.it/PUB/WebUserContols/mod_userList.ascx.cs
T
2018-09-28 19:04:53 +02:00

91 lines
1.8 KiB
C#

using System;
namespace PUB.WebUserContols
{
public partial class mod_userList : System.Web.UI.UserControl
{
/// <summary>
/// indicato (nuovo) numero righe x pagina
/// </summary>
public event EventHandler eh_selected;
/// <summary>
/// indicato (nuovo) numero righe x pagina
/// </summary>
public event EventHandler eh_reset;
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// Fornitore selezionato
/// </summary>
public int idxForn
{
get
{
int answ = 0;
int.TryParse(hfIdxForn.Value, out answ);
return answ;
}
set
{
hfIdxForn.Value = value.ToString();
// se value > 0 imposto ODS...
if (value > 0)
{
grView.DataSourceID = "odsForn";
}
}
}
/// <summary>
/// Amministratore selezionato
/// </summary>
public int idxAmm
{
get
{
int answ = 0;
int.TryParse(hfIdxAmm.Value, out answ);
return answ;
}
set
{
hfIdxAmm.Value = value.ToString();
// se value > 0 imposto ODS...
if (value > 0)
{
grView.DataSourceID = "odsAmm";
}
}
}
protected void lbtReset_Click(object sender, EventArgs e)
{
grView.SelectedIndex = -1;
grView.DataBind();
// sollevo evento nuovo valore...
if (eh_reset != null)
{
eh_reset(this, new EventArgs());
}
}
protected void grView_DataBound(object sender, EventArgs e)
{
}
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// sollevo evento nuovo valore...
if (eh_selected != null)
{
eh_selected(this, new EventArgs());
}
}
public void doUpdate()
{
grView.DataBind();
}
}
}