31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SteamWare;
|
|
|
|
namespace SteamWareGestioneLicenze
|
|
{
|
|
public partial class GeneratoreLicenze : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
txtDateExp.Text = DateTime.Today.ToShortDateString();
|
|
}
|
|
}
|
|
|
|
protected void btnEncode_Click(object sender, EventArgs e)
|
|
{
|
|
lblAuthKey.Text = licenseMan.getAuthKey(txtInstallazione.Text.Trim(), txtApplicazione.Text.Trim(), Convert.ToInt32(txtNumLic.Text.Trim()), Convert.ToDateTime(txtDateExp.Text));
|
|
}
|
|
|
|
protected void btnDecode_Click(object sender, EventArgs e)
|
|
{
|
|
lblDateDecoded.Text = licenseMan.expiryDateByAuthKey(txtInstallazione.Text.Trim(), txtApplicazione.Text.Trim(), Convert.ToInt32(txtNumLic.Text.Trim()), txtAuthKey.Text).ToShortDateString();
|
|
}
|
|
}
|
|
} |