Files
C.TRACK/C-TRACK/WebUserControls/mod_userCards.ascx.cs
T
Samuele E. Locatelli fa61b93357 Update URL x link
2018-12-01 16:59:48 +01:00

37 lines
1.1 KiB
C#

using System;
namespace C_TRACK.WebUserControls
{
/// <summary>
/// Struct x richiesta serializzata/deserializzata
/// </summary>
public struct qrRequest
{
public string valore;
}
public partial class mod_userCards : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public string getImgUrl(object codOpr)
{
string answ = "";
#if false
//string targetUrl = string.Format(@"ctrack.steamware.net/elet-scal/jumper?USER_NAME=info@elettronicascalvina.it&UserAuthkey=asdfbqhewrqg7802345bhasdfg78&CodOpr=");
//targetUrl = HttpUtility.UrlEncode(targetUrl);
// genero obj
qrRequest richiesta = new qrRequest();
richiesta.valore = answ;
// ora serializzo oggetto!
answ = JsonConvert.SerializeObject(richiesta);
#endif
string targetUrl = "CTRACK_ELET_SCAL";
answ = string.Format(@"https://qrcode.steamware.net/Home/QR_site/{0}?val={1}", targetUrl, codOpr);
//answ = string.Format(@"http://localhost:59543//Home/QR_site/{0}?val={1}", targetUrl, codOpr);
return answ;
}
}
}