diff --git a/MP-SITE/WebUserControls/mod_logAllarmi.ascx b/MP-SITE/WebUserControls/mod_logAllarmi.ascx index adfab15f..86354076 100644 --- a/MP-SITE/WebUserControls/mod_logAllarmi.ascx +++ b/MP-SITE/WebUserControls/mod_logAllarmi.ascx @@ -15,7 +15,7 @@ - + @@ -24,7 +24,10 @@ Nessun record trovato - + + + + <%-- @@ -34,10 +37,28 @@ + + - - - <%----%> + + + + <%--
+ Invia +
+
+ Set +
--%> +
+ +
+
+
+ + + + + <%----%> <%----%>
diff --git a/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs index 4f7c9932..98cdb5ad 100644 --- a/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs +++ b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs @@ -1,8 +1,6 @@ using SteamWare; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; +using System.Text; using System.Web.UI; using System.Web.UI.WebControls; @@ -12,17 +10,17 @@ namespace MP_SITE.WebUserControls { #region Public Methods - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { - logger.lg.scriviLog("inizio caricamento dati FluxLog", tipoLog.INFO); + logger.lg.scriviLog("inizio caricamento dati Allarmi", tipoLog.INFO); } grView.PageSize = _numRighe; ods.DataBind(); if (memLayer.ML.CRI("_logLevel") > 5) { - logger.lg.scriviLog("fine caricamento dati FluxLog", tipoLog.INFO); + logger.lg.scriviLog("fine caricamento dati Allarmi", tipoLog.INFO); } if (!Page.IsPostBack) { @@ -39,11 +37,71 @@ namespace MP_SITE.WebUserControls #region Protected Methods + protected void lbkDoAck_Click(object sender, EventArgs e) + { + // recupero button + LinkButton lbtn = (LinkButton)sender; + if (lbtn != null) + { + var rawAlarmId = lbtn.CommandArgument; + int AlarmId = 0; + int.TryParse(rawAlarmId, out AlarmId); + if (AlarmId > 0) + { + // salvo ACK allarme + DataLayerObj.taAlarmLog.setAck(AlarmId, DateTime.Now, $"{DataLayerObj.MatrOpr} - {DataLayerObj.CognomeNomeOpr}"); + // ricarico + grView.DataBind(); + } + } + } + protected void lbtReset_Click(object sender, EventArgs e) { txtSearch.Text = ""; } + protected void lbtSendNotify_Click(object sender, EventArgs e) + { + // recupero button + LinkButton lbtn = (LinkButton)sender; + if (lbtn != null) + { + var rawAlarmId = lbtn.CommandArgument; + int AlarmId = 0; + int.TryParse(rawAlarmId, out AlarmId); + if (AlarmId > 0) + { + var alarmTab = DataLayerObj.taAlarmLog.getByKey(AlarmId); + if (alarmTab != null && alarmTab.Count > 0) + { + var alarmRow = alarmTab[0]; + // invio email... + string oggetto = $"Notifica allarme impianto {alarmRow.MachineId}"; + StringBuilder sb = new StringBuilder(); + sb.AppendLine("Attenzione: allarme presente per un periodo superiore alla soglia di controllo."); + sb.AppendLine(); + sb.AppendLine($"{alarmRow.ValDecoded}"); + sb.AppendLine(); + sb.AppendLine($"Info Area: {alarmRow.MemAddress}.{alarmRow.MemIndex} | Status {alarmRow.StatusVal}"); + sb.AppendLine(); + string corpo = sb.ToString().Replace($"{Environment.NewLine}", "
"); + + // FIXME TODO scegliere destinatario + bool fatto = DataLayerObj.sendEmail("samuele@steamware.net,giancarlo@teamware.net", oggetto, corpo); + if (fatto) + { + // salvo invio Notifica allarme + DataLayerObj.taAlarmLog.setNotify(AlarmId, DateTime.Now); + } + } + // ricarico + //doUpdate(); + grView.DataBind(); + } + } + } + protected void txtSearch_TextChanged(object sender, EventArgs e) { grView.DataBind(); diff --git a/MP-Site/WebUserControls/baseProdControl.cs b/MP-Site/WebUserControls/baseProdControl.cs index 0187fbc4..4bbbadb2 100644 --- a/MP-Site/WebUserControls/baseProdControl.cs +++ b/MP-Site/WebUserControls/baseProdControl.cs @@ -11,7 +11,7 @@ namespace MP_SITE.WebUserControls /// /// Oggetto datalayer specifico /// - private DataLayer DataLayerObj = new DataLayer(); + internal DataLayer DataLayerObj = new DataLayer(); #endregion Private Fields @@ -65,7 +65,7 @@ namespace MP_SITE.WebUserControls _resoconti = new resoconti(); if (!Page.IsPostBack) { - aggiornamento(); + doUpdate(); } } @@ -73,7 +73,7 @@ namespace MP_SITE.WebUserControls #region Public Methods - public virtual void aggiornamento() + public virtual void doUpdate() { } @@ -106,6 +106,27 @@ namespace MP_SITE.WebUserControls return user_std.UtSn.TraduciEn(lemma); } + /// + /// Conversione a bool del valore + /// + /// + /// + public bool getBool(object value) + { + bool answ = false; + string rawVal = $"{value}".ToUpper(); + // se è 1/0 --> len 1 + if (rawVal.Length == 1) + { + answ = rawVal == "1" || rawVal == "S" || rawVal == "Y"; + } + else + { + bool.TryParse($"{value}", out answ); + } + return answ; + } + #endregion Public Methods } } \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_logControlli.ascx.cs b/MP-Site/WebUserControls/mod_logControlli.ascx.cs index f6ef5a06..ead70792 100644 --- a/MP-Site/WebUserControls/mod_logControlli.ascx.cs +++ b/MP-Site/WebUserControls/mod_logControlli.ascx.cs @@ -26,7 +26,7 @@ namespace MP_SITE.WebUserControls #region Public Methods - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-Site/WebUserControls/mod_logEventi.ascx.cs b/MP-Site/WebUserControls/mod_logEventi.ascx.cs index d6edb39b..121bc52a 100644 --- a/MP-Site/WebUserControls/mod_logEventi.ascx.cs +++ b/MP-Site/WebUserControls/mod_logEventi.ascx.cs @@ -5,7 +5,7 @@ namespace MP_SITE.WebUserControls { public partial class mod_logEventi : baseProdControl { - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-Site/WebUserControls/mod_logFluxData.ascx.cs b/MP-Site/WebUserControls/mod_logFluxData.ascx.cs index a31c9c64..830683a5 100644 --- a/MP-Site/WebUserControls/mod_logFluxData.ascx.cs +++ b/MP-Site/WebUserControls/mod_logFluxData.ascx.cs @@ -8,7 +8,7 @@ namespace MP_SITE.WebUserControls { #region Public Methods - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-Site/WebUserControls/mod_logScarti.ascx.cs b/MP-Site/WebUserControls/mod_logScarti.ascx.cs index 84d5de96..d1af7c10 100644 --- a/MP-Site/WebUserControls/mod_logScarti.ascx.cs +++ b/MP-Site/WebUserControls/mod_logScarti.ascx.cs @@ -26,7 +26,7 @@ namespace MP_SITE.WebUserControls #region Public Methods - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-Site/WebUserControls/mod_logStati.ascx.cs b/MP-Site/WebUserControls/mod_logStati.ascx.cs index b4961ecb..7828cb7e 100644 --- a/MP-Site/WebUserControls/mod_logStati.ascx.cs +++ b/MP-Site/WebUserControls/mod_logStati.ascx.cs @@ -5,7 +5,7 @@ namespace MP_SITE.WebUserControls { public partial class mod_logStati : baseProdControl { - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-Site/WebUserControls/mod_logTC.ascx.cs b/MP-Site/WebUserControls/mod_logTC.ascx.cs index ea2d8dd1..62e997b4 100644 --- a/MP-Site/WebUserControls/mod_logTC.ascx.cs +++ b/MP-Site/WebUserControls/mod_logTC.ascx.cs @@ -27,7 +27,7 @@ namespace MP_SITE.WebUserControls #region Public Methods - public override void aggiornamento() + public override void doUpdate() { if (memLayer.ML.CRI("_logLevel") > 5) { diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs index a9dc7765..75bc7d9e 100644 --- a/MP-TAB/WebUserControls/BaseUserControl.cs +++ b/MP-TAB/WebUserControls/BaseUserControl.cs @@ -1,39 +1,12 @@ using MapoDb; -using Newtonsoft.Json; using SteamWare; using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Web; namespace MoonProTablet.WebUserControls { public class BaseUserControl : System.Web.UI.UserControl //SteamWare.UserControl // { - #region Protected Fields - - /// - /// indica conferma con rettifica (evento 121) - /// - protected bool confRett = memLayer.ML.CRB("confRett"); - - #endregion Protected Fields - - #region Internal Fields - - /// - /// classe MapoDB x uso locale - /// - internal MapoDb.MapoDb controllerMapo = new MapoDb.MapoDb(); - - /// - /// Oggetto datalayer specifico - /// - internal DataLayer DataLayerObj = new DataLayer(); - - #endregion Internal Fields - #region Public Fields /// @@ -61,6 +34,11 @@ namespace MoonProTablet.WebUserControls /// public bool enablePzProdLasciati = memLayer.ML.cdvb("enablePzProdLasciati"); + /// + /// Verifica chiave enableRiattrezzaggio in tab Config + /// + public bool enableRiattrezzaggio = memLayer.ML.cdvb("enableRiattrezzaggio"); + /// /// Abilitazione gestione Richieste - Promesse - ODL /// @@ -76,11 +54,6 @@ namespace MoonProTablet.WebUserControls /// public bool enableSchedaTecnica = memLayer.ML.cdvb("enableSchedaTecnica"); - /// - /// Verifica chiave enableRiattrezzaggio in tab Config - /// - public bool enableRiattrezzaggio = memLayer.ML.cdvb("enableRiattrezzaggio"); - /// /// Abilitazione gestione SplitODL /// @@ -107,70 +80,6 @@ namespace MoonProTablet.WebUserControls #endregion Public Events - #region Protected Properties - - /// - /// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina... - /// - protected string idxMaccParent - { - get - { - string answ = ""; - // se è multi controllo - if (isMulti) - { - // verifico se SIA una tavola (ha char "#") - int iSharp = idxMacchinaFix.IndexOf('#'); - if (iSharp > 0) - { - // sistemo nome - answ = idxMacchinaFix.Substring(0, iSharp); - } - } - return answ; - } - } - - #endregion Protected Properties - - #region Internal Properties - - /// - /// Verifica se la macchina MAIN sia MASTER - /// - internal bool isMaster - { - get - { - return DataLayerObj.isMaster(idxMacchina); - } - } - - /// - /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) - /// - internal bool isMulti - { - get - { - return DataLayerObj.isMulti(idxMacchina); - } - } - - /// - /// Verifica se la macchina MAIN sia SLAVE - /// - internal bool isSlave - { - get - { - return DataLayerObj.isSlave(idxMacchina); - } - } - - #endregion Internal Properties - #region Public Properties /// @@ -307,44 +216,6 @@ namespace MoonProTablet.WebUserControls #endregion Public Properties - #region Protected Methods - - /// - /// conversione da tempo minuti centesimali a minuti/secondi - /// - /// - /// - protected TimeSpan minCent2Sec(decimal valore) - { - TimeSpan answ = new TimeSpan(0, 0, 1); - try - { - answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); - } - catch - { } - return answ; - } - - /// - /// conversione da tempo minuti/secondi a minuti centesimali - /// - /// - /// - protected decimal minSec2Cent(TimeSpan valore) - { - Decimal answ = 0; - try - { - answ = Math.Round((valore.Minutes + (decimal)valore.Seconds / 60), 3); - } - catch - { } - return answ; - } - - #endregion Protected Methods - #region Public Methods public string encodeAuthKey(object plainUserAuthKey) @@ -364,6 +235,27 @@ namespace MoonProTablet.WebUserControls return utility.formatDurata(min); } + /// + /// Conversione a bool del valore + /// + /// + /// + public bool getBool(object value) + { + bool answ = false; + string rawVal = $"{value}".ToUpper(); + // se è 1/0 --> len 1 + if (rawVal.Length == 1) + { + answ = rawVal == "1" || rawVal == "S" || rawVal == "Y"; + } + else + { + bool.TryParse($"{value}", out answ); + } + return answ; + } + /// /// url completo immagine icona /// @@ -496,5 +388,130 @@ namespace MoonProTablet.WebUserControls } #endregion Public Methods + + #region Internal Fields + + /// + /// classe MapoDB x uso locale + /// + internal MapoDb.MapoDb controllerMapo = new MapoDb.MapoDb(); + + /// + /// Oggetto datalayer specifico + /// + internal DataLayer DataLayerObj = new DataLayer(); + + #endregion Internal Fields + + #region Internal Properties + + /// + /// Verifica se la macchina MAIN sia MASTER + /// + internal bool isMaster + { + get + { + return DataLayerObj.isMaster(idxMacchina); + } + } + + /// + /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...) + /// + internal bool isMulti + { + get + { + return DataLayerObj.isMulti(idxMacchina); + } + } + + /// + /// Verifica se la macchina MAIN sia SLAVE + /// + internal bool isSlave + { + get + { + return DataLayerObj.isSlave(idxMacchina); + } + } + + #endregion Internal Properties + + #region Protected Fields + + /// + /// indica conferma con rettifica (evento 121) + /// + protected bool confRett = memLayer.ML.CRB("confRett"); + + #endregion Protected Fields + + #region Protected Properties + + /// + /// Restituisce il codice IdxMacchina dell'impianto PARENT (se multi) altrimenti la stessa macchina... + /// + protected string idxMaccParent + { + get + { + string answ = ""; + // se è multi controllo + if (isMulti) + { + // verifico se SIA una tavola (ha char "#") + int iSharp = idxMacchinaFix.IndexOf('#'); + if (iSharp > 0) + { + // sistemo nome + answ = idxMacchinaFix.Substring(0, iSharp); + } + } + return answ; + } + } + + #endregion Protected Properties + + #region Protected Methods + + /// + /// conversione da tempo minuti centesimali a minuti/secondi + /// + /// + /// + protected TimeSpan minCent2Sec(decimal valore) + { + TimeSpan answ = new TimeSpan(0, 0, 1); + try + { + answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); + } + catch + { } + return answ; + } + + /// + /// conversione da tempo minuti/secondi a minuti centesimali + /// + /// + /// + protected decimal minSec2Cent(TimeSpan valore) + { + Decimal answ = 0; + try + { + answ = Math.Round((valore.Minutes + (decimal)valore.Seconds / 60), 3); + } + catch + { } + return answ; + } + + #endregion Protected Methods } } \ No newline at end of file diff --git a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx index 9b3fabc2..8b5caa19 100644 --- a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx +++ b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx @@ -10,39 +10,46 @@
-
+
Mem: .
- Val: - -
-
-
- <%-- - --%> -
-
-
- - -
-
- - -
-
- Set + +
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+ + + +
+
+
+
+ Invia +
+
+ Set +
+
- <%--
- Nota: - -
--%>
diff --git a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs index d40bf99f..6b6ca878 100644 --- a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs +++ b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs @@ -1,8 +1,6 @@ using SteamWare; using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; +using System.Text; using System.Web.UI; using System.Web.UI.WebControls; @@ -10,8 +8,87 @@ namespace MoonProTablet.WebUserControls { public partial class mod_elencoAllarmi : BaseUserControl { + #region Public Methods + + public void doUpdate() + { + grView.DataBind(); + } + + /// + /// Indica se ci sia registrato ACK utente + /// + /// + /// + public bool hasAck(object rawUser) + { + return !string.IsNullOrEmpty($"{rawUser}"); + } + + #endregion Public Methods + #region Protected Methods + protected void lbkDoAck_Click(object sender, EventArgs e) + { + // recupero button + LinkButton lbtn = (LinkButton)sender; + if (lbtn != null) + { + var rawAlarmId = lbtn.CommandArgument; + int AlarmId = 0; + int.TryParse(rawAlarmId, out AlarmId); + if (AlarmId > 0) + { + // salvo ACK allarme + DataLayerObj.taAlarmLog.setAck(AlarmId, DateTime.Now, $"{DataLayerObj.MatrOpr} - {DataLayerObj.CognomeNomeOpr}"); + // ricarico + doUpdate(); + } + } + } + + protected void lbtSendNotify_Click(object sender, EventArgs e) + { + // recupero button + LinkButton lbtn = (LinkButton)sender; + if (lbtn != null) + { + var rawAlarmId = lbtn.CommandArgument; + int AlarmId = 0; + int.TryParse(rawAlarmId, out AlarmId); + if (AlarmId > 0) + { + var alarmTab = DataLayerObj.taAlarmLog.getByKey(AlarmId); + if (alarmTab != null && alarmTab.Count > 0) + { + var alarmRow = alarmTab[0]; + // invio email... + string oggetto = $"Notifica allarme impianto {alarmRow.MachineId}"; + StringBuilder sb = new StringBuilder(); + sb.AppendLine("Attenzione: allarme presente per un periodo superiore alla soglia di controllo."); + sb.AppendLine(); + sb.AppendLine($"{alarmRow.ValDecoded}"); + sb.AppendLine(); + sb.AppendLine($"Info Area: {alarmRow.MemAddress}.{alarmRow.MemIndex} | Status {alarmRow.StatusVal}"); + sb.AppendLine(); + string corpo = sb.ToString().Replace($"{Environment.NewLine}", "
"); + + // FIXME TODO scegliere destinatario + bool fatto = DataLayerObj.sendEmail("samuele@steamware.net", oggetto, corpo); + if (fatto) + { + // salvo invio Notifica allarme + DataLayerObj.taAlarmLog.setNotify(AlarmId, DateTime.Now); + } + } + // ricarico + doUpdate(); + } + } + } + + protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -26,56 +103,5 @@ namespace MoonProTablet.WebUserControls } #endregion Protected Methods - - #region Public Methods - - public void doUpdate() - { - grView.DataBind(); - } - - /// - /// css dato status (0 = all OK, > 0 ALLARMI) - /// - /// - /// - public string cssByStatus(object rawStatus) - { - int status = 0; - int.TryParse($"{rawStatus}", out status); - return status > 0 ? "text-danger" : "text-success"; - } - - /// - /// Indica se ci sia registrato ACK utente - /// - /// - /// - public bool hasAck(object rawUser) - { - return !string.IsNullOrEmpty($"{rawUser}"); - } - - - #endregion Public Methods - - protected void lbkDoAck_Click(object sender, EventArgs e) - { - // recupero button - LinkButton lbtn = (LinkButton)sender; - if (lbtn != null) - { - var rawAlarmId = lbtn.CommandArgument; - int AlarmId = 0; - int.TryParse(rawAlarmId, out AlarmId); - if (AlarmId > 0) - { - // salvo ACK allarme - DataLayerObj.taAlarmLog.setAck(AlarmId, DateTime.Now, $"{DataLayerObj.MatrOpr} - {DataLayerObj.CognomeNomeOpr}"); - // ricarico - doUpdate(); - } - } - } } } \ No newline at end of file diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs index 4ec8d829..ea2d0bba 100644 --- a/MapoDb/DS_applicazione.Designer.cs +++ b/MapoDb/DS_applicazione.Designer.cs @@ -30688,68 +30688,74 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[8]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM v_AlarmLog"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_AL_getFilt"; + this._commandCollection[1].CommandText = "dbo.stp_AL_getByKey"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showMulti", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AlarmLogId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_AL_getFiltCount"; + this._commandCollection[2].CommandText = "dbo.stp_AL_getFilt"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showMulti", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_AL_getFiltPaged"; + this._commandCollection[3].CommandText = "dbo.stp_AL_getFiltCount"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showMulti", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_AL_insertQuery"; + this._commandCollection[4].CommandText = "dbo.stp_AL_getFiltPaged"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MachineId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MemAddress", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MemIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusVal", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValDecoded", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtFrom", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtTo", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@showMulti", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@maximumRows", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@startRowIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@searchVal", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[5].Connection = this.Connection; - this._commandCollection[5].CommandText = "dbo.stp_AL_setAck"; + this._commandCollection[5].CommandText = "dbo.stp_AL_insertQuery"; this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AlarmLogId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtAck", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserAck", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtRif", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MachineId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MemAddress", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MemIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@StatusVal", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ValDecoded", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; - this._commandCollection[6].CommandText = "dbo.stp_AL_setNotify"; + this._commandCollection[6].CommandText = "dbo.stp_AL_setAck"; this._commandCollection[6].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AlarmLogId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtNotify", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtAck", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserAck", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[7].Connection = this.Connection; + this._commandCollection[7].CommandText = "dbo.stp_AL_setNotify"; + this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AlarmLogId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DtNotify", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -30780,8 +30786,25 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_applicazione.AlarmLogDataTable getFilt(string IdxMacchina, global::System.Nullable dtFrom, global::System.Nullable dtTo, global::System.Nullable showMulti) { + public virtual DS_applicazione.AlarmLogDataTable getByKey(global::System.Nullable AlarmLogId) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((AlarmLogId.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[1].Value = ((int)(AlarmLogId.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + DS_applicazione.AlarmLogDataTable dataTable = new DS_applicazione.AlarmLogDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_applicazione.AlarmLogDataTable getFilt(string IdxMacchina, global::System.Nullable dtFrom, global::System.Nullable dtTo, global::System.Nullable showMulti) { + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -30816,7 +30839,7 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_applicazione.AlarmLogDataTable getFiltPaged(string IdxMacchina, global::System.Nullable dtFrom, global::System.Nullable dtTo, global::System.Nullable showMulti, global::System.Nullable maximumRows, global::System.Nullable startRowIndex, string searchVal) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((IdxMacchina == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -30868,7 +30891,7 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual object getFiltCount(string IdxMacchina, global::System.Nullable dtFrom, global::System.Nullable dtTo, global::System.Nullable showMulti, string searchVal) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; if ((IdxMacchina == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -30926,7 +30949,7 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(global::System.Nullable DtRif, string MachineId, string MemAddress, global::System.Nullable MemIndex, global::System.Nullable StatusVal, string ValDecoded) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((DtRif.HasValue == true)) { command.Parameters[1].Value = ((System.DateTime)(DtRif.Value)); } @@ -30984,7 +31007,7 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int setAck(global::System.Nullable AlarmLogId, global::System.Nullable DtAck, string UserAck) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((AlarmLogId.HasValue == true)) { command.Parameters[1].Value = ((int)(AlarmLogId.Value)); } @@ -31024,7 +31047,7 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int setNotify(global::System.Nullable AlarmLogId, global::System.Nullable DtNotify) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((AlarmLogId.HasValue == true)) { command.Parameters[1].Value = ((int)(AlarmLogId.Value)); } diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd index 66cb384c..b1ee7546 100644 --- a/MapoDb/DS_applicazione.xsd +++ b/MapoDb/DS_applicazione.xsd @@ -2893,6 +2893,17 @@ FROM v_AlarmLog + + + + dbo.stp_AL_getByKey + + + + + + + diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 7962b851..4366bec8 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -3597,13 +3597,38 @@ namespace MapoDb userUrl = string.Format("{2}jumper.aspx?UserAuthkey={0}&idxDipendente={1}", UserAuthKey, idxDipendente, baseUrl); userWebUrl = string.Format("{2}jumper.aspx?UserAuthkey={0}&idxDipendente={1}", UserAuthKey, idxDipendente, baseWebUrl); corpo = string.Format("Hai ricevuto questa email su richiesta tua o dell'Admin per poter procedere a registrare un (nuovo) devices con GPW:{0}
Per proseguire clicca sul link seguente(rete interna):
{0}{0}{1}{0}{0}

oppure sul link seguente (internet):
{0}{0}{2}{0}{0}

Team GPW Steamware", Environment.NewLine, userUrl, userWebUrl); - gestEmail.ge.mandaEmail(mittente, destinatario, oggetto, corpo); + gestEmail.geAuth.mandaEmail(mittente, destinatario, oggetto, corpo); fatto = true; } catch { } return fatto; } + + /// + /// Invia una mail al destinatario con oggetto e contenuto + /// + /// + /// + /// + /// + public bool sendEmail(string destinatario, string oggetto, string corpo) + { + bool fatto = false; + try + { + // compongo la stringa + string mittente = memLayer.ML.CRS("_fromEmail"); + gestEmail.geAuth.mandaEmail(mittente, destinatario, oggetto, corpo); + fatto = true; + } + catch(Exception exc) + { + logger.lg.scriviLog($"Eccezione in sendEmail{Environment.NewLine}{exc}", tipoLog.ERROR); + } + return fatto; + } + /// /// Invia email di avviso che ci sono dei TC da confermare ///