diff --git a/MP-SITE/MappaStato.aspx.designer.cs b/MP-SITE/MappaStato.aspx.designer.cs
index e82e159d..8a5b58ef 100644
--- a/MP-SITE/MappaStato.aspx.designer.cs
+++ b/MP-SITE/MappaStato.aspx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-//
-// Codice generato da uno strumento.
+//
+// This code was generated by a tool.
//
-// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
-// il codice viene rigenerato.
-//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
//------------------------------------------------------------------------------
namespace MP_SITE
@@ -15,20 +15,20 @@ namespace MP_SITE
{
///
- /// Controllo repRows.
+ /// repRows control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.Repeater repRows;
///
- /// Controllo odsRows.
+ /// odsRows control.
///
///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.WebControls.ObjectDataSource odsRows;
}
diff --git a/MP-SITE/WebUserControls/mod_logAllarmi.ascx b/MP-SITE/WebUserControls/mod_logAllarmi.ascx
new file mode 100644
index 00000000..adfab15f
--- /dev/null
+++ b/MP-SITE/WebUserControls/mod_logAllarmi.ascx
@@ -0,0 +1,54 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_logAllarmi.ascx.cs" Inherits="MP_SITE.WebUserControls.mod_logAllarmi" %>
+
+
+
+
+
+
+
+
+
+
+ Nessun record trovato
+
+
+
+
+ <%--
+
+ --%>
+
+ .
+
+
+
+
+
+
+ <%----%>
+ <%----%>
+ <%----%>
+
+
+<%--EnableCaching="true" CacheDuration="60"--%>
+
+
+
+
+
+
+
+
+
diff --git a/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs
new file mode 100644
index 00000000..4f7c9932
--- /dev/null
+++ b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.cs
@@ -0,0 +1,73 @@
+using SteamWare;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace MP_SITE.WebUserControls
+{
+ public partial class mod_logAllarmi : baseProdControl
+ {
+ #region Public Methods
+
+ public override void aggiornamento()
+ {
+ if (memLayer.ML.CRI("_logLevel") > 5)
+ {
+ logger.lg.scriviLog("inizio caricamento dati FluxLog", tipoLog.INFO);
+ }
+ grView.PageSize = _numRighe;
+ ods.DataBind();
+ if (memLayer.ML.CRI("_logLevel") > 5)
+ {
+ logger.lg.scriviLog("fine caricamento dati FluxLog", tipoLog.INFO);
+ }
+ if (!Page.IsPostBack)
+ {
+ fixMacchina();
+ }
+ }
+
+ public void reportUpdt(object sender, EventArgs e)
+ {
+ reportUpdate();
+ }
+
+ #endregion Public Methods
+
+ #region Protected Methods
+
+ protected void lbtReset_Click(object sender, EventArgs e)
+ {
+ txtSearch.Text = "";
+ }
+
+ protected void txtSearch_TextChanged(object sender, EventArgs e)
+ {
+ grView.DataBind();
+ }
+
+ #endregion Protected Methods
+
+ #region Private Methods
+
+ private void fixMacchina()
+ {
+ string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
+ int idx = 0;
+ if (isMulti(IdxMacc))
+ {
+ idx = IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase);
+ if (idx > 0)
+ {
+ IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase));
+ }
+ }
+ memLayer.ML.setSessionVal("IdxMacchinaAlarmLog", IdxMacc);
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/MP-SITE/WebUserControls/mod_logAllarmi.ascx.designer.cs b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.designer.cs
new file mode 100644
index 00000000..b1a3c565
--- /dev/null
+++ b/MP-SITE/WebUserControls/mod_logAllarmi.ascx.designer.cs
@@ -0,0 +1,53 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace MP_SITE.WebUserControls
+{
+
+
+ public partial class mod_logAllarmi
+ {
+
+ ///
+ /// txtSearch control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSearch;
+
+ ///
+ /// lbtReset control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton lbtReset;
+
+ ///
+ /// grView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grView;
+
+ ///
+ /// ods control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource ods;
+ }
+}
diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj
index c4cd76aa..be206936 100644
--- a/MP-Site/MP-Site.csproj
+++ b/MP-Site/MP-Site.csproj
@@ -475,6 +475,7 @@
+
@@ -817,6 +818,13 @@
mod_listaStatiEventi.ascx
+
+ mod_logAllarmi.ascx
+ ASPXCodeBehind
+
+
+ mod_logAllarmi.ascx
+
mod_logControlli.ascx
ASPXCodeBehind
diff --git a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx
index e9ee2bca..e485e57c 100644
--- a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx
+++ b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx
@@ -9,13 +9,14 @@
<%@ Register Src="~/WebUserControls/mod_logControlli.ascx" TagPrefix="uc1" TagName="mod_logControlli" %>
<%@ Register Src="~/WebUserControls/mod_logFluxData.ascx" TagPrefix="uc1" TagName="mod_logFluxData" %>
<%@ Register Src="~/WebUserControls/mod_logTC.ascx" TagPrefix="uc1" TagName="mod_logTC" %>
+<%@ Register Src="~/WebUserControls/mod_logAllarmi.ascx" TagPrefix="uc1" TagName="mod_logAllarmi" %>
+
<%: traduci("Produzione") %>
-
@@ -24,88 +25,74 @@
<%: traduci("DatiConfermati") %>
-
-
-
<%: traduci("LogTempiCiclo") %>
-
-
-
-
<%: traduci("LogStati") %>
-
-
-
<%: traduci("LogEventi") %>
-
-
-
<%: traduci("LogControlli") %>
-
-
-
-
<%: traduci("LogScarti") %>
-
-
-
-
<%: traduci("LogFluxData") %>
-
-
-
+
+
+ <%: traduci("LogAlarms") %>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs
index 8c60ca9a..ad8ce0ec 100644
--- a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs
+++ b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs
@@ -6,13 +6,6 @@ namespace MP_SITE.WebUserControls
{
public partial class mod_listaStatiEventi : baseUserControl
{
- #region Protected Fields
-
- protected int _numRighe = 17;
- protected resoconti _resoconti;
-
- #endregion Protected Fields
-
#region Public Events
public event EventHandler eh_doUpdate;
@@ -58,44 +51,6 @@ namespace MP_SITE.WebUserControls
#endregion Public Properties
- #region Private Methods
-
- private void Mod_logStati_eh_doUpdate(object sender, EventArgs e)
- {
- reportUpdate();
- }
-
- #endregion Private Methods
-
- #region Protected Methods
-
- protected override void Page_Load(object sender, EventArgs e)
- {
- _resoconti = new resoconti();
- if (!Page.IsPostBack)
- {
- aggiornamento();
- }
- mod_logStati.eh_doUpdate += Mod_logStati_eh_doUpdate;
- }
-
- protected void reportUpdate()
- {
- // alzo l'evento d update/inserimento e ricarico cache...
- if (eh_doUpdate != null)
- {
- eh_doUpdate(this, new EventArgs());
- }
- }
-
- protected void txtRighe_TextChanged(object sender, EventArgs e)
- {
- //numRighe = Convert.ToInt32(txtRighe.Text);
- aggiornamento();
- }
-
- #endregion Protected Methods
-
#region Public Methods
public void aggiornamento()
@@ -162,5 +117,50 @@ namespace MP_SITE.WebUserControls
}
#endregion Public Methods
+
+ #region Protected Fields
+
+ protected int _numRighe = 17;
+ protected resoconti _resoconti;
+
+ #endregion Protected Fields
+
+ #region Protected Methods
+
+ protected override void Page_Load(object sender, EventArgs e)
+ {
+ _resoconti = new resoconti();
+ if (!Page.IsPostBack)
+ {
+ aggiornamento();
+ }
+ mod_logStati.eh_doUpdate += Mod_logStati_eh_doUpdate;
+ }
+
+ protected void reportUpdate()
+ {
+ // alzo l'evento d update/inserimento e ricarico cache...
+ if (eh_doUpdate != null)
+ {
+ eh_doUpdate(this, new EventArgs());
+ }
+ }
+
+ protected void txtRighe_TextChanged(object sender, EventArgs e)
+ {
+ //numRighe = Convert.ToInt32(txtRighe.Text);
+ aggiornamento();
+ }
+
+ #endregion Protected Methods
+
+ #region Private Methods
+
+ private void Mod_logStati_eh_doUpdate(object sender, EventArgs e)
+ {
+ reportUpdate();
+ }
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.designer.cs b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.designer.cs
index a807a2e9..280089b0 100644
--- a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.designer.cs
+++ b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.designer.cs
@@ -166,5 +166,23 @@ namespace MP_SITE.WebUserControls
/// To modify move field declaration from designer file to code-behind file.
///
protected global::MP_SITE.WebUserControls.mod_logFluxData mod_logFluxData;
+
+ ///
+ /// TabAlarmLog control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.TabPanel TabAlarmLog;
+
+ ///
+ /// mod_logAllarmi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::MP_SITE.WebUserControls.mod_logAllarmi mod_logAllarmi;
}
}
diff --git a/MP-Site/WebUserControls/mod_logFluxData.ascx.cs b/MP-Site/WebUserControls/mod_logFluxData.ascx.cs
index 2cf1f971..a31c9c64 100644
--- a/MP-Site/WebUserControls/mod_logFluxData.ascx.cs
+++ b/MP-Site/WebUserControls/mod_logFluxData.ascx.cs
@@ -38,7 +38,6 @@ namespace MP_SITE.WebUserControls
protected void lbtReset_Click(object sender, EventArgs e)
{
txtSearch.Text = "";
- //grView.DataBind();
}
protected void txtSearch_TextChanged(object sender, EventArgs e)
diff --git a/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs b/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs
index 1332f728..7572bd58 100644
--- a/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs
+++ b/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs
@@ -3,338 +3,367 @@ using System;
namespace MP_SITE.WebUserControls
{
- public partial class mod_periodoAnalisi : System.Web.UI.UserControl
- {
- #region area protected
+ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
+ {
+ #region Public Events
- protected intervalloDate _intervallo;
+ public event EventHandler eh_doUpdate;
- protected bool dtModStarted
- {
- get
- {
- return btnUpdate.Visible;
- }
- }
+ #endregion Public Events
- protected override void OnInit(EventArgs e)
- {
- if (!Page.IsPostBack && !dtModStarted)
- {
- base.OnInit(e);
- setIntervallo();
- setDurataMin();
- }
- }
+ #region Public Properties
- ///
- /// gestione del selettore rapido dell'intervallo temporale...
- ///
- ///
- ///
- protected void ddlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
- {
- // verifico cosa sia cambiato ed imposto date...
- datario _datario = new datario();
- switch (ddlPeriodo.SelectedValue)
- {
- case "oggi":
- _intervallo = _datario.giornata(DateTime.Now);
- break;
- case "ieri":
- _intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
- break;
- case "ultimi 7gg":
- _intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
- break;
- case "questa settimana":
- _intervallo = _datario.questaSett(DateTime.Now);
- break;
- case "ultimi 30gg":
- _intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
- break;
- case "questo mese":
- _intervallo = _datario.questoMese(DateTime.Now);
- break;
- default:
- break;
- }
- if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
- {
- verificaCoerenzaDate();
- aggiornaDateMostrate(false);
- // mostro btn update
- btnUpdate.Visible = true;
- }
- }
- ///
- /// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
- ///
- ///
- private void aggiornaDateMostrate(bool doReportUpdate)
- {
- scriviDate();
- if (doReportUpdate)
- {
- reportUpdate();
- }
- }
- ///
- /// scrive nuove date in controllo
- ///
- private void scriviDate()
- {
- // se intervallo non è valorizzato leggo da sessione...
- if (!_intervallo.isValid)
- {
- _intervallo = intervalloAnalisi;
- }
- txtInizio.Text = _intervallo.inizio.ToShortDateString();
- ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
- txtFine.Text = _intervallo.fine.ToShortDateString();
- ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
- // se è 1 sett seleziono quello, altrimenti primo...
- if (_intervallo.fine.Subtract(_intervallo.inizio).Days == 7)
- {
- ddlPeriodo.SelectedIndex =4;
- }
- else
- {
- setPeriodoFree();
- }
- }
-
- private void setIntervallo()
- {
- intervalloDate _intervallo;
- try
- {
- _intervallo = (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
- }
- catch
- {
- _intervallo = new intervalloDate();
- _intervallo.inizio = DateTime.Now.AddDays(-7);
- _intervallo.fine = DateTime.Now;
- memLayer.ML.setSessionVal("_intervallo", _intervallo);
- memLayer.ML.setSessionVal("_inizio", _intervallo.inizio);
- memLayer.ML.setSessionVal("_fine", _intervallo.fine);
- }
- scriviDate();
- }
- private void setDurataMin()
- {
- int _durataMin;
- if (memLayer.ML.isInSessionObject("_durataMin"))
- {
- _durataMin = memLayer.ML.IntSessionObj("_durataMin");
- }
- else
- {
- _durataMin = 0;
- memLayer.ML.setSessionVal("_durataMin", _durataMin);
- }
- txtDurataMin.Text = _durataMin.ToString();
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
- txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
- lblDurataMin.Text = "Visualizza eventi con durata superiore a";
- }
- }
-
-
- private void aggiornaPeriodo()
- {
- _intervallo = new intervalloDate();
- // calcolo tempi arrotondati
- int oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
- int oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
- _intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
- _intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
- verificaCoerenzaDate();
- int _durataMin;
- _durataMin = Convert.ToInt32(txtDurataMin.Text);
- memLayer.ML.setSessionVal("_durataMin", _durataMin);
- reportUpdate();
-
- }
- ///
- /// verifica che le date dell'intervallo siano coerenti (inizio < fine)
- ///
- private void verificaCoerenzaDate()
- {
- // controllo date siano coerenti (fine > inizio)...
- if (_intervallo.inizio >= _intervallo.fine)
- {
- // controllo non siano date successive ad oggi...
- if (_intervallo.fine > DateTime.Now)
+ public intervalloDate intervalloAnalisi
{
- _intervallo.fine = DateTime.Now;
+ get
+ {
+ return (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
+ }
+ set
+ {
+ intervalloDate interv = value;
+ memLayer.ML.setSessionVal("_intervallo", interv);
+ memLayer.ML.setSessionVal("_inizio", interv.inizio);
+ memLayer.ML.setSessionVal("_fine", interv.fine);
+ }
}
- _intervallo.inizio = _intervallo.fine.AddDays(-1);
- }
- //intervalloAnalisi = _intervallo;
- aggiornaDateMostrate(false);
- }
- ///
- /// evento cambio testo data inizio
- ///
- ///
- ///
- protected void txtInizio_TextChanged(object sender, EventArgs e)
- {
- // imposto il selettore a discesa...
- setPeriodoFree();
- // mostro btn update
- btnUpdate.Visible = true;
- }
- ///
- /// evento cambio testo data fine
- ///
- ///
- ///
- protected void txtFine_TextChanged(object sender, EventArgs e)
- {
- // imposto il selettore a discesa...
- setPeriodoFree();
- // mostro btn update
- btnUpdate.Visible = true;
- }
- ///
- /// in questo caso faccio udpate periodo mostrato
- ///
- ///
- ///
- protected void btnUpdate_Click(object sender, EventArgs e)
- {
- aggiornaPeriodo();
- // nascondo btn update
- btnUpdate.Visible = false;
- }
- ///
- /// riporta aggiornamento a controller
- ///
- protected void reportUpdate()
- {
- intervalloAnalisi = _intervallo;
- // alzo l'evento d update/inserimento e ricarico cache...
- if (eh_doUpdate != null)
- {
- eh_doUpdate(this, new EventArgs());
- }
- }
- #endregion
+ #endregion Public Properties
- #region area public
+ #region Public Methods
- public intervalloDate intervalloAnalisi
- {
- get
- {
- return (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
- }
- set
- {
- intervalloDate interv = value;
- memLayer.ML.setSessionVal("_intervallo", interv);
- memLayer.ML.setSessionVal("_inizio", interv.inizio);
- memLayer.ML.setSessionVal("_fine", interv.fine);
- }
- }
- ///
- /// effettua update
- ///
- ///
- public void doUpdate(bool doReportUpdate)
- {
- aggiornaDateMostrate(doReportUpdate);
- }
- ///
- /// imposta periodo libero di selezione
- ///
- public void setPeriodoFree()
- {
- ddlPeriodo.SelectedIndex = 0;
- }
-
- #region gestione eventi
-
- public event EventHandler eh_doUpdate;
-
- #endregion
-
- ///
- /// effettua uno zoom 2 X sulle date attuali
- ///
- public void dateZoom()
- {
- // calcolo zoom 2X
- double intervMinutiOrig = intervalloAnalisi.fine.Subtract(intervalloAnalisi.inizio).TotalMinutes;
- // leggo data in cui lo zoom era centrato...
- DateTime centroZoom = Convert.ToDateTime(memLayer.ML.objSessionObj("zoomCenter"));
- // calcolo posizione relativa zoom...
- double posizioneZoom = centroZoom.Subtract(intervalloAnalisi.inizio).TotalMinutes / intervMinutiOrig;
- // init!
- _intervallo = intervalloAnalisi;
- // verifico che azione fare
- if (posizioneZoom < 0.25) // se è nel 1/4 lascio zoom inalterato e "vado a sx" di 1/2 intervallo
- {
- if (intervMinutiOrig > 120)
+ ///
+ /// effettua uno zoom 2 X sulle date attuali
+ ///
+ public void dateZoom()
{
- _intervallo.inizio = _intervallo.inizio.AddMinutes(-intervMinutiOrig / 2.0);
- _intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 2.0);
- }
- else
- {
- _intervallo.inizio = _intervallo.inizio.AddMinutes(-60);
- _intervallo.fine = _intervallo.fine.AddMinutes(-60);
- }
- }
- else if (posizioneZoom > 0.75) // se è nel 3/4 lascio zoom inalterato e "vado a dx"
- {
- // mi imposto al max tra spostamento di 1/2 e l'ultimo dato disponibile...
- if (intervMinutiOrig > 120)
- {
- _intervallo.fine = _intervallo.fine.AddMinutes(intervMinutiOrig / 2.0);
- if (_intervallo.fine > DateTime.Now)
- {
- _intervallo.fine = DateTime.Now;
- }
- _intervallo.inizio = _intervallo.fine.AddMinutes(-intervMinutiOrig);
- }
- else
- {
- _intervallo.inizio = _intervallo.inizio.AddMinutes(60);
- _intervallo.fine = _intervallo.fine.AddMinutes(60);
- }
- }
- else // zoom!!!
- {
- if (intervMinutiOrig > 120)
- {
- _intervallo.inizio = _intervallo.inizio.AddMinutes(intervMinutiOrig / 4.0);
- _intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 4.0);
- }
- else // 1 ora di zoom!
- {
- _intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
- _intervallo.fine = _intervallo.inizio.AddHours(1);
- }
- }
- // arrotondo all'ora...
- _intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
- _intervallo.fine = _intervallo.fine.Date.AddHours(_intervallo.fine.TimeOfDay.Hours);
- // aggiorno in sessione
- intervalloAnalisi = _intervallo;
+ // calcolo zoom 2X
+ double intervMinutiOrig = intervalloAnalisi.fine.Subtract(intervalloAnalisi.inizio).TotalMinutes;
+ // leggo data in cui lo zoom era centrato...
+ DateTime centroZoom = Convert.ToDateTime(memLayer.ML.objSessionObj("zoomCenter"));
+ // calcolo posizione relativa zoom...
+ double posizioneZoom = centroZoom.Subtract(intervalloAnalisi.inizio).TotalMinutes / intervMinutiOrig;
+ // init!
+ _intervallo = intervalloAnalisi;
+ // verifico che azione fare
+ if (posizioneZoom < 0.25) // se è nel 1/4 lascio zoom inalterato e "vado a sx" di 1/2 intervallo
+ {
+ if (intervMinutiOrig > 120)
+ {
+ _intervallo.inizio = _intervallo.inizio.AddMinutes(-intervMinutiOrig / 2.0);
+ _intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 2.0);
+ }
+ else
+ {
+ _intervallo.inizio = _intervallo.inizio.AddMinutes(-60);
+ _intervallo.fine = _intervallo.fine.AddMinutes(-60);
+ }
+ }
+ else if (posizioneZoom > 0.75) // se è nel 3/4 lascio zoom inalterato e "vado a dx"
+ {
+ // mi imposto al max tra spostamento di 1/2 e l'ultimo dato disponibile...
+ if (intervMinutiOrig > 120)
+ {
+ _intervallo.fine = _intervallo.fine.AddMinutes(intervMinutiOrig / 2.0);
+ if (_intervallo.fine > DateTime.Now)
+ {
+ _intervallo.fine = DateTime.Now;
+ }
+ _intervallo.inizio = _intervallo.fine.AddMinutes(-intervMinutiOrig);
+ }
+ else
+ {
+ _intervallo.inizio = _intervallo.inizio.AddMinutes(60);
+ _intervallo.fine = _intervallo.fine.AddMinutes(60);
+ }
+ }
+ else // zoom!!!
+ {
+ if (intervMinutiOrig > 120)
+ {
+ _intervallo.inizio = _intervallo.inizio.AddMinutes(intervMinutiOrig / 4.0);
+ _intervallo.fine = _intervallo.fine.AddMinutes(-intervMinutiOrig / 4.0);
+ }
+ else // 1 ora di zoom!
+ {
+ _intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
+ _intervallo.fine = _intervallo.inizio.AddHours(1);
+ }
+ }
+ // arrotondo all'ora...
+ _intervallo.inizio = _intervallo.inizio.Date.AddHours(_intervallo.inizio.TimeOfDay.Hours);
+ _intervallo.fine = _intervallo.fine.Date.AddHours(_intervallo.fine.TimeOfDay.Hours);
+ // aggiorno in sessione
+ intervalloAnalisi = _intervallo;
- Response.Redirect(Request.Url.AbsoluteUri);
+ Response.Redirect(Request.Url.AbsoluteUri);
+ }
+
+ ///
+ /// effettua update
+ ///
+ ///
+ public void doUpdate(bool doReportUpdate)
+ {
+ aggiornaDateMostrate(doReportUpdate);
+ }
+
+ ///
+ /// imposta periodo libero di selezione
+ ///
+ public void setPeriodoFree()
+ {
+ ddlPeriodo.SelectedIndex = 0;
+ }
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ protected intervalloDate _intervallo;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ protected bool dtModStarted
+ {
+ get
+ {
+ return btnUpdate.Visible;
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// in questo caso faccio udpate periodo mostrato
+ ///
+ ///
+ ///
+ protected void btnUpdate_Click(object sender, EventArgs e)
+ {
+ aggiornaPeriodo();
+ // nascondo btn update
+ btnUpdate.Visible = false;
+ }
+
+ ///
+ /// gestione del selettore rapido dell'intervallo temporale...
+ ///
+ ///
+ ///
+ protected void ddlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ // verifico cosa sia cambiato ed imposto date...
+ datario _datario = new datario();
+ switch (ddlPeriodo.SelectedValue)
+ {
+ case "oggi":
+ _intervallo = _datario.giornata(DateTime.Now);
+ break;
+
+ case "ieri":
+ _intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
+ break;
+
+ case "ultimi 7gg":
+ _intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
+ break;
+
+ case "questa settimana":
+ _intervallo = _datario.questaSett(DateTime.Now);
+ break;
+
+ case "ultimi 30gg":
+ _intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
+ break;
+
+ case "questo mese":
+ _intervallo = _datario.questoMese(DateTime.Now);
+ break;
+
+ default:
+ break;
+ }
+ if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
+ {
+ verificaCoerenzaDate();
+ aggiornaDateMostrate(false);
+ // mostro btn update
+ btnUpdate.Visible = true;
+ }
+ }
+
+ protected override void OnInit(EventArgs e)
+ {
+ if (!Page.IsPostBack && !dtModStarted)
+ {
+ base.OnInit(e);
+ setIntervallo();
+ setDurataMin();
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
+ txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
+ lblDurataMin.Text = "Visualizza eventi con durata superiore a";
+ }
+ }
+
+ ///
+ /// riporta aggiornamento a controller
+ ///
+ protected void reportUpdate()
+ {
+ intervalloAnalisi = _intervallo;
+ // alzo l'evento d update/inserimento e ricarico cache...
+ if (eh_doUpdate != null)
+ {
+ eh_doUpdate(this, new EventArgs());
+ }
+ }
+
+ ///
+ /// evento cambio testo data fine
+ ///
+ ///
+ ///
+ protected void txtFine_TextChanged(object sender, EventArgs e)
+ {
+ // imposto il selettore a discesa...
+ setPeriodoFree();
+ // mostro btn update
+ btnUpdate.Visible = true;
+ }
+
+ ///
+ /// evento cambio testo data inizio
+ ///
+ ///
+ ///
+ protected void txtInizio_TextChanged(object sender, EventArgs e)
+ {
+ // imposto il selettore a discesa...
+ setPeriodoFree();
+ // mostro btn update
+ btnUpdate.Visible = true;
+ }
+
+ #endregion Protected Methods
+
+ #region Private Methods
+
+ ///
+ /// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
+ ///
+ ///
+ private void aggiornaDateMostrate(bool doReportUpdate)
+ {
+ scriviDate();
+ if (doReportUpdate)
+ {
+ reportUpdate();
+ }
+ }
+
+ private void aggiornaPeriodo()
+ {
+ _intervallo = new intervalloDate();
+ // calcolo tempi arrotondati
+ int oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
+ int oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
+ _intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
+ _intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
+ verificaCoerenzaDate();
+ int _durataMin;
+ _durataMin = Convert.ToInt32(txtDurataMin.Text);
+ memLayer.ML.setSessionVal("_durataMin", _durataMin);
+ reportUpdate();
+ }
+
+ ///
+ /// scrive nuove date in controllo
+ ///
+ private void scriviDate()
+ {
+ // se intervallo non è valorizzato leggo da sessione...
+ if (!_intervallo.isValid)
+ {
+ _intervallo = intervalloAnalisi;
+ }
+ txtInizio.Text = _intervallo.inizio.ToShortDateString();
+ ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
+ txtFine.Text = _intervallo.fine.ToShortDateString();
+ ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
+ // se è 1 sett seleziono quello, altrimenti primo...
+ if (_intervallo.fine.Subtract(_intervallo.inizio).Days == 7)
+ {
+ ddlPeriodo.SelectedIndex = 4;
+ }
+ else
+ {
+ setPeriodoFree();
+ }
+ }
+
+ private void setDurataMin()
+ {
+ int _durataMin;
+ if (memLayer.ML.isInSessionObject("_durataMin"))
+ {
+ _durataMin = memLayer.ML.IntSessionObj("_durataMin");
+ }
+ else
+ {
+ _durataMin = 0;
+ memLayer.ML.setSessionVal("_durataMin", _durataMin);
+ }
+ txtDurataMin.Text = _durataMin.ToString();
+ }
+
+ private void setIntervallo()
+ {
+ intervalloDate _intervallo;
+ try
+ {
+ _intervallo = (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
+ }
+ catch
+ {
+ _intervallo = new intervalloDate();
+ _intervallo.inizio = DateTime.Now.AddDays(-3);
+ _intervallo.fine = DateTime.Now;
+ memLayer.ML.setSessionVal("_intervallo", _intervallo);
+ memLayer.ML.setSessionVal("_inizio", _intervallo.inizio);
+ memLayer.ML.setSessionVal("_fine", _intervallo.fine);
+ }
+ scriviDate();
+ }
+
+ /// verifica che le date dell'intervallo siano coerenti (inizio < fine)
+ private void verificaCoerenzaDate()
+ {
+ // controllo date siano coerenti (fine > inizio)...
+ if (_intervallo.inizio >= _intervallo.fine)
+ {
+ // controllo non siano date successive ad oggi...
+ if (_intervallo.fine > DateTime.Now)
+ {
+ _intervallo.fine = DateTime.Now;
+ }
+ _intervallo.inizio = _intervallo.fine.AddDays(-1);
+ }
+ //intervalloAnalisi = _intervallo;
+ aggiornaDateMostrate(false);
+ }
+
+ #endregion Private Methods
}
-
- #endregion
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Allarmi.aspx b/MP-TAB/Allarmi.aspx
new file mode 100644
index 00000000..b03dcf1a
--- /dev/null
+++ b/MP-TAB/Allarmi.aspx
@@ -0,0 +1,40 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="Allarmi.aspx.cs" Inherits="MoonProTablet.Allarmi" %>
+
+
+<%@ Register Src="WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %>
+<%@ Register Src="~/WebUserControls/mod_directLinks.ascx" TagPrefix="uc1" TagName="mod_directLinks" %>
+<%@ Register Src="~/WebUserControls/mod_elencoAllarmi.ascx" TagPrefix="uc1" TagName="mod_elencoAllarmi" %>
+
+
+
+
+
+
+
+
+
+
+
+ <%--
--%>
+
+
+
+
+
+
+
ELABORAZIONE IN CORSO
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP-TAB/Allarmi.aspx.cs b/MP-TAB/Allarmi.aspx.cs
new file mode 100644
index 00000000..81e88f3e
--- /dev/null
+++ b/MP-TAB/Allarmi.aspx.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace MoonProTablet
+{
+ public partial class Allarmi : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+#if false
+ mod_controlliProd.eh_newVal += Mod_controlliProd_eh_newVal;
+ mod_controlliProd.eh_reset += Mod_controlliProd_eh_reset;
+#endif
+ }
+
+#if false
+ private void Mod_controlliProd_eh_reset(object sender, EventArgs e)
+ {
+ mod_elencoControlli.doUpdate();
+ }
+
+ private void Mod_controlliProd_eh_newVal(object sender, EventArgs e)
+ {
+ // ricarica pagina...
+ Response.Redirect(devicesAuthProxy.pagCorrente);
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB/Allarmi.aspx.designer.cs b/MP-TAB/Allarmi.aspx.designer.cs
new file mode 100644
index 00000000..30dc7cc9
--- /dev/null
+++ b/MP-TAB/Allarmi.aspx.designer.cs
@@ -0,0 +1,53 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace MoonProTablet
+{
+
+
+ public partial class Allarmi
+ {
+
+ ///
+ /// mod_dettMacchina1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::MoonProTablet.WebUserControls.mod_dettMacchina mod_dettMacchina1;
+
+ ///
+ /// updtRicerca control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.UpdateProgress updtRicerca;
+
+ ///
+ /// mod_elencoAllarmi control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::MoonProTablet.WebUserControls.mod_elencoAllarmi mod_elencoAllarmi;
+
+ ///
+ /// mod_directLinks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks;
+ }
+}
diff --git a/MP-TAB/MP-TAB.csproj b/MP-TAB/MP-TAB.csproj
index 429709bd..34e10738 100644
--- a/MP-TAB/MP-TAB.csproj
+++ b/MP-TAB/MP-TAB.csproj
@@ -265,6 +265,7 @@
+
@@ -728,6 +729,7 @@
+
@@ -772,6 +774,13 @@
About.aspx
+
+ Allarmi.aspx
+ ASPXCodeBehind
+
+
+ Allarmi.aspx
+
@@ -1185,6 +1194,13 @@
mod_directLinks.ascx
+
+ mod_elencoAllarmi.ascx
+ ASPXCodeBehind
+
+
+ mod_elencoAllarmi.ascx
+
mod_elencoControlli.ascx
ASPXCodeBehind
diff --git a/MP-TAB/Update.aspx.cs b/MP-TAB/Update.aspx.cs
index 7b045a8b..020b0e9c 100644
--- a/MP-TAB/Update.aspx.cs
+++ b/MP-TAB/Update.aspx.cs
@@ -14,6 +14,7 @@ namespace MoonProTablet
{
// update vocabolario...
memLayer.ML.flushRegisteredCache();
+ DataWrap.DW.resetVocabolario();
// rimando a pag precedente
Response.Redirect("MappaStato");
}
diff --git a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx
new file mode 100644
index 00000000..9b3fabc2
--- /dev/null
+++ b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx
@@ -0,0 +1,60 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoAllarmi.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_elencoAllarmi" %>
+<%@ Register Src="~/WebUserControls/mod_selPeriodo.ascx" TagPrefix="uc1" TagName="mod_selPeriodo" %>
+<%@ Register Src="~/WebUserControls/cmp_selOdlOrd.ascx" TagPrefix="uc1" TagName="cmp_selOdlOrd" %>
+
+
+
+
+
+
+
+
+
+
+
+ <%--
+ --%>
+
+
+ <%--
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs
new file mode 100644
index 00000000..d40bf99f
--- /dev/null
+++ b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.cs
@@ -0,0 +1,81 @@
+using SteamWare;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace MoonProTablet.WebUserControls
+{
+ public partial class mod_elencoAllarmi : BaseUserControl
+ {
+ #region Protected Methods
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ intervalloDate newIntervallo = new intervalloDate()
+ {
+ fine = DateTime.Today.AddDays(1),
+ inizio = DateTime.Today.AddDays(-7)
+ };
+ mod_selPeriodo.intervalloAnalisi = newIntervallo;
+ }
+ }
+
+ #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/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.designer.cs b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.designer.cs
new file mode 100644
index 00000000..d0a4504d
--- /dev/null
+++ b/MP-TAB/WebUserControls/mod_elencoAllarmi.ascx.designer.cs
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace MoonProTablet.WebUserControls
+{
+
+
+ public partial class mod_elencoAllarmi
+ {
+
+ ///
+ /// mod_selPeriodo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::MoonProTablet.WebUserControls.mod_selPeriodo mod_selPeriodo;
+
+ ///
+ /// grView control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.GridView grView;
+
+ ///
+ /// ods control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ObjectDataSource ods;
+ }
+}
diff --git a/MapoDb/AlarmsArchive.cs b/MapoDb/AlarmsArchive.cs
index 9e46c401..4b58aead 100644
--- a/MapoDb/AlarmsArchive.cs
+++ b/MapoDb/AlarmsArchive.cs
@@ -7,7 +7,7 @@ using System.Collections.Generic;
namespace MapoDb
{
///
- /// Classe gestione ALLARMI coem eventi speciali (documenti registrati su MongoDb)
+ /// Classe gestione ALLARMI come eventi speciali (documenti registrati su MongoDb)
///
public class AlarmsArchive
{
diff --git a/MapoDb/DS_applicazione.Designer.cs b/MapoDb/DS_applicazione.Designer.cs
index e3d8b781..4ec8d829 100644
--- a/MapoDb/DS_applicazione.Designer.cs
+++ b/MapoDb/DS_applicazione.Designer.cs
@@ -11189,16 +11189,28 @@ namespace MapoDb {
private global::System.Data.DataColumn columnDtRif;
+ private global::System.Data.DataColumn columnDuration;
+
private global::System.Data.DataColumn columnMachineId;
private global::System.Data.DataColumn columnMemAddress;
private global::System.Data.DataColumn columnMemIndex;
- private global::System.Data.DataColumn columnStatus;
+ private global::System.Data.DataColumn columnStatusVal;
private global::System.Data.DataColumn columnValDecoded;
+ private global::System.Data.DataColumn columnDtNotify;
+
+ private global::System.Data.DataColumn columnUserAck;
+
+ private global::System.Data.DataColumn columnDtAck;
+
+ private global::System.Data.DataColumn columnReqNotify;
+
+ private global::System.Data.DataColumn columnReqAck;
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public AlarmLogDataTable() {
@@ -11248,6 +11260,14 @@ namespace MapoDb {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn DurationColumn {
+ get {
+ return this.columnDuration;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public global::System.Data.DataColumn MachineIdColumn {
@@ -11274,9 +11294,9 @@ namespace MapoDb {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
- public global::System.Data.DataColumn StatusColumn {
+ public global::System.Data.DataColumn StatusValColumn {
get {
- return this.columnStatus;
+ return this.columnStatusVal;
}
}
@@ -11288,6 +11308,46 @@ namespace MapoDb {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn DtNotifyColumn {
+ get {
+ return this.columnDtNotify;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn UserAckColumn {
+ get {
+ return this.columnUserAck;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn DtAckColumn {
+ get {
+ return this.columnDtAck;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn ReqNotifyColumn {
+ get {
+ return this.columnReqNotify;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public global::System.Data.DataColumn ReqAckColumn {
+ get {
+ return this.columnReqAck;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
[global::System.ComponentModel.Browsable(false)]
@@ -11325,16 +11385,22 @@ namespace MapoDb {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
- public AlarmLogRow AddAlarmLogRow(System.DateTime DtRif, string MachineId, string MemAddress, int MemIndex, int Status, string ValDecoded) {
+ public AlarmLogRow AddAlarmLogRow(System.DateTime DtRif, decimal Duration, string MachineId, string MemAddress, int MemIndex, int StatusVal, string ValDecoded, System.DateTime DtNotify, string UserAck, System.DateTime DtAck, int ReqNotify, int ReqAck) {
AlarmLogRow rowAlarmLogRow = ((AlarmLogRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
null,
DtRif,
+ Duration,
MachineId,
MemAddress,
MemIndex,
- Status,
- ValDecoded};
+ StatusVal,
+ ValDecoded,
+ DtNotify,
+ UserAck,
+ DtAck,
+ ReqNotify,
+ ReqAck};
rowAlarmLogRow.ItemArray = columnValuesArray;
this.Rows.Add(rowAlarmLogRow);
return rowAlarmLogRow;
@@ -11366,11 +11432,17 @@ namespace MapoDb {
internal void InitVars() {
this.columnAlarmLogId = base.Columns["AlarmLogId"];
this.columnDtRif = base.Columns["DtRif"];
+ this.columnDuration = base.Columns["Duration"];
this.columnMachineId = base.Columns["MachineId"];
this.columnMemAddress = base.Columns["MemAddress"];
this.columnMemIndex = base.Columns["MemIndex"];
- this.columnStatus = base.Columns["Status"];
+ this.columnStatusVal = base.Columns["StatusVal"];
this.columnValDecoded = base.Columns["ValDecoded"];
+ this.columnDtNotify = base.Columns["DtNotify"];
+ this.columnUserAck = base.Columns["UserAck"];
+ this.columnDtAck = base.Columns["DtAck"];
+ this.columnReqNotify = base.Columns["ReqNotify"];
+ this.columnReqAck = base.Columns["ReqAck"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -11380,16 +11452,28 @@ namespace MapoDb {
base.Columns.Add(this.columnAlarmLogId);
this.columnDtRif = new global::System.Data.DataColumn("DtRif", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnDtRif);
+ this.columnDuration = new global::System.Data.DataColumn("Duration", typeof(decimal), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnDuration);
this.columnMachineId = new global::System.Data.DataColumn("MachineId", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnMachineId);
this.columnMemAddress = new global::System.Data.DataColumn("MemAddress", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnMemAddress);
this.columnMemIndex = new global::System.Data.DataColumn("MemIndex", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnMemIndex);
- this.columnStatus = new global::System.Data.DataColumn("Status", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnStatus);
+ this.columnStatusVal = new global::System.Data.DataColumn("StatusVal", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnStatusVal);
this.columnValDecoded = new global::System.Data.DataColumn("ValDecoded", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnValDecoded);
+ this.columnDtNotify = new global::System.Data.DataColumn("DtNotify", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnDtNotify);
+ this.columnUserAck = new global::System.Data.DataColumn("UserAck", typeof(string), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnUserAck);
+ this.columnDtAck = new global::System.Data.DataColumn("DtAck", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnDtAck);
+ this.columnReqNotify = new global::System.Data.DataColumn("ReqNotify", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnReqNotify);
+ this.columnReqAck = new global::System.Data.DataColumn("ReqAck", typeof(int), null, global::System.Data.MappingType.Element);
+ base.Columns.Add(this.columnReqAck);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnAlarmLogId}, true));
this.columnAlarmLogId.AutoIncrement = true;
@@ -11399,14 +11483,21 @@ namespace MapoDb {
this.columnAlarmLogId.ReadOnly = true;
this.columnAlarmLogId.Unique = true;
this.columnDtRif.AllowDBNull = false;
+ this.columnDuration.AllowDBNull = false;
this.columnMachineId.AllowDBNull = false;
this.columnMachineId.MaxLength = 50;
this.columnMemAddress.AllowDBNull = false;
this.columnMemAddress.MaxLength = 50;
this.columnMemIndex.AllowDBNull = false;
- this.columnStatus.AllowDBNull = false;
+ this.columnStatusVal.AllowDBNull = false;
this.columnValDecoded.AllowDBNull = false;
this.columnValDecoded.MaxLength = 2500;
+ this.columnDtNotify.AllowDBNull = false;
+ this.columnUserAck.AllowDBNull = false;
+ this.columnUserAck.MaxLength = 50;
+ this.columnDtAck.AllowDBNull = false;
+ this.columnReqNotify.ReadOnly = true;
+ this.columnReqAck.ReadOnly = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -15963,6 +16054,17 @@ namespace MapoDb {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public decimal Duration {
+ get {
+ return ((decimal)(this[this.tableAlarmLog.DurationColumn]));
+ }
+ set {
+ this[this.tableAlarmLog.DurationColumn] = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
public string MachineId {
@@ -15998,12 +16100,12 @@ namespace MapoDb {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
- public int Status {
+ public int StatusVal {
get {
- return ((int)(this[this.tableAlarmLog.StatusColumn]));
+ return ((int)(this[this.tableAlarmLog.StatusValColumn]));
}
set {
- this[this.tableAlarmLog.StatusColumn] = value;
+ this[this.tableAlarmLog.StatusValColumn] = value;
}
}
@@ -16017,6 +16119,95 @@ namespace MapoDb {
this[this.tableAlarmLog.ValDecodedColumn] = value;
}
}
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public System.DateTime DtNotify {
+ get {
+ return ((global::System.DateTime)(this[this.tableAlarmLog.DtNotifyColumn]));
+ }
+ set {
+ this[this.tableAlarmLog.DtNotifyColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public string UserAck {
+ get {
+ return ((string)(this[this.tableAlarmLog.UserAckColumn]));
+ }
+ set {
+ this[this.tableAlarmLog.UserAckColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public System.DateTime DtAck {
+ get {
+ return ((global::System.DateTime)(this[this.tableAlarmLog.DtAckColumn]));
+ }
+ set {
+ this[this.tableAlarmLog.DtAckColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int ReqNotify {
+ get {
+ try {
+ return ((int)(this[this.tableAlarmLog.ReqNotifyColumn]));
+ }
+ catch (global::System.InvalidCastException e) {
+ throw new global::System.Data.StrongTypingException("The value for column \'ReqNotify\' in table \'AlarmLog\' is DBNull.", e);
+ }
+ }
+ set {
+ this[this.tableAlarmLog.ReqNotifyColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public int ReqAck {
+ get {
+ try {
+ return ((int)(this[this.tableAlarmLog.ReqAckColumn]));
+ }
+ catch (global::System.InvalidCastException e) {
+ throw new global::System.Data.StrongTypingException("The value for column \'ReqAck\' in table \'AlarmLog\' is DBNull.", e);
+ }
+ }
+ set {
+ this[this.tableAlarmLog.ReqAckColumn] = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public bool IsReqNotifyNull() {
+ return this.IsNull(this.tableAlarmLog.ReqNotifyColumn);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void SetReqNotifyNull() {
+ this[this.tableAlarmLog.ReqNotifyColumn] = global::System.Convert.DBNull;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public bool IsReqAckNull() {
+ return this.IsNull(this.tableAlarmLog.ReqAckColumn);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+ public void SetReqAckNull() {
+ this[this.tableAlarmLog.ReqAckColumn] = global::System.Convert.DBNull;
+ }
}
///
@@ -30473,48 +30664,18 @@ SELECT TagCode, TagDescr, DisplOrd, CssClass FROM AnagTags WHERE (TagCode = @Tag
tableMapping.DataSetTable = "AlarmLog";
tableMapping.ColumnMappings.Add("AlarmLogId", "AlarmLogId");
tableMapping.ColumnMappings.Add("DtRif", "DtRif");
+ tableMapping.ColumnMappings.Add("Duration", "Duration");
tableMapping.ColumnMappings.Add("MachineId", "MachineId");
tableMapping.ColumnMappings.Add("MemAddress", "MemAddress");
tableMapping.ColumnMappings.Add("MemIndex", "MemIndex");
- tableMapping.ColumnMappings.Add("Status", "Status");
+ tableMapping.ColumnMappings.Add("StatusVal", "StatusVal");
tableMapping.ColumnMappings.Add("ValDecoded", "ValDecoded");
+ tableMapping.ColumnMappings.Add("DtNotify", "DtNotify");
+ tableMapping.ColumnMappings.Add("UserAck", "UserAck");
+ tableMapping.ColumnMappings.Add("DtAck", "DtAck");
+ tableMapping.ColumnMappings.Add("ReqNotify", "ReqNotify");
+ tableMapping.ColumnMappings.Add("ReqAck", "ReqAck");
this._adapter.TableMappings.Add(tableMapping);
- this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
- this._adapter.DeleteCommand.Connection = this.Connection;
- this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[FluxLog] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([" +
- "dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore" +
- "] = @Original_Valore) AND ([Cnt] = @Original_Cnt))";
- this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
- this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
- this._adapter.InsertCommand.Connection = this.Connection;
- this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[FluxLog] ([IdxMacchina], [dtEvento], [CodFlux], [Valore], [Cnt]) VALUES (@IdxMacchina, @dtEvento, @CodFlux, @Valore, @Cnt);
-SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)";
- this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
- this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
- this._adapter.UpdateCommand.Connection = this.Connection;
- this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[FluxLog] SET [IdxMacchina] = @IdxMacchina, [dtEvento] = @dtEvento, [CodFlux] = @CodFlux, [Valore] = @Valore, [Cnt] = @Cnt WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt));
-SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)";
- this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IdxMacchina", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IdxMacchina", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_dtEvento", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "dtEvento", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CodFlux", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CodFlux", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Valore", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Valore", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
- this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Cnt", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Cnt", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -30527,22 +30688,68 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[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[2];
+ this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
- this._commandCollection[0].CommandText = "SELECT * FROM dbo.AlarmLog";
+ 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_AlarmLog_insert";
+ this._commandCollection[1].CommandText = "dbo.stp_AL_getFilt";
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("@DtRif", 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("@MachineId", 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("@MemAddress", 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("@MemIndex", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Status", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[1].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[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[2] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[2].Connection = this.Connection;
+ this._commandCollection[2].CommandText = "dbo.stp_AL_getFiltCount";
+ 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].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].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[5] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[5].Connection = this.Connection;
+ this._commandCollection[5].CommandText = "dbo.stp_AL_setAck";
+ 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[6] = new global::System.Data.SqlClient.SqlCommand();
+ this._commandCollection[6].Connection = this.Connection;
+ this._commandCollection[6].CommandText = "dbo.stp_AL_setNotify";
+ 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, "", "", ""));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -30572,180 +30779,154 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
[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")]
- public virtual int Update(DS_applicazione.AlarmLogDataTable dataTable) {
- return this.Adapter.Update(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")]
- public virtual int Update(DS_applicazione dataSet) {
- return this.Adapter.Update(dataSet, "AlarmLog");
- }
-
- [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")]
- public virtual int Update(global::System.Data.DataRow dataRow) {
- return this.Adapter.Update(new global::System.Data.DataRow[] {
- dataRow});
- }
-
- [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")]
- public virtual int Update(global::System.Data.DataRow[] dataRows) {
- return this.Adapter.Update(dataRows);
- }
-
- [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.Delete, true)]
- public virtual int Delete(string Original_IdxMacchina, System.DateTime Original_dtEvento, string Original_CodFlux, string Original_Valore, int Original_Cnt) {
- if ((Original_IdxMacchina == null)) {
- throw new global::System.ArgumentNullException("Original_IdxMacchina");
- }
- else {
- this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_IdxMacchina));
- }
- this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_dtEvento));
- if ((Original_CodFlux == null)) {
- throw new global::System.ArgumentNullException("Original_CodFlux");
- }
- else {
- this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_CodFlux));
- }
- if ((Original_Valore == null)) {
- throw new global::System.ArgumentNullException("Original_Valore");
- }
- else {
- this.Adapter.DeleteCommand.Parameters[3].Value = ((string)(Original_Valore));
- }
- this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Cnt));
- global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
- if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
- != global::System.Data.ConnectionState.Open)) {
- this.Adapter.DeleteCommand.Connection.Open();
- }
- try {
- int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
- return returnValue;
- }
- finally {
- if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
- this.Adapter.DeleteCommand.Connection.Close();
- }
- }
- }
-
- [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.Insert, true)]
- public virtual int Insert(string IdxMacchina, System.DateTime dtEvento, string CodFlux, string Valore, int Cnt) {
+ [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[1];
if ((IdxMacchina == null)) {
- throw new global::System.ArgumentNullException("IdxMacchina");
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
- this.Adapter.InsertCommand.Parameters[0].Value = ((string)(IdxMacchina));
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina));
}
- this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(dtEvento));
- if ((CodFlux == null)) {
- throw new global::System.ArgumentNullException("CodFlux");
+ if ((dtFrom.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(dtFrom.Value));
}
else {
- this.Adapter.InsertCommand.Parameters[2].Value = ((string)(CodFlux));
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
- if ((Valore == null)) {
- throw new global::System.ArgumentNullException("Valore");
+ if ((dtTo.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((System.DateTime)(dtTo.Value));
}
else {
- this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Valore));
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
- this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Cnt));
- global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
- if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
- != global::System.Data.ConnectionState.Open)) {
- this.Adapter.InsertCommand.Connection.Open();
+ if ((showMulti.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showMulti.Value));
}
- try {
- int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
- return returnValue;
- }
- finally {
- if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
- this.Adapter.InsertCommand.Connection.Close();
- }
+ else {
+ this.Adapter.SelectCommand.Parameters[4].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.Update, true)]
- public virtual int Update(string IdxMacchina, System.DateTime dtEvento, string CodFlux, string Valore, int Cnt, string Original_IdxMacchina, System.DateTime Original_dtEvento, string Original_CodFlux, string Original_Valore, int Original_Cnt) {
+ [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];
if ((IdxMacchina == null)) {
- throw new global::System.ArgumentNullException("IdxMacchina");
+ this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
- this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(IdxMacchina));
+ this.Adapter.SelectCommand.Parameters[1].Value = ((string)(IdxMacchina));
}
- this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(dtEvento));
- if ((CodFlux == null)) {
- throw new global::System.ArgumentNullException("CodFlux");
+ if ((dtFrom.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[2].Value = ((System.DateTime)(dtFrom.Value));
}
else {
- this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(CodFlux));
+ this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
}
- if ((Valore == null)) {
- throw new global::System.ArgumentNullException("Valore");
+ if ((dtTo.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[3].Value = ((System.DateTime)(dtTo.Value));
}
else {
- this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Valore));
+ this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value;
}
- this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Cnt));
- if ((Original_IdxMacchina == null)) {
- throw new global::System.ArgumentNullException("Original_IdxMacchina");
+ if ((showMulti.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[4].Value = ((bool)(showMulti.Value));
}
else {
- this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_IdxMacchina));
+ this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value;
}
- this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(Original_dtEvento));
- if ((Original_CodFlux == null)) {
- throw new global::System.ArgumentNullException("Original_CodFlux");
+ if ((maximumRows.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[5].Value = ((int)(maximumRows.Value));
}
else {
- this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_CodFlux));
+ this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value;
}
- if ((Original_Valore == null)) {
- throw new global::System.ArgumentNullException("Original_Valore");
+ if ((startRowIndex.HasValue == true)) {
+ this.Adapter.SelectCommand.Parameters[6].Value = ((int)(startRowIndex.Value));
}
else {
- this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Valore));
+ this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value;
}
- this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_Cnt));
- global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
- if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
+ if ((searchVal == null)) {
+ this.Adapter.SelectCommand.Parameters[7].Value = global::System.DBNull.Value;
+ }
+ else {
+ this.Adapter.SelectCommand.Parameters[7].Value = ((string)(searchVal));
+ }
+ 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")]
+ 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];
+ if ((IdxMacchina == null)) {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[1].Value = ((string)(IdxMacchina));
+ }
+ if ((dtFrom.HasValue == true)) {
+ command.Parameters[2].Value = ((System.DateTime)(dtFrom.Value));
+ }
+ else {
+ command.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ if ((dtTo.HasValue == true)) {
+ command.Parameters[3].Value = ((System.DateTime)(dtTo.Value));
+ }
+ else {
+ command.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ if ((showMulti.HasValue == true)) {
+ command.Parameters[4].Value = ((bool)(showMulti.Value));
+ }
+ else {
+ command.Parameters[4].Value = global::System.DBNull.Value;
+ }
+ if ((searchVal == null)) {
+ command.Parameters[5].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[5].Value = ((string)(searchVal));
+ }
+ global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
+ if (((command.Connection.State & global::System.Data.ConnectionState.Open)
!= global::System.Data.ConnectionState.Open)) {
- this.Adapter.UpdateCommand.Connection.Open();
+ command.Connection.Open();
}
+ object returnValue;
try {
- int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
- return returnValue;
+ returnValue = command.ExecuteScalar();
}
finally {
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
- this.Adapter.UpdateCommand.Connection.Close();
+ command.Connection.Close();
}
}
+ if (((returnValue == null)
+ || (returnValue.GetType() == typeof(global::System.DBNull)))) {
+ return null;
+ }
+ else {
+ return ((object)(returnValue));
+ }
}
[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")]
- public virtual int insertQuery(global::System.Nullable DtRif, string MachineId, string MemAddress, global::System.Nullable MemIndex, global::System.Nullable Status, string ValDecoded) {
- global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1];
+ 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];
if ((DtRif.HasValue == true)) {
command.Parameters[1].Value = ((System.DateTime)(DtRif.Value));
}
@@ -30770,8 +30951,8 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
else {
command.Parameters[4].Value = global::System.DBNull.Value;
}
- if ((Status.HasValue == true)) {
- command.Parameters[5].Value = ((int)(Status.Value));
+ if ((StatusVal.HasValue == true)) {
+ command.Parameters[5].Value = ((int)(StatusVal.Value));
}
else {
command.Parameters[5].Value = global::System.DBNull.Value;
@@ -30798,6 +30979,80 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
}
return returnValue;
}
+
+ [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")]
+ public virtual int setAck(global::System.Nullable AlarmLogId, global::System.Nullable DtAck, string UserAck) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5];
+ if ((AlarmLogId.HasValue == true)) {
+ command.Parameters[1].Value = ((int)(AlarmLogId.Value));
+ }
+ else {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((DtAck.HasValue == true)) {
+ command.Parameters[2].Value = ((System.DateTime)(DtAck.Value));
+ }
+ else {
+ command.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ if ((UserAck == null)) {
+ command.Parameters[3].Value = global::System.DBNull.Value;
+ }
+ else {
+ command.Parameters[3].Value = ((string)(UserAck));
+ }
+ global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
+ if (((command.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ command.Connection.Open();
+ }
+ int returnValue;
+ try {
+ returnValue = command.ExecuteNonQuery();
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ command.Connection.Close();
+ }
+ }
+ return returnValue;
+ }
+
+ [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")]
+ public virtual int setNotify(global::System.Nullable AlarmLogId, global::System.Nullable DtNotify) {
+ global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6];
+ if ((AlarmLogId.HasValue == true)) {
+ command.Parameters[1].Value = ((int)(AlarmLogId.Value));
+ }
+ else {
+ command.Parameters[1].Value = global::System.DBNull.Value;
+ }
+ if ((DtNotify.HasValue == true)) {
+ command.Parameters[2].Value = ((System.DateTime)(DtNotify.Value));
+ }
+ else {
+ command.Parameters[2].Value = global::System.DBNull.Value;
+ }
+ global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
+ if (((command.Connection.State & global::System.Data.ConnectionState.Open)
+ != global::System.Data.ConnectionState.Open)) {
+ command.Connection.Open();
+ }
+ int returnValue;
+ try {
+ returnValue = command.ExecuteNonQuery();
+ }
+ finally {
+ if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
+ command.Connection.Close();
+ }
+ }
+ return returnValue;
+ }
}
}
diff --git a/MapoDb/DS_applicazione.xsd b/MapoDb/DS_applicazione.xsd
index 3e2166a4..66cb384c 100644
--- a/MapoDb/DS_applicazione.xsd
+++ b/MapoDb/DS_applicazione.xsd
@@ -2867,84 +2867,119 @@ FROM v_DD_exp
-
-
-
- DELETE FROM [dbo].[FluxLog] WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt))
-
-
-
-
-
-
-
-
-
-
-
- INSERT INTO [dbo].[FluxLog] ([IdxMacchina], [dtEvento], [CodFlux], [Valore], [Cnt]) VALUES (@IdxMacchina, @dtEvento, @CodFlux, @Valore, @Cnt);
-SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)
-
-
-
-
-
-
-
-
-
+
-
- SELECT * FROM dbo.AlarmLog
+
+ SELECT *
+FROM v_AlarmLog
-
-
- UPDATE [dbo].[FluxLog] SET [IdxMacchina] = @IdxMacchina, [dtEvento] = @dtEvento, [CodFlux] = @CodFlux, [Valore] = @Valore, [Cnt] = @Cnt WHERE (([IdxMacchina] = @Original_IdxMacchina) AND ([dtEvento] = @Original_dtEvento) AND ([CodFlux] = @Original_CodFlux) AND ([Valore] = @Original_Valore) AND ([Cnt] = @Original_Cnt));
-SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux = @CodFlux) AND (IdxMacchina = @IdxMacchina) AND (dtEvento = @dtEvento)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
-
+
- dbo.stp_AlarmLog_insert
+ dbo.stp_AL_getFilt
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_AL_getFiltCount
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_AL_getFiltPaged
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_AL_insertQuery
-
+
+
+
+
+ dbo.stp_AL_setAck
+
+
+
+
+
+
+
+
+
+
+
+
+ dbo.stp_AL_setNotify
+
+
+
+
+
+
+
+
@@ -3791,6 +3826,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
+
@@ -3806,7 +3842,7 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
-
+
@@ -3814,6 +3850,17 @@ SELECT IdxMacchina, dtEvento, CodFlux, Valore, Cnt FROM FluxLog WHERE (CodFlux =
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MapoDb/DS_applicazione.xss b/MapoDb/DS_applicazione.xss
index 59a65d4e..0af29da3 100644
--- a/MapoDb/DS_applicazione.xss
+++ b/MapoDb/DS_applicazione.xss
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
@@ -12,7 +12,7 @@
-
+
@@ -30,12 +30,12 @@
-
+
-
+
-
+
diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs
index 1cca573a..7962b851 100644
--- a/MapoDb/DataLayer.cs
+++ b/MapoDb/DataLayer.cs
@@ -3790,6 +3790,11 @@ namespace MapoDb
// aggiungo
innovations.Add(item);
}
+ else
+ // altrimenti aggiorno campo name...
+ {
+ trovato.name = item.name;
+ }
}
// serializzo e salvo
string serVal = JsonConvert.SerializeObject(innovations);