72 lines
1.6 KiB
C#
72 lines
1.6 KiB
C#
using Data;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace PUB
|
|
{
|
|
public partial class SitePAM : System.Web.UI.MasterPage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
memLayer.ML.setSessionVal("ER_EditMode", ER_EditMode.mPAM);
|
|
bool userAuth = devicesAuthProxy.stObj.userHasRight("PAM");
|
|
// se ha permesso --> salvo KEY di riferimento...
|
|
if (userAuth)
|
|
{
|
|
int idxAmm = 0;
|
|
try
|
|
{
|
|
idxAmm = DtProxy.man.taAssU2A.getByUser(devicesAuthProxy.stObj.utente)[0].idxAmm;
|
|
}
|
|
catch
|
|
{ }
|
|
memLayer.ML.setSessionVal("idxAmm", idxAmm);
|
|
memLayer.ML.setSessionVal("idxFornitore", "0");
|
|
try
|
|
{
|
|
nomeAmm = rigaAmministratore(idxAmm).RagSociale;
|
|
nomeForn = "";
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
}
|
|
}
|
|
public string nomeForn
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("nomeForn");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("nomeForn", value);
|
|
}
|
|
}
|
|
public string nomeAmm
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.StringSessionObj("nomeAmm");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("nomeAmm", value);
|
|
}
|
|
}
|
|
protected DS_app.AnagAmministratoriRow rigaAmministratore(int idxAmm)
|
|
{
|
|
DS_app.AnagAmministratoriRow answ = null;
|
|
try
|
|
{
|
|
answ = DtProxy.man.taAAmm.getByKey(idxAmm)[0];
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|
|
} |