7d289a3b64
pulizia codice...
59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
using System;
|
|
|
|
namespace GIM_site.WebUserControls
|
|
{
|
|
public partial class mod_selCodice : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public event EventHandler eh_selVal;
|
|
|
|
private void raiseEvent()
|
|
{
|
|
if (eh_selVal != null)
|
|
{
|
|
eh_selVal(this, new EventArgs());
|
|
}
|
|
}
|
|
|
|
|
|
protected void ddlCodInterno_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
raiseEvent();
|
|
}
|
|
/// <summary>
|
|
/// valore selezionato
|
|
/// </summary>
|
|
public string selValue
|
|
{
|
|
get
|
|
{
|
|
return ddlCodInterno.SelectedValue;
|
|
}
|
|
set
|
|
{
|
|
try
|
|
{
|
|
int posPunto = value.IndexOf('.');
|
|
posPunto = value.IndexOf('.', posPunto + 1);
|
|
string codGruppo = value.Substring(0, posPunto);
|
|
ddlGruppo.SelectedValue = codGruppo;
|
|
ddlCodInterno.SelectedValue = value;
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
protected void ddlGruppo_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
ddlCodInterno.DataBind();
|
|
raiseEvent();
|
|
}
|
|
}
|
|
} |