Files
WebGIM/GIM_site/WebUserControls/mod_selCodice.ascx.cs
T
Samuele E. Locatelli 1e27cc350c Fix gestione codici "lunghi" nuovi
...in decodifica prendeva ancora primi 4 char...
2017-03-30 17:46:09 +02:00

64 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
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();
}
}
}