using SteamWare; using System.Web; namespace Data { /// /// Base class for action-enabled user controls /// It is not meant to be be used directly. /// public class BaseUserControl : System.Web.UI.UserControl { /// /// Verifica se utente ABBIA diritti PAM /// public bool hasPAM { get { return devicesAuthProxy.stObj.userHasRight("PAM"); } } /// /// Verifica se utente ABBIA diritti PAZ /// public bool hasPAZ { get { return devicesAuthProxy.stObj.userHasRight("PAZ"); } } /// /// Verifica se utente ABBIA diritti PBO /// public bool hasPBO { get { return devicesAuthProxy.stObj.userHasRight("PBO"); } } public bool isPAM { get { return Page.Request.Url.AbsolutePath.Contains("/PAM/"); } } public bool isPAZ { get { return Page.Request.Url.AbsolutePath.Contains("/PAZ/"); } } public bool isPBO { get { return Page.Request.Url.AbsolutePath.Contains("/PBO/"); } } public bool isPCO { get { return Page.Request.Url.AbsolutePath.Contains("/PCO/"); } } /// /// Richiesta di cui mostrare la history /// public int idxRichiesta { get { int answ = 0; int.TryParse(Request.QueryString["idxRichiesta"], out answ); return answ; } } /// /// KEY amministratore in sessione /// public int idxAmm { get { return memLayer.ML.IntSessionObj("idxAmm"); } set { memLayer.ML.setSessionVal("idxAmm", value); } } /// /// KEY fornitore in sessione /// public int idxFornitore { get { return memLayer.ML.IntSessionObj("idxFornitore"); } } /// /// modalità edit corrente /// public ER_EditMode currMode { get { return (ER_EditMode)memLayer.ML.objSessionObj("ER_EditMode"); } set { memLayer.ML.setSessionVal("ER_EditMode", value); } } /// /// Pagina corrente x redirect /// public string currPage { get { return HttpContext.Current.Request.Url.PathAndQuery; } } /// /// titolo pagina /// public string titolo { get { return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); } } } }