57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace MP_MAG.SMART
|
|
{
|
|
public partial class SmartStarter : BasePage
|
|
{
|
|
#region Private Methods
|
|
|
|
private void fixDisplay()
|
|
{
|
|
refreshQrCode();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// restituisce URL immagine QRCode
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected string getImageUrl()
|
|
{
|
|
string matrixUrl = $"{memLayer.ML.CRS("matrixUrl")}/HOME/QR_site/JSON?val=";
|
|
var currUrl = Request.Url;
|
|
string baseUrlPath = $"{currUrl.Scheme}://{currUrl.Authority}/{memLayer.ML.CRS("UrlMagBasePath")}/";
|
|
string MatrOpr = memLayer.ML.StringSessionObj("MatrOpr");
|
|
// fare: inviare user+token adeguatamente cablati...
|
|
string payload = "{'baseUrl':'" + baseUrlPath + "PLScanner?{0}','parameters':['MatrOpr=" + MatrOpr + "']}";
|
|
string answ = $"{matrixUrl}{payload}";
|
|
return answ;
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
fixDisplay();
|
|
}
|
|
}
|
|
|
|
protected void refreshQrCode()
|
|
{
|
|
// genero nuovo QR
|
|
string qrUrl = getImageUrl();
|
|
imgQrMain.ImageUrl = qrUrl;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |