501 lines
21 KiB
C#
501 lines
21 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Web;
|
|
|
|
namespace Data
|
|
{
|
|
/// <summary>
|
|
/// Base class for action-enabled user controls
|
|
/// It is not meant to be be used directly.
|
|
/// </summary>
|
|
public class ActionUserControl : System.Web.UI.UserControl
|
|
{
|
|
protected int _idxRichiesta = 0;
|
|
/// <summary>
|
|
/// Richiesta di cui mostrare la history
|
|
/// </summary>
|
|
public int idxRichiesta
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(Request.QueryString["idxRichiesta"], out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// KEY amministratore in sessione
|
|
/// </summary>
|
|
protected int idxAmm
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.IntSessionObj("idxAmm");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// KEY fornitore in sessione
|
|
/// </summary>
|
|
protected int idxFornitore
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.IntSessionObj("idxFornitore");
|
|
}
|
|
}
|
|
/// <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);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Pagina corrente x redirect
|
|
/// </summary>
|
|
string currPage
|
|
{
|
|
get
|
|
{
|
|
return HttpContext.Current.Request.Url.PathAndQuery;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Record della richiesta corrente
|
|
/// </summary>
|
|
protected DS_app.ElencolRichRow ER_curr
|
|
{
|
|
get
|
|
{
|
|
DS_app.ElencolRichRow answ = null;
|
|
try
|
|
{
|
|
answ = DtProxy.man.taElRich.getByKey(idxRichiesta)[0];
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
}
|
|
/// <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>
|
|
/// <returns></returns>
|
|
protected DS_app.AnagFornitoriRow rigaFornitore(int idxFornitore)
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
DS_app.AnagFornitoriRow answ = null;
|
|
try
|
|
{
|
|
answ = DtProxy.man.taAF.getByKey(idxFornitore)[0];
|
|
}
|
|
catch
|
|
{ }
|
|
return answ;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Esegue l'azione richiesta e salva/invia email secondo parametri (DI SICURO a fornitore corrente, opz a amministratore e B2BC)
|
|
/// </summary>
|
|
/// <param name="idxRich">idx richiesta SPECIFICO</param>
|
|
/// <param name="oggetto"></param>
|
|
/// <param name="bodyTpl"></param>
|
|
/// <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 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);
|
|
logger.lg.scriviLog(string.Format("Effettuata azione con idxRich: {0} | oggetto: {1} | bodyTpl: {2} | codAzione: {3} | idxStato: {4} | doRedirect: {5} | notifyAmm: {6} | notifyB2BC: {7}", idxRich, oggetto, bodyTpl, codAzione, idxStato, doRedirect, notifyAmm, notifyB2BC));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Esegue l'azione richiesta e salva/invia email secondo parametri (DI SICURO a fornitore corrente, opz a amministratore e B2BC)
|
|
/// </summary>
|
|
/// <param name="oggetto"></param>
|
|
/// <param name="bodyTpl"></param>
|
|
/// <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 eseguiAzione(string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC)
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
saveDataSendEMail(oggetto, bodyTpl, codAzione, idxStato, doRedirect, notifyAmm, notifyB2BC, riga);
|
|
}
|
|
|
|
private void saveDataSendEMail(string oggetto, string bodyTpl, string codAzione, int idxStato, bool doRedirect, bool notifyAmm, bool notifyB2BC, DS_app.ElencolRichRow riga)
|
|
{
|
|
// compongo elementi email...
|
|
string destinatario = "";
|
|
try
|
|
{
|
|
destinatario = DtProxy.man.taAF.getByKey(riga.idxFornitore)[0].email;
|
|
}
|
|
catch
|
|
{
|
|
destinatario = memLayer.ML.CRS("_adminEmail");
|
|
}
|
|
// compone corpo messaggio
|
|
string corpo = string.Format(bodyTpl, riga.nom_cond, riga.genContatto, riga.telContatto, riga.messaggio);
|
|
// salvo azione
|
|
DtProxy.man.taER_Acts.InsertQuery(riga.idxRichiesta, riga.idxFornitore, DateTime.Now, codAzione, devicesAuthProxy.stObj.utente, corpo);
|
|
// invio!
|
|
utils.inviaEmail(destinatario, oggetto, corpo, 3); //!!!HARD CODED a 3 tutto
|
|
|
|
// verifico se inviare ANCHE a AMMINISTRATORE e sito B2BC
|
|
string notaPre = "";
|
|
if (notifyAmm)
|
|
{
|
|
try
|
|
{
|
|
var rigaCond = DtProxy.man.taAC.getByKey(riga.idxRichiesta)[0];
|
|
var rigaAmm = DtProxy.man.taAAmm.getByKey(rigaCond.idxAmm)[0];
|
|
destinatario = rigaAmm.email;
|
|
corpo = corpo.Replace("/PAZ/", "/PAM/");
|
|
}
|
|
catch
|
|
{
|
|
destinatario = memLayer.ML.CRS("_adminEmail");
|
|
}
|
|
// invio! aggiungendo in oggetto "COPIA per B2BC"
|
|
notaPre = "<b>Copia email per AMMINISTRATORE</b><br/><br/>";
|
|
// invio!
|
|
utils.inviaEmail(destinatario, oggetto, notaPre + corpo, 3); //!!!HARD CODED a 3 tutto
|
|
}
|
|
if (notifyB2BC)
|
|
{
|
|
destinatario = memLayer.ML.CRS("_b2bcEmail");
|
|
corpo = corpo.Replace("/PAZ/", "/PAM/");
|
|
// invio! aggiungendo in oggetto "COPIA per B2BC"
|
|
notaPre = "<b>Copia email per B2BC</b><br/><br/>";
|
|
utils.inviaEmail(destinatario, oggetto, notaPre + corpo, 3); //!!!HARD CODED a 3 tutto
|
|
}
|
|
// cambio stato (se > -9999)
|
|
if (idxStato > -9999)
|
|
{
|
|
DtProxy.man.taElRich.UpdateStato(riga.idxRichiesta, idxStato);
|
|
}
|
|
// se richiesto redireziona...
|
|
if (doRedirect)
|
|
{
|
|
Response.Redirect(currPage);
|
|
}
|
|
}
|
|
|
|
#region azioni dirette
|
|
|
|
/// <summary>
|
|
/// Gestione azione RICHIESTA PREVENTIVO
|
|
/// </summary>
|
|
public void doQuoteReq()
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
string oggetto = "RICHIESTA PREVENTIVO intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>Richiesta PREVENTIVO</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"Ti è stata assegnata una richiesta di intervento da www.b2bcondomini.it per la quale è stato deciso di procedere con preventivo e relativa approvazione. Ti cheidiamo di predisporlo ed inviarlo sulla piattaforma al più presto.<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 codAzione = "QuoteReq";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, 23, true, false, false);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Gestione azione INVIO SOLLECITO
|
|
/// </summary>
|
|
public void doSendRem()
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
string oggetto = "SOLLECITO intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>SOLLECITO risposta</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"Ti è stata assegnata una richiesta di intervento da www.b2bcondomini.it e non hai ancora risposto entro i termini del servizio. Ti ricordiamo che se non lo farai al più presto la richiesta potrebbe venire riassegnata ad un altro fornitore.<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 codAzione = "SendRem";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, 20, true, false, false);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Gestione azione CAMBIO PRIORITA
|
|
/// </summary>
|
|
/// <param name="idxPrior"></param>
|
|
/// <param name="dataScad"></param>
|
|
/// <param name="oraScad"></param>
|
|
public void doPrioMod(int idxPrior, string dataScad, string oraScad)
|
|
{ // recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
DateTime dataScadNew = DateTime.Now.Date;
|
|
TimeSpan oraScadNew = DateTime.Now.TimeOfDay;
|
|
string descrPriorita = "";
|
|
try
|
|
{
|
|
// sommo data-ora...
|
|
DateTime.TryParse(dataScad, out dataScadNew);
|
|
TimeSpan.TryParse(oraScad, out oraScadNew);
|
|
dataScadNew = dataScadNew.Add(oraScadNew);
|
|
// recupero priorità ad adesso...
|
|
var rigaPrio = DtProxy.man.taAP.getByKey(idxPrior)[0];
|
|
descrPriorita = rigaPrio.descrPriorita;
|
|
// salvo nuova data scadenza...
|
|
DtProxy.man.taElRich.UpdatePrior(idxRichiesta, idxPrior, dataScadNew);
|
|
}
|
|
catch
|
|
{ }
|
|
string oggetto = "CAMBIO PRIORITA' e SCADENZA intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>CAMBIO PRIORITA' e SCADENZA</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"Ti è stata assegnata una richiesta di intervento da www.b2bcondomini.it di cui è stata variata la priorità che ora è <b>" + descrPriorita + "</b> e la scadenza, ora impostata a <b>" + dataScadNew.ToString("ddd dd.MM.yyyy HH:mm") + "</b>.<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 codAzione = "PrioMod";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, -9999, true, false, false);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Gestione Azione ANNULLAMENTO e RIASSEGNAZIONE FORNITORE
|
|
/// </summary>
|
|
/// <param name="idxArea"></param>
|
|
/// <param name="idxForn"></param>
|
|
public void doRemSetSupp(int idxArea, int idxForn)
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
// STEP 1: scrivo al VECCHIO per notificare FINE ASSEGNAZIONE
|
|
string oggetto = "ANNULLAMENTO RICHIESTA intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>ANNULLAMENTO RICHIESTA di intervento</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"E' stata annullata l'assegnazione alla tua azienda di una richiesta di intervento da www.b2bcondomini.it.<br/>" +
|
|
"Il condominio interessato era <b>{0}</b>.<br/>" +
|
|
"La richiesta indicata era 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 codAzione = "RemSupp";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, -9999, false, true, true);
|
|
|
|
rigaForn = rigaFornitore(idxForn);
|
|
// STEP 2: scrivo al NUOVO fornitore... salvo nuova data scadenza...
|
|
DtProxy.man.taElRich.UpdateForn(idxRichiesta, idxArea, idxForn);
|
|
oggetto = "NUOVA RICHIESTA intervento n. " + idxRichiesta.ToString();
|
|
bodyTpl =
|
|
"<b>ASSEGNAZIONE INTERVENTO</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"Ti è stata assegnata una nuova richiesta di intervento da www.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.";
|
|
codAzione = "SetSupp";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, -9999, true, true, true);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Gestione azione MODIFICA MESSAGGIO
|
|
/// </summary>
|
|
public void doUpdateMess(string messaggio)
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
string oggetto = "AGGIORNAMENTO MESSAGGIO intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>AGGIORNAMENTO MESSAGGIO</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"Il testo della richiesta di intervento è stato modificato, ora è:<br/>" +
|
|
"<i>" + messaggio + "</i><br/><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 codAzione = "MessMod";
|
|
DtProxy.man.taElRich.UpdateText(idxRichiesta, messaggio, riga.note);
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, -9999, true, false, false);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Gestione azione AGGIUNTA NOTE
|
|
/// </summary>
|
|
/// <param name="codAzione"></param>
|
|
/// <param name="note"></param>
|
|
public void doAddNote(string codAzione, string note)
|
|
{
|
|
// recupero dati della richiesta corrente
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
string oggetto = "AGGIORNAMENTO NOTE intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>AGGIORNAMENTO NOTE</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/>" +
|
|
"E' stata aggiunta la seguente nota per l'intervento in oggetto:<br/>" +
|
|
"<i>" + note + "</i><br/><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.";
|
|
DtProxy.man.taElRich.UpdateText(idxRichiesta, riga.messaggio, riga.note + "<hr/>" + note);
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, -9999, true, false, false);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Registra TASK da parte dell'amministratore
|
|
/// </summary>
|
|
/// <param name="codAzione"></param>
|
|
/// <param name="idxStato">stato di destinazione richiesto</param>
|
|
/// <param name="idxRich">idxRichiesta</param>
|
|
public void doCreateNewRich(string codAzione, int idxStato, int idxRich)
|
|
{
|
|
// recupero dati della richiesta SPECIFICATA
|
|
var riga = ER_spec(idxRich);
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
// STEP 1: recupero descrizioni azione e stato...
|
|
string azione = DtProxy.man.taAAct.getByKey(codAzione)[0].descrAzione;
|
|
string stato = DtProxy.man.taAS.getByKey(idxStato)[0].descrizione;
|
|
string oggetto = "NUOVA RICHIESTA intervento n." + idxRich.ToString() + " da www.b2bcondomini.it";
|
|
string bodyTpl =
|
|
"<b>NUOVA RICHIESTA INTERVENTO</b><br><br>" +
|
|
"Buongiorno<br/>" +
|
|
"Ti è stata assegnata una nuova richiesta di intervento da www.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=" + idxRich + "\"> link seguente</a> per maggiori informazioni.";
|
|
eseguiAzioneIdxRich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Registra ANNULLAMENTO da parte dell'amministratore
|
|
/// </summary>
|
|
/// <param name="codAzione"></param>
|
|
/// <param name="idxStato">stato di destinazione richiesto</param>
|
|
/// <param name="idxRich">idxRichiesta</param>
|
|
public void doNullRich(string codAzione, int idxStato, int idxRich)
|
|
{
|
|
// recupero dati della richiesta SPECIFICATA
|
|
var riga = ER_spec(idxRich);
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
// STEP 1: recupero descrizioni azione e stato...
|
|
string azione = DtProxy.man.taAAct.getByKey(codAzione)[0].descrAzione;
|
|
string stato = DtProxy.man.taAS.getByKey(idxStato)[0].descrizione;
|
|
string oggetto = "ANNULLAMENTO RICHIESTA n. " + idxRich.ToString() + " da www.b2bcondomini.it";
|
|
string bodyTpl =
|
|
"<b>ANNULLAMENTO RICHIESTA INTERVENTO</b><br><br>" +
|
|
"Buongiorno<br/>" +
|
|
"La richiesta di intervento da www.b2bcondomini.it è stata annullata.<br/><br/>" +
|
|
"Seguire il <a href=\"http://www.b2bcondomini.it/PAZ/DettaglioIntervento?idxRichiesta=" + idxRich + "\"> link seguente</a> per maggiori informazioni.";
|
|
eseguiAzioneIdxRich(idxRich, oggetto, bodyTpl, codAzione, idxStato, true, true, true);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Registra TASK da parte del fornitore
|
|
/// </summary>
|
|
/// <param name="codAzione"></param>
|
|
/// <param name="idxStato">stato di destinazione richiesto</param>
|
|
public void doFornTask(string codAzione, int idxStato)
|
|
{
|
|
var riga = ER_curr;
|
|
if (riga != null)
|
|
{
|
|
// recupero fornitore...
|
|
var rigaForn = rigaFornitore(riga.idxFornitore);
|
|
if (rigaForn != null)
|
|
{
|
|
// STEP 1: recupero descrizioni azione e stato...
|
|
string azione = DtProxy.man.taAAct.getByKey(codAzione)[0].descrAzione;
|
|
string stato = DtProxy.man.taAS.getByKey(idxStato)[0].descrizione;
|
|
string oggetto = "AGGIORNAMENTO intervento n. " + idxRichiesta.ToString();
|
|
string bodyTpl =
|
|
"<b>AGGIORNAMENTO intervento</b><br/><br/>" +
|
|
"Buongiorno <b>" + rigaForn.nome + "</b><br/><br/>" +
|
|
"La presente per registrare l'azione di <b>" + azione + "</b>.<br/>" +
|
|
"Lo stato attuale dell'intervento ora è quindi <b>" + stato + "</b>.<br/>" +
|
|
"Il condominio interessato è <b>{0}</b>, referente <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.";
|
|
eseguiAzione(oggetto, bodyTpl, codAzione, idxStato, true, true, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|