Aggiunta gestione link nuova versione SMART

This commit is contained in:
Samuele Locatelli
2023-01-16 20:07:43 +01:00
parent 4a0d0cf70a
commit b18efea3dc
6 changed files with 94 additions and 29 deletions
@@ -2,6 +2,8 @@
<div class="row">
<asp:HiddenField runat="server" ID="hfShowExt" />
<asp:HiddenField runat="server" ID="hfLinkCore" />
<asp:HiddenField runat="server" ID="hfJumperFormat" />
<asp:Repeater runat="server" ID="repUserCards" DataSourceID="ods">
<ItemTemplate>
<div class="col-md-3 my-4">
+26 -1
View File
@@ -60,12 +60,33 @@ namespace GPW_Admin.WebUserControls
}
}
public bool linkCore
{
get
{
bool answ = false;
bool.TryParse(hfLinkCore.Value, out answ);
return answ;
}
set
{
hfLinkCore.Value = $"{value}";
repUserCards.DataBind();
}
}
public string jumperFormat
{
get => hfJumperFormat.Value;
set => hfJumperFormat.Value = value;
}
#endregion Public Properties
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
jumperFormat = "jumper?idxDipendente={0}&UserAuthkey={1}";
}
#endregion Protected Methods
@@ -75,12 +96,16 @@ namespace GPW_Admin.WebUserControls
public string getImgUrl(object idxDip, object UserAuthkey)
{
string urlName = showExt ? "smartBaseUrlExt" : "smartBaseUrlInt";
// se vuole modalità core --> sostituisco
if(linkCore)
{
urlName += "Core";
}
string[] valori = new string[2];
valori[0] = $"{idxDip}";
valori[1] = HttpUtility.UrlEncode($"{UserAuthkey}");
string baseUrl = $"{memLayer.ML.CRS("UrlQRCodeGen")}/HOME/QR_site/{memLayer.ML.CRS("UrlQuery")}";
//string baseUrl = $"{memLayer.ML.CRS("UrlQRCodeGen")}/HOME/QR_site/JSON_ENC?val=";
string urlEncoded = memLayer.ML.CRS(urlName) + HttpUtility.UrlEncode("jumper?idxDipendente={0}&UserAuthkey={1}");
//string rawUrl = memLayer.ML.CRS(urlName) + "jumper?idxDipendente={0}&UserAuthkey={1}";
+18
View File
@@ -23,6 +23,24 @@ namespace GPW_Admin.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowExt;
/// <summary>
/// hfLinkCore control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfLinkCore;
/// <summary>
/// hfJumperFormat control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfJumperFormat;
/// <summary>
/// repUserCards control.
/// </summary>