Riaggiunto GMW_data
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SteamWare;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace GMW_data
|
||||
{
|
||||
public class UserControl : SteamWare.UserControl
|
||||
{
|
||||
/// <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="_testoPre"></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;
|
||||
}
|
||||
/// <summary>
|
||||
/// CodCS in sessione...
|
||||
/// </summary>
|
||||
public string CodCs
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("CodCS");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
public string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user