Files
SSC/CMS_SC/Vocabolario.aspx.cs
T
2015-06-18 16:48:36 +02:00

64 lines
2.2 KiB
C#

using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace CMS_SC
{
public partial class Vocabolario : System.Web.UI.Page
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!Page.IsPostBack)
{
mod_righePag1.numRowPag = 20;
Mod_vocabolario1.pageSize = mod_righePag1.numRowPag;
}
// imposto controlli eventi
Mod_vocabolario1.eh_selezioneValore += new EventHandler(Mod_vocabolario1_eh_selezioneValore);
Mod_vocabolario1.eh_resetSelezione += new EventHandler(Mod_vocabolario1_eh_resetSelezione);
// setto visibilità dettaglio termini
Mod_lemmiVocab1.Visible = false;
mod_righePag1.eh_newNum += mod_righePag1_eh_newNum;
}
/// <summary>
/// aggiornato numero righe datagrid... aggiorno visualizzazione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_righePag1_eh_newNum(object sender, EventArgs e)
{
Mod_vocabolario1.pageSize = mod_righePag1.numRowPag;
}
void Mod_vocabolario1_eh_resetSelezione(object sender, EventArgs e)
{
Mod_lemmiVocab1.Visible = false;
Session.Remove("lemma_sel");
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
void Mod_vocabolario1_eh_selezioneValore(object sender, EventArgs e)
{
Mod_lemmiVocab1.Visible = true;
Mod_lemmiVocab1.doUpdate();
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
Mod_vocabolario1.eh_selezioneValore -= new EventHandler(Mod_vocabolario1_eh_selezioneValore);
Mod_vocabolario1.eh_resetSelezione -= new EventHandler(Mod_vocabolario1_eh_resetSelezione);
}
}
}