7d289a3b64
pulizia codice...
71 lines
1.8 KiB
C#
71 lines
1.8 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Web.UI.WebControls;
|
|
|
|
public partial class mod_elMacch2Fam : ApplicationUserControl
|
|
{
|
|
public event EventHandler eh_delValore;
|
|
/// <summary>
|
|
/// evento dati associati a controllo
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void grView_DataBound(object sender, EventArgs e)
|
|
{
|
|
if (grView.Rows.Count > 0)
|
|
{
|
|
LinkButton lb;
|
|
// aggiorno gli headers
|
|
foreach (TableCell cella in grView.HeaderRow.Cells)
|
|
{
|
|
try
|
|
{
|
|
lb = (LinkButton)cella.Controls[0];
|
|
lb.Text = traduci(lb.Text);
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
|
|
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
|
|
}
|
|
else
|
|
{
|
|
lblNumRec.Text = "";
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// indica il valore dell'impianto filtrato in visualizzazione
|
|
/// </summary>
|
|
public int idxFamMacchSel
|
|
{
|
|
get
|
|
{
|
|
return Convert.ToInt32(lblFamMacc.Text);
|
|
}
|
|
set
|
|
{
|
|
lblFamMacc.Text = value.ToString();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// eliminato il valore genera l'evento
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
|
|
{
|
|
if (eh_delValore != null)
|
|
{
|
|
eh_delValore(this, new EventArgs());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// esegue update
|
|
/// </summary>
|
|
public void doUpdate()
|
|
{
|
|
grView.DataBind();
|
|
}
|
|
}
|