Files
SteamWare/SteamWareLib/ApplicationSimplePage.cs
T
2018-03-17 09:47:02 +01:00

88 lines
2.6 KiB
C#

namespace SteamWare
{
/// <summary>
/// Pagina base applicazioni SteamWare da cui derivare le altre
/// </summary>
public class ApplicationSimplePage : System.Web.UI.Page
{
/// <summary>
/// Iniziazlizzazione void (non fa nulla)
/// </summary>
protected ApplicationSimplePage()
{ }
#region area public
#endregion
#region flusso creazione pagina =c=
/// <summary>
/// Metodo MAIN: viene eseguita al caricamento ed effettua delle routines per il controllo utente e istanzia l'oggetto memLayer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void Page_Load(object sender, System.EventArgs e)
{
}
#endregion
#region utility =c=
/// <summary>
/// rimanda alla pagina di Work In Progress salvando in session un titolo ed una descrizione che al pagina wip poi mostrerà all'utente
/// </summary>
/// <param name="titoloWIP">titolo da mostrare nella pagina WIP</param>
/// <param name="descrizioneWIP">descrizione da mostrare nella pagina WIP</param>
protected void paginaWIP(string titoloWIP, string descrizioneWIP)
{
Session["titoloWIP"] = titoloWIP;
Session["descrizioneWIP"] = descrizioneWIP;
Response.Redirect("WIP.aspx");
}
/// <summary>
/// wrapper per log con salvataggio dell'IP del chiamante
/// </summary>
/// <param name="_testoPre"></param>
/// <returns></returns>
public bool httpLog(string _testoPre)
{
bool answ = false;
string postazione_IP = "";
try
{
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
}
catch
{ }
logger.lg.scriviLog(postazione_IP + _testoPre);
return answ;
}
/// <summary>
/// wrapper per log con salvataggio dell'IP del chiamante
/// </summary>
/// <param name="testoLog">The testo log.</param>
/// <param name="tipo">The tipo.</param>
/// <returns></returns>
public bool httpLog(string testoLog, tipoLog tipo)
{
bool answ = false;
string postazione_IP = "";
try
{
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
}
catch
{ }
logger.lg.scriviLog(postazione_IP + testoLog, tipo);
return answ;
}
#endregion
}
}