Refresh gestione flusso ticket richieste sblocco attivazioni
This commit is contained in:
@@ -45,31 +45,38 @@
|
||||
</ItemTemplate>
|
||||
</asp:FormView>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-6">
|
||||
<b>Dati richiesta</b>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-envelope-o" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtEmail" ToolTip="Email richiedente" placeholder="Email Richiedente" class="form-control" TextMode="Email"></asp:TextBox>
|
||||
<%--</div>
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-user" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtRichiedente" ToolTip="Richiedente" placeholder="Richiedente" class="form-control"></asp:TextBox>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-envelope-o" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtEmail" ToolTip="Email richiedente" placeholder="Email Richiedente" class="form-control" TextMode="Email"></asp:TextBox>
|
||||
<%--</div>
|
||||
<div class="input-group">--%>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-phone" aria-hidden="true"></i></span>
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-phone" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtPhone" ToolTip="Tel richiedente" placeholder="Tel Richiedente" class="form-control" TextMode="Phone"></asp:TextBox>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtPhone" ToolTip="Tel richiedente" placeholder="Tel Richiedente" class="form-control" TextMode="Phone"></asp:TextBox>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></span>
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 2.5em;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></span>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtCausale" ToolTip="Causale Richiesta" placeholder="Causale Richiesta" class="form-control" TextMode="MultiLine"></asp:TextBox>
|
||||
<div class="input-group-append">
|
||||
<asp:LinkButton runat="server" ID="lbtSendReq" CssClass="btn btn-block btn-primary p-3" OnClick="lbtSendReq_Click" ToolTip="Invio ticket richiesta sblocco licenza">Invio richiesta <i class="fa fa-paper-plane" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox runat="server" ID="txtCausale" ToolTip="Causale Richiesta" placeholder="Causale Richiesta" class="form-control" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<br />
|
||||
<asp:LinkButton runat="server" ID="lbtSendReq" CssClass="btn btn-block btn-primary" OnClick="lbtSendReq_Click">Invio richiesta <i class="fa fa-paper-plane" aria-hidden="true"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByIdx" TypeName="GPW_data.DS_ApplicazioneTableAdapters.DipendentiTableAdapter">
|
||||
<SelectParameters>
|
||||
|
||||
@@ -46,6 +46,23 @@ namespace GPW_Admin.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
protected int idxSubLic
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
// verifico SE sia disponibile licenza...
|
||||
var activationsList = licenzeGPW.ListaAttivazioni;
|
||||
var currHash = DataProxy.DP.hashCodImpiego(currRowDip);
|
||||
var currAct = activationsList.Where(x => x.CodImpiego == currHash).FirstOrDefault();
|
||||
if (currAct != null)
|
||||
{
|
||||
answ = currAct.IdxSubLic;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
@@ -77,9 +94,11 @@ namespace GPW_Admin.WebUserControls
|
||||
DateTime adesso = DateTime.Now;
|
||||
|
||||
// chiama resync dati licenza (cod impiego / codAuth)
|
||||
bool fatto = licenzeGPW.sendTicketReq(txtEmail.Text.Trim(), txtPhone.Text.Trim(), txtCausale.Text.Trim(), CodImpiego).Result;
|
||||
frmView.DataBind();
|
||||
raiseAddNew();
|
||||
bool fatto = licenzeGPW.sendTicketReq(txtRichiedente.Text.Trim(), txtEmail.Text.Trim(), txtPhone.Text.Trim(), txtCausale.Text.Trim(), CodImpiego, idxSubLic).Result;
|
||||
if (fatto)
|
||||
{
|
||||
raiseReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,15 @@ namespace GPW_Admin.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.FormView frmView;
|
||||
|
||||
/// <summary>
|
||||
/// txtRichiedente 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.TextBox txtRichiedente;
|
||||
|
||||
/// <summary>
|
||||
/// txtEmail control.
|
||||
/// </summary>
|
||||
|
||||
@@ -27,6 +27,13 @@ namespace GPW_Admin
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_ticketFreeActiv_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
IdxDipSel = 0;
|
||||
cmp_ticketFreeActiv.idxDipSel = 0;
|
||||
fixDisplay();
|
||||
}
|
||||
|
||||
private void Cmp_toggleCards_ehToggle(object sender, EventArgs e)
|
||||
{
|
||||
fixDisplay();
|
||||
@@ -111,6 +118,7 @@ namespace GPW_Admin
|
||||
mod_adminDipendenti1.eh_doReset += Mod_adminDipendenti1_eh_doReset;
|
||||
cmp_userLicense.eh_doReset += Cmp_userLicense_eh_doReset;
|
||||
cmp_userLicense.eh_addNew += Cmp_userLicense_eh_addNew;
|
||||
cmp_ticketFreeActiv.eh_doRefresh += Cmp_ticketFreeActiv_eh_doRefresh;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -116,12 +116,13 @@ namespace GPW_data
|
||||
public string CodImp { get; set; } = "";
|
||||
public string CodInst { get; set; } = "";
|
||||
public string ContactEmail { get; set; } = "";
|
||||
public string ContactName { get; set; } = "";
|
||||
public string ContactPhone { get; set; } = "";
|
||||
public int idxSubLic { get; set; } = 0;
|
||||
|
||||
public bool IsValid
|
||||
{
|
||||
get => !string.IsNullOrEmpty(MasterKey) && !string.IsNullOrEmpty(ContactEmail) && !string.IsNullOrEmpty(CodInst) && !string.IsNullOrEmpty(CodApp);
|
||||
get => !string.IsNullOrEmpty(MasterKey) && !string.IsNullOrEmpty(ContactName) && !string.IsNullOrEmpty(ContactEmail) && !string.IsNullOrEmpty(CodInst) && !string.IsNullOrEmpty(CodApp);
|
||||
}
|
||||
|
||||
public string MasterKey { get; set; } = "";
|
||||
|
||||
@@ -683,13 +683,14 @@ namespace GPW_data
|
||||
/// <summary>
|
||||
/// Tenta invio di un ticket x licenza indicata
|
||||
/// </summary>
|
||||
/// <param name="contName"></param>
|
||||
/// <param name="contEmail"></param>
|
||||
/// <param name="contPhone"></param>
|
||||
/// <param name="reqBody"></param>
|
||||
/// <param name="codImpiego"></param>
|
||||
/// <param name="idxSubLic"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<bool> sendTicketReq(string contEmail, string contPhone, string reqBody, string codImpiego, int idxSubLic = 0)
|
||||
public static async Task<bool> sendTicketReq(string contName, string contEmail, string contPhone, string reqBody, string codImpiego, int idxSubLic)
|
||||
{
|
||||
bool answ = false;
|
||||
// cerco online
|
||||
@@ -699,6 +700,7 @@ namespace GPW_data
|
||||
|
||||
SupportRequest richiesta = new SupportRequest()
|
||||
{
|
||||
ContactName = contName,
|
||||
ContactEmail = contEmail,
|
||||
ContactPhone = contPhone,
|
||||
ReqBody = reqBody,
|
||||
@@ -826,7 +828,7 @@ namespace GPW_data
|
||||
/// <summary>
|
||||
/// Tenta disattivazione licenza dato codice impiego
|
||||
/// </summary>
|
||||
/// <param name="ParamsList">Dizionario codici da eliminare (CodImpiego/MasterKey)</param>
|
||||
/// <param name="ParamsList">Dizionario codici da eliminare (CodImpiego/uSERkEY)</param>
|
||||
/// <returns></returns>
|
||||
public static async Task<bool> tryDeactivation(Dictionary<string, string> ParamsList)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user