58 lines
1.3 KiB
C#
58 lines
1.3 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace GPW_Admin
|
|
{
|
|
public class BasePage : System.Web.UI.Page
|
|
{
|
|
#region Public Properties
|
|
|
|
public string pagCorrente
|
|
{
|
|
get
|
|
{
|
|
return Request.Url.Segments.LastOrDefault();
|
|
}
|
|
}
|
|
|
|
public string titolo
|
|
{
|
|
get
|
|
{
|
|
string answ = pagCorrente;
|
|
var tabPerm = (DataLayer_AnagGen.PermessiRow[])user_std.UtSn.permessi.Select($"URL = '{pagCorrente}' OR URL = '{pagCorrente}.aspx'");
|
|
if (tabPerm.Length > 0)
|
|
{
|
|
answ = tabPerm[0].NOME;
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Private Methods
|
|
|
|
private void Page_Init(object sender, EventArgs e)
|
|
{
|
|
ViewStateUserKey = Session.SessionID;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// effettua traduzione del lemma
|
|
/// </summary>
|
|
/// <param name="lemma"></param>
|
|
/// <returns></returns>
|
|
public string traduci(string lemma)
|
|
{
|
|
return user_std.UtSn.Traduci(lemma);
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |