57 lines
1.7 KiB
C#
57 lines
1.7 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;
|
|
using GPW_data;
|
|
|
|
namespace GPW.WebUserControls
|
|
{
|
|
public partial class mod_sendAuthToEmail : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
/// <summary>
|
|
/// salvo nuovo device...
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnConferma_Click(object sender, EventArgs e)
|
|
{
|
|
// cerco key x user selezionato
|
|
int idxDipendente = 0;
|
|
string UserAuthKey = "";
|
|
string destinatario = "";
|
|
|
|
DS_Applicazione.DipendentiRow dipendente = null;
|
|
try
|
|
{
|
|
idxDipendente = Convert.ToInt32(ddlIdxDipendente.SelectedValue);
|
|
dipendente = DataProxy.DP.taDipendenti.getByIdx(idxDipendente)[0];
|
|
UserAuthKey = dipendente.authKey;
|
|
destinatario = dipendente.email;
|
|
}
|
|
catch
|
|
{ }
|
|
// se ho trovato un email...
|
|
if (destinatario != "" && idxDipendente > 0)
|
|
{
|
|
DataProxy.DP.sendUserAuthEmail(destinatario, UserAuthKey, idxDipendente);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// resetto tutto
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAnnulla_Click(object sender, EventArgs e)
|
|
{
|
|
ddlIdxDipendente.SelectedIndex = 0;
|
|
lblWarning.Visible = false;
|
|
}
|
|
}
|
|
} |