pulizia e fix x gestione invio email alla creazione della richeista
This commit is contained in:
@@ -85,6 +85,22 @@ namespace Data
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Record della richiesta SPECIFICATA
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
protected DS_app.ElencolRichRow ER_spec(int idxRich)
|
||||
{
|
||||
DS_app.ElencolRichRow answ = null;
|
||||
try
|
||||
{
|
||||
answ = DtProxy.man.taElRich.getByKey(idxRich)[0];
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce il record dati del fornitore richiesto
|
||||
/// </summary>
|
||||
/// <param name="idxFornitore"></param>
|
||||
@@ -112,7 +128,7 @@ namespace Data
|
||||
/// <param name="codAzione"></param>
|
||||
/// <param name="idxStato">Nuovo stato da assegnare alla richiesta (se -9999 = NON FA NULLA)</param>
|
||||
/// <param name="doRedirect">Necessario fare redirect/reload pagina?</param>
|
||||
public void eseguiAzioneIdxich(int idxRich, string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC)
|
||||
public void eseguiAzioneIdxRich(int idxRich, string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC)
|
||||
{
|
||||
var riga = DtProxy.man.taElRich.getByKey(idxRich)[0];
|
||||
saveDataSendEMail(oggetto, bodyTpl, codAzione, idxStato, doRedirect, notifyAmm, notifyB2BC, riga);
|
||||
@@ -428,7 +444,8 @@ namespace Data
|
||||
/// <param name="idxRich">idxRichiesta</param>
|
||||
public void doAmmTask(string codAzione, int idxStato, int idxRich)
|
||||
{
|
||||
var riga = ER_curr;
|
||||
// recupero dati della richiesta SPECIFICATA
|
||||
var riga = ER_spec(idxRich);
|
||||
if (riga != null)
|
||||
{
|
||||
// recupero fornitore...
|
||||
@@ -446,7 +463,7 @@ namespace Data
|
||||
"Il condominio interessato è <b>{0}</b>, pregasi contattare <b>{1}</b> al numero <b>{2}</b>.<br/>" +
|
||||
"La richiesta indicata è la seguente:<br/>{3}<br/><br/>" +
|
||||
"Seguire il <a href=\"http://www.b2bcondomini.it/PAZ/DettaglioIntervento?idxRichiesta=" + idxRich + "\"> link seguente</a> per maggiori informazioni.";
|
||||
eseguiAzioneIdxich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
|
||||
eseguiAzioneIdxRich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -17,7 +17,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=177']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=181']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '1.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '1.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'SOSCONDOMINI'
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_all.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_all" %>
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_ER_all.ascx.cs" Inherits="PUB.WebUserContols.mod_ER_all" %>
|
||||
|
||||
<%@ Register Src="~/WebUserContols/mod_ER_grid.ascx" TagPrefix="uc1" TagName="mod_ER_grid" %>
|
||||
<%@ Register Src="~/WebUserContols/mod_ER_insNew.ascx" TagPrefix="uc1" TagName="mod_ER_insNew" %>
|
||||
<%@ Register Src="~/WebUserContols/mod_ER_selCondominio.ascx" TagPrefix="uc1" TagName="mod_ER_selCondominio" %>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header alert alert-dark text-uppercase align-middle px-2 py-0 my-0">
|
||||
<h6>Elenco completo richieste</h6>
|
||||
<uc1:mod_ER_selCondominio runat="server" id="mod_ER_selCondominio" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<uc1:mod_ER_selCondominio runat="server" ID="mod_ER_selCondominio" />
|
||||
</div>
|
||||
<div class="col-12 text-right" runat="server" id="divAddNew">
|
||||
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-danger btn-sm btn-block" Visible="true" OnClick="lbtAddNew_Click">Apri nuova »</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="0" StatoMax="90" pageSize="5" />
|
||||
<div runat="server" id="divInsNew" visible="false">
|
||||
<uc1:mod_ER_insNew runat="server" ID="mod_ER_insNew" />
|
||||
</div>
|
||||
<div id="divElenco" runat="server">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="0" StatoMax="90" pageSize="5" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Data;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace PUB.WebUserContols
|
||||
@@ -16,6 +18,20 @@ namespace PUB.WebUserContols
|
||||
mod_ER_selCondominio.eh_selected += Mod_ER_selCondominio_eh_selected;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// modalità edit corrente
|
||||
/// </summary>
|
||||
public ER_EditMode currMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (ER_EditMode)memLayer.ML.objSessionObj("ER_EditMode");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("ER_EditMode", value);
|
||||
}
|
||||
}
|
||||
private void Mod_ER_selCondominio_eh_selected(object sender, EventArgs e)
|
||||
{
|
||||
saveSelections();
|
||||
@@ -37,7 +53,38 @@ namespace PUB.WebUserContols
|
||||
|
||||
private void saveSelections()
|
||||
{
|
||||
divAddNew.Visible = (mod_ER_selCondominio.condSelected != "0" && currMode == ER_EditMode.mAmministratore);
|
||||
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
|
||||
mod_ER_insNew.idxCond = mod_ER_selCondominio.condSelected;
|
||||
}
|
||||
protected void lbtAddNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// ABILITO SOLO in modalità amministratore...
|
||||
if (currMode == ER_EditMode.mAmministratore)
|
||||
{
|
||||
toggleAddNew();
|
||||
}
|
||||
}
|
||||
|
||||
private void toggleAddNew()
|
||||
{
|
||||
if (divInsNew.Visible)
|
||||
{
|
||||
lbtAddNew.Text = "Apri nuova »";
|
||||
}
|
||||
else
|
||||
{
|
||||
lbtAddNew.Text = "⇄ CHIUDI";
|
||||
}
|
||||
divInsNew.Visible = !divInsNew.Visible;
|
||||
divElenco.Visible = !divInsNew.Visible;
|
||||
if (divInsNew.Visible)
|
||||
{
|
||||
// aggiorno
|
||||
mod_ER_insNew.doUpdate();
|
||||
saveSelections();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+45
@@ -21,6 +21,51 @@ namespace PUB.WebUserContols {
|
||||
/// </remarks>
|
||||
protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divAddNew.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtAddNew.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtAddNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divInsNew.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divInsNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_ER_insNew.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::PUB.WebUserContols.mod_ER_insNew mod_ER_insNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divElenco.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divElenco;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo mod_ER_grid.
|
||||
/// </summary>
|
||||
|
||||
@@ -9,6 +9,5 @@
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="60" StatoMax="60" />
|
||||
<%--<a href="#" class="btn btn-success">Gestione Interventi</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="30" StatoMax="40" />
|
||||
<%--<a href="#" class="btn btn-success">Gestione Interventi</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,35 +104,23 @@ namespace PUB.WebUserContols
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// sposto in azione...
|
||||
#if false
|
||||
// invio email notifica al fornitore...
|
||||
string destinatario = "";
|
||||
try
|
||||
{
|
||||
destinatario = DtProxy.man.taAF.getByKey(idxForn)[0].indirizzo_email;
|
||||
}
|
||||
catch
|
||||
{
|
||||
destinatario = memLayer.ML.CRS("_adminEmail");
|
||||
}
|
||||
string oggetto = "Nuova richiesta intervento da b2bcondomini.it";
|
||||
string bodyTpl =
|
||||
"<b>ASSEGNAZIONE INTERVENTO</b><br><br>" +
|
||||
"Buongiorno<br/>" +
|
||||
"Ti è stata assegnata una nuova richiesta di intervento da b2bcondomini.it.<br/>" +
|
||||
"Il condominio interessato è <b>{0}</b>, pregasi contattare <b>{1}</b> al numero <b>{2}</b>.<br/>" +
|
||||
"La richiesta indicata è la seguente:<br/>{3}<br/><br/>" +
|
||||
"Seguire il <a href=\"http://www.b2bcondomini.it/PAZ/DettaglioIntervento?idxRichiesta=" + idxRichiesta + "\"> link seguente</a> per maggiori informazioni.";
|
||||
string corpo = string.Format(bodyTpl, idxCond, txtContatto.Text, txtTelefono.Text, txtMessaggio.Text);
|
||||
// invio!
|
||||
utils.inviaEmail(destinatario, oggetto, corpo, 3); //!!!HARD CODED a 3 tutto
|
||||
#endif
|
||||
// registro evento...
|
||||
doAmmTask("Create", 10, idxRichiesta);
|
||||
#if false
|
||||
Response.Redirect(devicesAuthProxy.pagCorrente);
|
||||
Response.Redirect(currPage);
|
||||
#endif
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Pagina corrente x redirect
|
||||
/// </summary>
|
||||
string currPage
|
||||
{
|
||||
get
|
||||
{
|
||||
return HttpContext.Current.Request.Url.PathAndQuery;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,5 @@
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="21" StatoMax="29" />
|
||||
<%--<a href="#" class="btn btn-success">Gestione Interventi</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
<div class="card">
|
||||
<div class="card-header alert alert-danger text-uppercase align-middle px-2 py-0 my-0">
|
||||
<h6>Richieste</h6>
|
||||
<uc1:mod_ER_selCondominio runat="server" ID="mod_ER_selCondominio" />
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<uc1:mod_ER_selCondominio runat="server" ID="mod_ER_selCondominio" />
|
||||
</div>
|
||||
<div class="col-12 text-right" runat="server" id="divAddNew">
|
||||
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-danger btn-sm btn-block" Visible="true" OnClick="lbtAddNew_Click">Apri nuova »</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 text-right">
|
||||
<asp:LinkButton runat="server" ID="lbtAddNew" CssClass="btn btn-danger btn-sm btn-block" Visible="true" OnClick="lbtAddNew_Click">Apri nuova »</asp:LinkButton>
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<div runat="server" id="divInsNew" visible="false">
|
||||
<uc1:mod_ER_insNew runat="server" ID="mod_ER_insNew" />
|
||||
</div>
|
||||
<div id="divElenco" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="1" StatoMax="29" />
|
||||
</div>
|
||||
</div>
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="1" StatoMax="29" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace PUB.WebUserContols
|
||||
|
||||
private void saveSelections()
|
||||
{
|
||||
lbtAddNew.Visible = (mod_ER_selCondominio.condSelected != "0");
|
||||
divAddNew.Visible = (mod_ER_selCondominio.condSelected != "0" && currMode == ER_EditMode.mAmministratore);
|
||||
mod_ER_grid.idxCond = mod_ER_selCondominio.condSelected;
|
||||
mod_ER_insNew.idxCond = mod_ER_selCondominio.condSelected;
|
||||
}
|
||||
@@ -87,14 +87,5 @@ namespace PUB.WebUserContols
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtResetCond_Click(object sender, EventArgs e)
|
||||
{
|
||||
lbtAddNew.Text = "Apri nuova »";
|
||||
lbtAddNew.Visible = false;
|
||||
divInsNew.Visible = false;
|
||||
divElenco.Visible = true;
|
||||
mod_ER_selCondominio.condSelected = "0";
|
||||
saveSelections();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,15 @@ namespace PUB.WebUserContols {
|
||||
/// </remarks>
|
||||
protected global::PUB.WebUserContols.mod_ER_selCondominio mod_ER_selCondominio;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo divAddNew.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAddNew;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtAddNew.
|
||||
/// </summary>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="50" StatoMax="50" />
|
||||
<%--<a href="#" class="btn btn-success">Gestione Interventi</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,6 +9,5 @@
|
||||
</div>
|
||||
<div class="card-body p-0 m-0">
|
||||
<uc1:mod_ER_grid runat="server" ID="mod_ER_grid" StatoMin="61" StatoMax="80" />
|
||||
<%--<a href="#" class="btn btn-success">Gestione Interventi</a>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user