Files
b2bcondomini.it/PUB/WebUserContols/mod_userLinks.ascx.cs
T
2018-09-29 11:26:37 +02:00

75 lines
1.5 KiB
C#

using SteamWare;
using System;
namespace PUB.WebUserContols
{
public partial class mod_userLinks : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// Fornitore selezionato
/// </summary>
public int idxForn
{
get
{
int answ = 0;
int.TryParse(hfIdxForn.Value, out answ);
return answ;
}
set
{
hfIdxForn.Value = value.ToString();
// se value > 0 imposto ODS...
if (value > 0)
{
repUtenti.DataSourceID = "odsForn";
}
}
}
/// <summary>
/// Amministratore selezionato
/// </summary>
public int idxAmm
{
get
{
int answ = 0;
int.TryParse(hfIdxAmm.Value, out answ);
return answ;
}
set
{
hfIdxAmm.Value = value.ToString();
// se value > 0 imposto ODS...
if (value > 0)
{
repUtenti.DataSourceID = "odsAmm";
}
}
}
public string linkUtente(string userName)
{
string answ = userName;
// cerco chiave...
string AuthKey = "";
try
{
AuthKey = devicesAuthProxy.stObj.taUtenti.getByEmail(userName)[0].authKey;
}
catch
{ }
if (userName != "" && AuthKey != "")
{
string siteName = memLayer.ML.CRS("SiteName");
answ = string.Format("http://{0}/jumper?UserAuthkey={1}&USER_NAME={2}", siteName, AuthKey, userName);
}
return answ;
}
}
}