diff --git a/MP-Site/AnalisiProduzione.aspx.cs b/MP-Site/AnalisiProduzione.aspx.cs index c0d59832..f8607233 100644 --- a/MP-Site/AnalisiProduzione.aspx.cs +++ b/MP-Site/AnalisiProduzione.aspx.cs @@ -65,7 +65,15 @@ namespace MoonPro protected void Page_Load(object sender, EventArgs e) { _resoconti = new resoconti(); - durataMin = (int)Session["_durataMin"]; + if (memLayer.ML.isInSessionObject("_durataMin")) + { + durataMin = memLayer.ML.IntSessionObj("_durataMin"); + } + else + { + durataMin = 0; + memLayer.ML.setSessionVal("_durataMin", durataMin); + } mod_periodoAnalisi.eh_doUpdate += new EventHandler(Mod_periodoAnalisi1_eh_doUpdate); if (!Page.IsPostBack) { @@ -187,7 +195,7 @@ namespace MoonPro private void ridisegna() { // update controlli child - intervalloAnalisi = (intervalloDate)Session["_intervallo"]; + intervalloAnalisi = (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); mod_AnPro_Totali.doUpdate(idxMulti, chkOdlClosed.Checked, chkOdlOpen.Checked, chkOdlNew.Checked); } diff --git a/MP-Site/DettaglioMacchina.aspx.cs b/MP-Site/DettaglioMacchina.aspx.cs index 3ec877ac..97ecea0d 100644 --- a/MP-Site/DettaglioMacchina.aspx.cs +++ b/MP-Site/DettaglioMacchina.aspx.cs @@ -65,8 +65,8 @@ namespace MoonPro mod_sequencerTempiCiclo1.eh_richiestaZoom += new EventHandler(mod_sequencerTempiCiclo1_eh_richiestaZoom); _resoconti = new resoconti(); idxMacchina = memLayer.ML.QSS("IdxMacchina"); - intervalloAnalisi = (intervalloDate)Session["_intervallo"]; - durataMin = (int)Session["_durataMin"]; + intervalloAnalisi = (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); + durataMin = memLayer.ML.IntSessionObj("_durataMin"); // chiamo routine disegno impostaGrafici(); } @@ -97,7 +97,7 @@ namespace MoonPro void Mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e) { graphDataRefresh = true; - intervalloAnalisi = (intervalloDate)Session["_intervallo"]; + intervalloAnalisi = (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); impostaGrafici(); Mod_listaStatiEventi1.aggiornamento(); } diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj index fbba65c8..b9a23a2a 100644 --- a/MP-Site/MP-Site.csproj +++ b/MP-Site/MP-Site.csproj @@ -442,6 +442,20 @@ mod_AnPro_DettGg.ascx + + mod_AnPro_ODL.ascx + ASPXCodeBehind + + + mod_AnPro_ODL.ascx + + + mod_AnPro_PODL.ascx + ASPXCodeBehind + + + mod_AnPro_PODL.ascx + mod_AnPro_Totali.ascx ASPXCodeBehind @@ -651,6 +665,8 @@ + + diff --git a/MP-Site/MappaStatoSeq.aspx.cs b/MP-Site/MappaStatoSeq.aspx.cs index 853012b7..a854bfb8 100644 --- a/MP-Site/MappaStatoSeq.aspx.cs +++ b/MP-Site/MappaStatoSeq.aspx.cs @@ -208,7 +208,7 @@ namespace MoonPro protected void lnkMacchina_Click(object sender, EventArgs e) { LinkButton lb = (LinkButton)sender; - Session["IdxMacchina"] = lb.CommandArgument; + memLayer.ML.setSessionVal("IdxMacchina", lb.CommandArgument); Response.Redirect("~/DettaglioMacchina.aspx"); } diff --git a/MP-Site/StatisticheImpiego.aspx.cs b/MP-Site/StatisticheImpiego.aspx.cs index 278cac84..a220b38c 100644 --- a/MP-Site/StatisticheImpiego.aspx.cs +++ b/MP-Site/StatisticheImpiego.aspx.cs @@ -5,124 +5,124 @@ using System.Web.UI.WebControls; namespace MoonPro { - public partial class StatisticheImpiego : System.Web.UI.Page + public partial class StatisticheImpiego : System.Web.UI.Page + { + protected resoconti _resoconti; + protected intervalloDate _intervalloAnalisi; + protected intervalloDate intervalloAnalisi { - protected resoconti _resoconti; - protected intervalloDate _intervalloAnalisi; - protected intervalloDate intervalloAnalisi + get + { + return _intervalloAnalisi; + } + set + { + // controllo che la data di fine non sia posteriore ad adesso... + if (value.fine > DateTime.Now) { - get - { - return _intervalloAnalisi; - } - set - { - // controllo che la data di fine non sia posteriore ad adesso... - if (value.fine > DateTime.Now) - { - value.fine = DateTime.Now; - } - _intervalloAnalisi = value; - } - } - protected int durataMin; - /// - /// elenco idx COMMA separated da controllo selezione multiplo - /// - protected string idxMulti - { - get - { - string answ = ""; - try - { - foreach (ListItem riga in listMacchine.Items) - { - // se è selezionata creo riga anche x lei... - if (riga.Selected) - { - answ += string.Format(",{0}", riga.Value); - } - } - answ = answ.Substring(1, answ.Length - 1); - } - catch - { - answ = ""; - } - return answ; - } - } - /// - /// effettua traduzione del lemma - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } - protected void Page_Load(object sender, EventArgs e) - { - _resoconti = new resoconti(); - durataMin = (int)Session["_durataMin"]; - mod_periodoAnalisi.eh_doUpdate += new EventHandler(Mod_periodoAnalisi1_eh_doUpdate); - if (!Page.IsPostBack) - { - ridisegna(); - } - } - /// - /// valorizzazione iniziale filtro impianti - /// - /// - /// - protected void listMacchine_DataBound(object sender, EventArgs e) - { - foreach (ListItem item in ((ListBox)sender).Items) - { - item.Selected = true; - } - ridisegna(); - } - /// - /// salvo elenco impianti selected - /// - /// - /// - protected void listMacchine_SelectedIndexChanged(object sender, EventArgs e) - { - ridisegna(); - } - void Mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e) - { - ridisegna(); - } - - protected void chkHideSpenta_CheckedChanged(object sender, EventArgs e) - { - // in base a quello ridisegno la torta... - ridisegna(); - } - /// - /// aggiorna dati x ridisegno - /// - private void ridisegna() - { - intervalloAnalisi = (intervalloDate)Session["_intervallo"]; - setTorta(); - } - /// - /// plotting grafico torta - /// - protected void setTorta() - { - if (idxMulti != "") - { - // versione NEW - Mod_grafico2.graficoTorta = new pieChart(); - Mod_grafico2.graficoTorta.serie = _resoconti.tortaStati(idxMulti, intervalloAnalisi, durataMin, chkHideSpenta.Checked); - } + value.fine = DateTime.Now; } + _intervalloAnalisi = value; + } } + protected int durataMin; + /// + /// elenco idx COMMA separated da controllo selezione multiplo + /// + protected string idxMulti + { + get + { + string answ = ""; + try + { + foreach (ListItem riga in listMacchine.Items) + { + // se è selezionata creo riga anche x lei... + if (riga.Selected) + { + answ += string.Format(",{0}", riga.Value); + } + } + answ = answ.Substring(1, answ.Length - 1); + } + catch + { + answ = ""; + } + return answ; + } + } + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + durataMin = memLayer.ML.IntSessionObj("_durataMin"); + mod_periodoAnalisi.eh_doUpdate += new EventHandler(Mod_periodoAnalisi1_eh_doUpdate); + if (!Page.IsPostBack) + { + ridisegna(); + } + } + /// + /// valorizzazione iniziale filtro impianti + /// + /// + /// + protected void listMacchine_DataBound(object sender, EventArgs e) + { + foreach (ListItem item in ((ListBox)sender).Items) + { + item.Selected = true; + } + ridisegna(); + } + /// + /// salvo elenco impianti selected + /// + /// + /// + protected void listMacchine_SelectedIndexChanged(object sender, EventArgs e) + { + ridisegna(); + } + void Mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e) + { + ridisegna(); + } + + protected void chkHideSpenta_CheckedChanged(object sender, EventArgs e) + { + // in base a quello ridisegno la torta... + ridisegna(); + } + /// + /// aggiorna dati x ridisegno + /// + private void ridisegna() + { + intervalloAnalisi = (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); + setTorta(); + } + /// + /// plotting grafico torta + /// + protected void setTorta() + { + if (idxMulti != "") + { + // versione NEW + Mod_grafico2.graficoTorta = new pieChart(); + Mod_grafico2.graficoTorta.serie = _resoconti.tortaStati(idxMulti, intervalloAnalisi, durataMin, chkHideSpenta.Checked); + } + } + } } \ No newline at end of file diff --git a/MP-Site/Web.config b/MP-Site/Web.config index 01a6def4..95d6f086 100644 --- a/MP-Site/Web.config +++ b/MP-Site/Web.config @@ -32,7 +32,7 @@ - + diff --git a/MP-Site/WebUserControls/mod_AnPro_ODL.ascx b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx new file mode 100644 index 00000000..12950032 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx @@ -0,0 +1,70 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_ODL.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_ODL" %> + +<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %> + +
+
+

ODL <%: traduci("AnProTotPer") %>

+
+
+ + + + + + + NESSUN RISULTATO + + + + +
+ +
+
+ +
+ +
+
+ +
+ + + + + +
+ +
+
+
+ + + +
+ +
+
+
+
+
+ + + + + + + + + + + + + + +
+ +
\ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.cs b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.cs new file mode 100644 index 00000000..1a38b9d1 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.cs @@ -0,0 +1,167 @@ +using SteamWare; +using System; +using System.Web.UI; + +namespace MoonPro.WebUserControls +{ + public partial class mod_AnPro_ODL : SteamWare.UserControl + { + public event EventHandler eh_selVal; + public event EventHandler eh_reset; + /// + /// innalzo evento in base al tipo richiesto + /// + protected void raiseEvent(tipoEvento evReq) + { + switch (evReq) + { + case tipoEvento.reset: + // raise dell'evento + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + break; + case tipoEvento.selection: + // raise dell'evento + if (eh_selVal != null) + { + eh_selVal(this, new EventArgs()); + } + break; + case tipoEvento.edit: + case tipoEvento.delete: + default: + break; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + mod_righePag.numRowPag = memLayer.ML.CRI("_righeDataGridShort"); + grView.PageSize = mod_righePag.numRowPag; + } + mod_righePag.eh_newNum += Mod_righePag_eh_newNum; + } + /// + /// aggiorno numero righe da mostrare + /// + /// + /// + private void Mod_righePag_eh_newNum(object sender, EventArgs e) + { + grView.PageSize = mod_righePag.numRowPag; + } + + /// + /// aggiorna visualizzazione + /// + /// Idx Macchine + /// Si/No ODL già conclusi + /// Si/No ODL in corso + /// Si/No ODL da attrezzare + /// + /// aggiorna visualizzazione + /// + public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew) + { + hfIdxMulti.Value = idxMulti; + hfClosed.Value = OdlChiusi.ToString(); + hfOpen.Value = OdlAperti.ToString(); + hfNew.Value = OdlNew.ToString(); + grView.DataBind(); + } + /// + /// comando selezione + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(tipoEvento.selection); + } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + /// + /// IdxMacchina selezionata + /// + public string IdxMacchina + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["IdxMacchina"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// Cod articolo selezionato + /// + public string CodArticolo + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["CodArticolo"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// formato grafico post verifica qta > 0 + /// + /// + /// + public string cssFromQty(object qty) + { + string answ = ""; + if (Convert.ToInt32(qty) >= 0) + { + answ = "valOk"; + } + else + { + answ = "valKo"; + } + return answ; + } + + protected void grView_Sorted(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + + protected void grView_PageIndexChanged(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + + public string cssByStato(object stato) + { + return string.Format("css_{0}", stato); ; + } + } +} \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.designer.cs b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.designer.cs new file mode 100644 index 00000000..ce7ccc67 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_ODL.ascx.designer.cs @@ -0,0 +1,78 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MoonPro.WebUserControls { + + + public partial class mod_AnPro_ODL { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfIdxMulti. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxMulti; + + /// + /// Controllo hfClosed. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfClosed; + + /// + /// Controllo hfOpen. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfOpen; + + /// + /// Controllo hfNew. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfNew; + + /// + /// Controllo mod_righePag. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MoonPro.WebUserControls.mod_righePag mod_righePag; + } +} diff --git a/MP-Site/WebUserControls/mod_AnPro_PODL.ascx b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx new file mode 100644 index 00000000..1fcf6354 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx @@ -0,0 +1,46 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_PODL.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_PODL" %> + + +<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %> + +
+
+

Promesse ODL

+
+
+ + + + + + + NESSUN RISULTATO + + + + + + + + + + + <%# Eval("TCAssegnato","{0:N3}") %> (min)
+ <%# SteamWare.TempiCiclo.minSec(Eval("TCAssegnato", "{0:N3}")) %> (m:s) +
+
+ + +
+
+ + + + + + +
+ +
\ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.cs b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.cs new file mode 100644 index 00000000..39735ed7 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.cs @@ -0,0 +1,164 @@ +using SteamWare; +using System; +using System.Web.UI; + +namespace MoonPro.WebUserControls +{ + public partial class mod_AnPro_PODL : SteamWare.UserControl + { + public event EventHandler eh_selVal; + public event EventHandler eh_reset; + /// + /// innalzo evento in base al tipo richiesto + /// + protected void raiseEvent(tipoEvento evReq) + { + switch (evReq) + { + case tipoEvento.reset: + // raise dell'evento + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + break; + case tipoEvento.selection: + // raise dell'evento + if (eh_selVal != null) + { + eh_selVal(this, new EventArgs()); + } + break; + case tipoEvento.edit: + case tipoEvento.delete: + default: + break; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + mod_righePag.numRowPag = memLayer.ML.CRI("_righeDataGridShort"); + grView.PageSize = mod_righePag.numRowPag; + } + mod_righePag.eh_newNum += Mod_righePag_eh_newNum; + } + /// + /// aggiorno numero righe da mostrare + /// + /// + /// + private void Mod_righePag_eh_newNum(object sender, EventArgs e) + { + grView.PageSize = mod_righePag.numRowPag; + } + + /// + /// aggiorna visualizzazione + /// + /// Idx Macchine + /// Si/No ODL già conclusi + /// Si/No ODL in corso + /// Si/No ODL da attrezzare + /// + /// aggiorna visualizzazione + /// + public void doUpdate(string idxMulti) + { + hfIdxMulti.Value = idxMulti; + grView.DataBind(); + } + /// + /// comando selezione + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + raiseEvent(tipoEvento.selection); + } + /// + /// comando reset + /// + /// + /// + protected void lbtReset_Click(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + /// + /// IdxMacchina selezionata + /// + public string IdxMacchina + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["IdxMacchina"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// Cod articolo selezionato + /// + public string CodArticolo + { + get + { + string answ = ""; + try + { + answ = grView.SelectedDataKey["CodArticolo"].ToString(); + } + catch + { } + return answ; + } + } + /// + /// formato grafico post verifica qta > 0 + /// + /// + /// + public string cssFromQty(object qty) + { + string answ = ""; + if (Convert.ToInt32(qty) >= 0) + { + answ = "valOk"; + } + else + { + answ = "valKo"; + } + return answ; + } + + protected void grView_Sorted(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + + protected void grView_PageIndexChanged(object sender, EventArgs e) + { + grView.SelectedIndex = -1; + grView.DataBind(); + raiseEvent(tipoEvento.reset); + } + + public string cssByStato(object stato) + { + return string.Format("css_{0}", stato); ; + } + } +} \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.designer.cs b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.designer.cs new file mode 100644 index 00000000..95b252d3 --- /dev/null +++ b/MP-Site/WebUserControls/mod_AnPro_PODL.ascx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace MoonPro.WebUserControls { + + + public partial class mod_AnPro_PODL { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo hfIdxMulti. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxMulti; + + /// + /// Controllo mod_righePag. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MoonPro.WebUserControls.mod_righePag mod_righePag; + } +} diff --git a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx index 1e15268d..0119aeb8 100644 --- a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx +++ b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx @@ -1,67 +1,6 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_AnPro_Totali.ascx.cs" Inherits="MoonPro.WebUserControls.mod_AnPro_Totali" %> +<%@ Register Src="~/WebUserControls/mod_AnPro_ODL.ascx" TagPrefix="uc1" TagName="mod_AnPro_ODL" %> +<%@ Register Src="~/WebUserControls/mod_AnPro_PODL.ascx" TagPrefix="uc1" TagName="mod_AnPro_PODL" %> -<%@ Register Src="~/WebUserControls/mod_righePag.ascx" TagName="mod_righePag" TagPrefix="uc2" %> - -
-
-

<%: traduci("AnProTotPer") %>

-
-
- - - - - - - - -
- -
-
- -
- -
-
- -
- - - - - -
- -
-
-
- - - -
- -
-
-
-
-
- - - - - - - - - - - - - - -
- -
+ + diff --git a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.cs b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.cs index 50c90116..12933d2e 100644 --- a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.cs +++ b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.cs @@ -1,167 +1,99 @@ -using SteamWare; -using System; -using System.Web.UI; +using System; namespace MoonPro.WebUserControls { - public partial class mod_AnPro_Totali : SteamWare.UserControl + public partial class mod_AnPro_Totali : SteamWare.UserControl + { + public event EventHandler eh_selVal; + public event EventHandler eh_reset; + /// + /// innalzo evento in base al tipo richiesto + /// + protected void raiseEvent(tipoEvento evReq) { - public event EventHandler eh_selVal; - public event EventHandler eh_reset; - /// - /// innalzo evento in base al tipo richiesto - /// - protected void raiseEvent(tipoEvento evReq) - { - switch (evReq) - { - case tipoEvento.reset: - // raise dell'evento - if (eh_reset != null) - { - eh_reset(this, new EventArgs()); - } - break; - case tipoEvento.selection: - // raise dell'evento - if (eh_selVal != null) - { - eh_selVal(this, new EventArgs()); - } - break; - case tipoEvento.edit: - case tipoEvento.delete: - default: - break; - } - } - protected void Page_Load(object sender, EventArgs e) - { - if(!Page.IsPostBack) - { - mod_righePag.numRowPag = memLayer.ML.CRI("_righeDataGridMed"); - grView.PageSize = mod_righePag.numRowPag; - } - mod_righePag.eh_newNum += Mod_righePag_eh_newNum; - } - /// - /// aggiorno numero righe da mostrare - /// - /// - /// - private void Mod_righePag_eh_newNum(object sender, EventArgs e) - { - grView.PageSize = mod_righePag.numRowPag; - } - - /// - /// aggiorna visualizzazione - /// - /// Idx Macchine - /// Si/No ODL già conclusi - /// Si/No ODL in corso - /// Si/No ODL da attrezzare - /// - /// aggiorna visualizzazione - /// - public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew) - { - hfIdxMulti.Value = idxMulti; - hfClosed.Value = OdlChiusi.ToString(); - hfOpen.Value = OdlAperti.ToString(); - hfNew.Value = OdlNew.ToString(); - grView.DataBind(); - } - /// - /// comando selezione - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - raiseEvent(tipoEvento.selection); - } - /// - /// comando reset - /// - /// - /// - protected void lbtReset_Click(object sender, EventArgs e) - { - grView.SelectedIndex = -1; - grView.DataBind(); - raiseEvent(tipoEvento.reset); - } - /// - /// IdxMacchina selezionata - /// - public string IdxMacchina - { - get - { - string answ = ""; - try - { - answ = grView.SelectedDataKey["IdxMacchina"].ToString(); - } - catch - { } - return answ; - } - } - /// - /// Cod articolo selezionato - /// - public string CodArticolo - { - get - { - string answ = ""; - try - { - answ = grView.SelectedDataKey["CodArticolo"].ToString(); - } - catch - { } - return answ; - } - } - /// - /// formato grafico post verifica qta > 0 - /// - /// - /// - public string cssFromQty(object qty) - { - string answ = ""; - if (Convert.ToInt32(qty) >= 0) - { - answ = "valOk"; - } - else - { - answ = "valKo"; - } - return answ; - } - - protected void grView_Sorted(object sender, EventArgs e) - { - grView.SelectedIndex = -1; - grView.DataBind(); - raiseEvent(tipoEvento.reset); - } - - protected void grView_PageIndexChanged(object sender, EventArgs e) - { - grView.SelectedIndex = -1; - grView.DataBind(); - raiseEvent(tipoEvento.reset); - } - - public string cssByStato(object stato) - { - return string.Format("css_{0}", stato); ; - } + switch (evReq) + { + case tipoEvento.reset: + // raise dell'evento + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + break; + case tipoEvento.selection: + // raise dell'evento + if (eh_selVal != null) + { + eh_selVal(this, new EventArgs()); + } + break; + case tipoEvento.edit: + case tipoEvento.delete: + default: + break; + } } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + mod_AnPro_PODL.Visible = false; + } + mod_AnPro_ODL.eh_selVal += Mod_AnPro_ODL_eh_selVal; + mod_AnPro_ODL.eh_reset += Mod_AnPro_ODL_eh_reset; + } + private void Mod_AnPro_ODL_eh_selVal(object sender, EventArgs e) + { + if (eh_selVal != null) + { + eh_selVal(this, new EventArgs()); + } + } + + private void Mod_AnPro_ODL_eh_reset(object sender, EventArgs e) + { + if (eh_reset != null) + { + eh_reset(this, new EventArgs()); + } + } + + /// + /// aggiorna visualizzazione + /// + /// Idx Macchine + /// Si/No ODL già conclusi + /// Si/No ODL in corso + /// Si/No ODL da attrezzare + /// + /// aggiorna visualizzazione + /// + public void doUpdate(string idxMulti, bool OdlChiusi, bool OdlAperti, bool OdlNew) + { + mod_AnPro_ODL.doUpdate(idxMulti, OdlChiusi, OdlAperti, OdlNew); + mod_AnPro_PODL.Visible = OdlNew; + mod_AnPro_PODL.doUpdate(idxMulti); + } + /// + /// IdxMacchina selezionata + /// + public string IdxMacchina + { + get + { + return mod_AnPro_ODL.IdxMacchina; + } + } + /// + /// Cod articolo selezionato + /// + public string CodArticolo + { + get + { + return mod_AnPro_ODL.CodArticolo; + } + } + + } } \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.designer.cs b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.designer.cs index e9411ade..2a644157 100644 --- a/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.designer.cs +++ b/MP-Site/WebUserControls/mod_AnPro_Totali.ascx.designer.cs @@ -13,66 +13,21 @@ namespace MoonPro.WebUserControls { public partial class mod_AnPro_Totali { /// - /// Controllo grView. + /// Controllo mod_AnPro_ODL. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::System.Web.UI.WebControls.GridView grView; + protected global::MoonPro.WebUserControls.mod_AnPro_ODL mod_AnPro_ODL; /// - /// Controllo ods. + /// Controllo mod_AnPro_PODL. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::System.Web.UI.WebControls.ObjectDataSource ods; - - /// - /// Controllo hfIdxMulti. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.HiddenField hfIdxMulti; - - /// - /// Controllo hfClosed. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.HiddenField hfClosed; - - /// - /// Controllo hfOpen. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.HiddenField hfOpen; - - /// - /// Controllo hfNew. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.HiddenField hfNew; - - /// - /// Controllo mod_righePag. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::MoonPro.WebUserControls.mod_righePag mod_righePag; + protected global::MoonPro.WebUserControls.mod_AnPro_PODL mod_AnPro_PODL; } } diff --git a/MP-Site/WebUserControls/mod_immagineStato.ascx.cs b/MP-Site/WebUserControls/mod_immagineStato.ascx.cs index cf0b1c4a..13ab1e10 100644 --- a/MP-Site/WebUserControls/mod_immagineStato.ascx.cs +++ b/MP-Site/WebUserControls/mod_immagineStato.ascx.cs @@ -4,89 +4,84 @@ using System.Web.UI; namespace MoonPro.WebUserControls { - public partial class mod_immagineStato : System.Web.UI.UserControl + public partial class mod_immagineStato : System.Web.UI.UserControl + { + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) { - #region area protected - - protected resoconti _resoconti; - - protected void Page_Load(object sender, EventArgs e) - { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - } - } - - #endregion - - #region area public - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina - { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = memLayer.ML.QSS("IdxMacchina"); // (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - //set - //{ - // Session["IdxMacchina"] = value; - //} - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string urlMacchina() - { - string urlMacc = ""; - try - { - urlMacc = string.Format("~/images/macchine/{0}", _resoconti.urlMacchina(idxMacchina)); - if (urlMacc == "") - { - urlMacc = "~/images/macchine/okuma.jpg"; - } - } - catch - { - urlMacc = "~/images/macchine/okuma.jpg"; - } - return urlMacc; - } - public void aggiornamento() - { - // sistemo i dati riguardo la macchina - lblMacchina.Text = string.Format("{0} - {1}", _resoconti.nomeMacchina(idxMacchina), statoDaIdx(_resoconti.statoMacchina(idxMacchina))); - //lblMacchina.CssClass = _resoconti.cssDaIdxStato(_resoconti.statoMacchina(idxMacchina)); - imgMacchina.ImageUrl = urlMacchina(); - updateLayout(); - } - /// - /// aggiorna il layout grafico - /// - private void updateLayout() - { - if (idxMacchina != "nd") - { - // in base allo stato recupero il colore... - string codColore = _resoconti.semaforoDaIdxStato(_resoconti.statoMacchina(idxMacchina)); - pnlImg.CssClass = codColore; - } - } - - #endregion + _resoconti = new resoconti(); + if (!Page.IsPostBack) + { + aggiornamento(); + } } + + #endregion + + #region area public + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get + { + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.QSS("IdxMacchina"); + } + catch + { + } + return idxMacchina; + } + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string urlMacchina() + { + string urlMacc = ""; + try + { + urlMacc = string.Format("~/images/macchine/{0}", _resoconti.urlMacchina(idxMacchina)); + if (urlMacc == "") + { + urlMacc = "~/images/macchine/okuma.jpg"; + } + } + catch + { + urlMacc = "~/images/macchine/okuma.jpg"; + } + return urlMacc; + } + public void aggiornamento() + { + // sistemo i dati riguardo la macchina + lblMacchina.Text = string.Format("{0} - {1}", _resoconti.nomeMacchina(idxMacchina), statoDaIdx(_resoconti.statoMacchina(idxMacchina))); + imgMacchina.ImageUrl = urlMacchina(); + updateLayout(); + } + /// + /// aggiorna il layout grafico + /// + private void updateLayout() + { + if (idxMacchina != "nd") + { + // in base allo stato recupero il colore... + string codColore = _resoconti.semaforoDaIdxStato(_resoconti.statoMacchina(idxMacchina)); + pnlImg.CssClass = codColore; + } + } + + #endregion + } } \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs b/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs index 965cf51e..99f4d13e 100644 --- a/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs +++ b/MP-Site/WebUserControls/mod_infoAggiuntive.ascx.cs @@ -4,264 +4,264 @@ using System; namespace MoonPro.WebUserControls { - public partial class mod_infoAggiuntive : System.Web.UI.UserControl + public partial class mod_infoAggiuntive : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) { - protected void Page_Load(object sender, EventArgs e) - { - popolaLabels(); - } - - /// - /// popola le labels - /// - private void popolaLabels() - { - // popolo labels sezione ODL - setLabelsODL(); - // popolo labels sezione periodo selezionato - setLabelsPeriodo(); - } - /// - /// imposta le labels sezione "ODL" - /// - /// - /// - private void setLabelsODL() - { - int odl = 0; - DateTime dataFrom = DateTime.Now; - DateTime dataTo = DateTime.Now; - // label ODL - try - { - DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0]; - odl = rigaOdl.IdxODL; - dataFrom = rigaOdl.DataInizio; - lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", odl, dataFrom); - } - catch - { - lblOdl.Text = "n/a"; - } - /************************************ - * data la postazione corrente decide cosa mostrare e come - ************************************/ - MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaRow rigaProd = DataLayer.obj.taDatiProdMacch.GetData(idxMacchina)[0]; - lblCodArticolo.Text = rigaProd.CodArticolo; - lblNumPzLanciati.Text = string.Format("{0} pz.", rigaProd.PezziLanciati); - lblNumPzConf.Text = string.Format("{0} pz.", rigaProd.PezziConf); - lblNumPzFatti.Text = string.Format("({0} pz.)", rigaProd.PezziProd); - int pezziRimConf = rigaProd.PezziLanciati - rigaProd.PezziConf; - int pezziRim = rigaProd.PezziLanciati - rigaProd.PezziProd; - if (pezziRimConf > 0) - { - lblPezziRestantiConf.Text = string.Format("{0} pz.", pezziRimConf); - } - else - { - pezziRim = 0; - lblPezziRestantiConf.Text = string.Format("!!! {0} !!!", pezziRimConf); - lblPezziRestantiConf.ForeColor = System.Drawing.Color.Red; - } - if (pezziRim > 0) - { - lblPezziRestanti.Text = string.Format("({0} pz.)", pezziRim); - } - else - { - pezziRim = 0; - lblPezziRestanti.Text = string.Format("!!! {0} !!!", pezziRim); - lblPezziRestanti.ForeColor = System.Drawing.Color.Red; - } - /************************************ - * imposto i TEMPI impiegati/rimanenti - ************************************/ - lblTDispImpiegatoConf.Text = string.Format("{0:0.0} h", rigaProd.PezziConf * rigaProd.TCAssegnato / 60); - lblTDispImpiegato.Text = string.Format("({0:0.0} h)", rigaProd.PezziProd * rigaProd.TCAssegnato / 60); - lblTRimanenteConf.Text = string.Format("{0:0.0} h", pezziRimConf * rigaProd.TCAssegnato / 60); - lblTRimanente.Text = string.Format("({0:0.0} h)", pezziRim * rigaProd.TCAssegnato / 60); - - - /************************************ - * calcolo efficienza totale - * se il calcolo non è possibile mette n/a - ************************************/ - decimal tempoProd = rigaProd.TCAssegnato * rigaProd.PezziConf; - try - { - lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoOn / 100)); - } - catch - { - lblEfficienzaTot.Text = "n/a"; - } - // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoAuto / 100)); - } - catch - { - lblEfficienzaLavoro.Text = "n/a"; - - } - // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoRun / 100)); - } - catch - { - lblEfficienzaEff.Text = "n/a"; - } - - /************************************ - * imposto i TEMPI CICLO - ************************************/ - // riporto Tempo ciclo impostato - lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato)); - // riporto Tempo ciclo medio - lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCMedio)); - lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT)); - // riporto Tempo ciclo lavoro - lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCLav)); - lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT)); - // riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore - lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCEff)); - lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT)); - - /************************************ - * Sistemo efficienze RT da tempi ciclo - ************************************/ - try - { - lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT)); - } - catch - { - lblEfficienzaTotRT.Text = "n/a"; - } - // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT)); - } - catch - { - lblEfficienzaLavoroRT.Text = "n/a"; - - } - // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT)); - } - catch - { - lblEfficienzaEffRT.Text = "n/a"; - } - } - /// - /// imposta le labels sezione "Periodo" - /// - /// - /// - private void setLabelsPeriodo() - { - DateTime dataFrom = Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")); - DateTime dataTo = Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")); - lblPeriodo.Text = string.Format("Periodo: {0:dd/MM/yy HH:mm} --> {1:dd/MM/yy HH:mm}", dataFrom, dataTo); - - /************************************ - * recupero dati macchina / periodo - ************************************/ - MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaPeriodoRow rigaProd = DataLayer.obj.taDatiProdMacchPer.GetData(idxMacchina, dataFrom, dataTo)[0]; - - /************************************ - * calcolo pezzi fatti periodo - ************************************/ - int pezziFatti = 0; - try - { - pezziFatti = rigaProd.PezziProd; - } - catch - { - pezziFatti = DataLayer.obj.taTempiCicloRilevati.getByMacchinaPeriodo(idxMacchina, dataFrom, dataTo).Rows.Count; - } - lblNumPzFattiPer.Text = string.Format("({0} pz.)", pezziFatti); - - /************************************ - * imposto i TEMPI CICLO - ************************************/ - // riporto Tempo ciclo impostato - lblTcImpostatoPerRT.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato)); - // riporto Tempo ciclo medio - lblTcMedioPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT)); - // riporto Tempo ciclo lavoro - lblTcLavoroPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT)); - // riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore - lblTcEffettivoPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT)); - - /************************************ - * Sistemo efficienze RT da tempi ciclo - ************************************/ - try - { - lblEfficienzaTotPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT)); - } - catch - { - lblEfficienzaTotPerRT.Text = "n/a"; - } - // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaLavoroPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT)); - } - catch - { - lblEfficienzaLavoroPerRT.Text = "n/a"; - - } - // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a - try - { - lblEfficienzaEffPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT)); - } - catch - { - lblEfficienzaEffPerRT.Text = "n/a"; - } - } - /// - /// idx della macchina da mostrare - /// - public string idxMacchina - { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - /// - /// aggiorna visualizzazione - /// - public void doUpdate() - { - popolaLabels(); - } + popolaLabels(); } + + /// + /// popola le labels + /// + private void popolaLabels() + { + // popolo labels sezione ODL + setLabelsODL(); + // popolo labels sezione periodo selezionato + setLabelsPeriodo(); + } + /// + /// imposta le labels sezione "ODL" + /// + /// + /// + private void setLabelsODL() + { + int odl = 0; + DateTime dataFrom = DateTime.Now; + DateTime dataTo = DateTime.Now; + // label ODL + try + { + DS_ProdTempi.ODLRow rigaOdl = DataLayer.obj.taODL.getByMacchina(idxMacchina)[0]; + odl = rigaOdl.IdxODL; + dataFrom = rigaOdl.DataInizio; + lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", odl, dataFrom); + } + catch + { + lblOdl.Text = "n/a"; + } + /************************************ + * data la postazione corrente decide cosa mostrare e come + ************************************/ + MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaRow rigaProd = DataLayer.obj.taDatiProdMacch.GetData(idxMacchina)[0]; + lblCodArticolo.Text = rigaProd.CodArticolo; + lblNumPzLanciati.Text = string.Format("{0} pz.", rigaProd.PezziLanciati); + lblNumPzConf.Text = string.Format("{0} pz.", rigaProd.PezziConf); + lblNumPzFatti.Text = string.Format("({0} pz.)", rigaProd.PezziProd); + int pezziRimConf = rigaProd.PezziLanciati - rigaProd.PezziConf; + int pezziRim = rigaProd.PezziLanciati - rigaProd.PezziProd; + if (pezziRimConf > 0) + { + lblPezziRestantiConf.Text = string.Format("{0} pz.", pezziRimConf); + } + else + { + pezziRim = 0; + lblPezziRestantiConf.Text = string.Format("!!! {0} !!!", pezziRimConf); + lblPezziRestantiConf.ForeColor = System.Drawing.Color.Red; + } + if (pezziRim > 0) + { + lblPezziRestanti.Text = string.Format("({0} pz.)", pezziRim); + } + else + { + pezziRim = 0; + lblPezziRestanti.Text = string.Format("!!! {0} !!!", pezziRim); + lblPezziRestanti.ForeColor = System.Drawing.Color.Red; + } + /************************************ + * imposto i TEMPI impiegati/rimanenti + ************************************/ + lblTDispImpiegatoConf.Text = string.Format("{0:0.0} h", rigaProd.PezziConf * rigaProd.TCAssegnato / 60); + lblTDispImpiegato.Text = string.Format("({0:0.0} h)", rigaProd.PezziProd * rigaProd.TCAssegnato / 60); + lblTRimanenteConf.Text = string.Format("{0:0.0} h", pezziRimConf * rigaProd.TCAssegnato / 60); + lblTRimanente.Text = string.Format("({0:0.0} h)", pezziRim * rigaProd.TCAssegnato / 60); + + + /************************************ + * calcolo efficienza totale + * se il calcolo non è possibile mette n/a + ************************************/ + decimal tempoProd = rigaProd.TCAssegnato * rigaProd.PezziConf; + try + { + lblEfficienzaTot.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoOn / 100)); + } + catch + { + lblEfficienzaTot.Text = "n/a"; + } + // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaLavoro.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoAuto / 100)); + } + catch + { + lblEfficienzaLavoro.Text = "n/a"; + + } + // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaEff.Text = Convert.ToString(String.Format("{0:p2}", tempoProd / rigaProd.TempoRun / 100)); + } + catch + { + lblEfficienzaEff.Text = "n/a"; + } + + /************************************ + * imposto i TEMPI CICLO + ************************************/ + // riporto Tempo ciclo impostato + lblTcImpostato.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato)); + // riporto Tempo ciclo medio + lblTcMedio.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCMedio)); + lblTcMedioRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT)); + // riporto Tempo ciclo lavoro + lblTcLavoro.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCLav)); + lblTcLavoroRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT)); + // riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore + lblTcEffettivo.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCEff)); + lblTcEffettivoRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT)); + + /************************************ + * Sistemo efficienze RT da tempi ciclo + ************************************/ + try + { + lblEfficienzaTotRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT)); + } + catch + { + lblEfficienzaTotRT.Text = "n/a"; + } + // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaLavoroRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT)); + } + catch + { + lblEfficienzaLavoroRT.Text = "n/a"; + + } + // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaEffRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT)); + } + catch + { + lblEfficienzaEffRT.Text = "n/a"; + } + } + /// + /// imposta le labels sezione "Periodo" + /// + /// + /// + private void setLabelsPeriodo() + { + DateTime dataFrom = Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")); + DateTime dataTo = Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")); + lblPeriodo.Text = string.Format("Periodo: {0:dd/MM/yy HH:mm} --> {1:dd/MM/yy HH:mm}", dataFrom, dataTo); + + /************************************ + * recupero dati macchina / periodo + ************************************/ + MapoDb.DS_ProdTempi.stp_repDonati_getDatiProdMacchinaPeriodoRow rigaProd = DataLayer.obj.taDatiProdMacchPer.GetData(idxMacchina, dataFrom, dataTo)[0]; + + /************************************ + * calcolo pezzi fatti periodo + ************************************/ + int pezziFatti = 0; + try + { + pezziFatti = rigaProd.PezziProd; + } + catch + { + pezziFatti = DataLayer.obj.taTempiCicloRilevati.getByMacchinaPeriodo(idxMacchina, dataFrom, dataTo).Rows.Count; + } + lblNumPzFattiPer.Text = string.Format("({0} pz.)", pezziFatti); + + /************************************ + * imposto i TEMPI CICLO + ************************************/ + // riporto Tempo ciclo impostato + lblTcImpostatoPerRT.Text = Convert.ToString(String.Format("{0:0.###}", rigaProd.TCAssegnato)); + // riporto Tempo ciclo medio + lblTcMedioPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCMedioRT)); + // riporto Tempo ciclo lavoro + lblTcLavoroPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCLavRT)); + // riporto Tempo ciclo effettivo/tecnico, come media dei 10 migliori delle ultime 8 ore + lblTcEffettivoPerRT.Text = Convert.ToString(String.Format("({0:0.###})", rigaProd.TCEffRT)); + + /************************************ + * Sistemo efficienze RT da tempi ciclo + ************************************/ + try + { + lblEfficienzaTotPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCMedioRT)); + } + catch + { + lblEfficienzaTotPerRT.Text = "n/a"; + } + // calcolo efficienza lavoro - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaLavoroPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCLavRT)); + } + catch + { + lblEfficienzaLavoroPerRT.Text = "n/a"; + + } + // calcolo efficienza Teorica - se il calcolo non è possibile mette n/a + try + { + lblEfficienzaEffPerRT.Text = Convert.ToString(String.Format("({0:p2})", rigaProd.TCAssegnato / rigaProd.TCEffRT)); + } + catch + { + lblEfficienzaEffPerRT.Text = "n/a"; + } + } + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get + { + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; + } + set + { + memLayer.ML.setSessionVal("IdxMacchina", value); + } + } + /// + /// aggiorna visualizzazione + /// + public void doUpdate() + { + popolaLabels(); + } + } } \ 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 42b9ff08..889ad477 100644 --- a/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs +++ b/MP-Site/WebUserControls/mod_listaStatiEventi.ascx.cs @@ -56,7 +56,7 @@ namespace MoonPro.WebUserControls string idxMacchina = "1"; try { - idxMacchina = (string)Session["IdxMacchina"]; + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); } catch { @@ -65,7 +65,7 @@ namespace MoonPro.WebUserControls } set { - Session["IdxMacchina"] = value; + memLayer.ML.setSessionVal("IdxMacchina", value); } } public string statoDaIdx(object idx) diff --git a/MP-Site/WebUserControls/mod_menuTop.ascx.cs b/MP-Site/WebUserControls/mod_menuTop.ascx.cs index ad66ce3d..4828845f 100644 --- a/MP-Site/WebUserControls/mod_menuTop.ascx.cs +++ b/MP-Site/WebUserControls/mod_menuTop.ascx.cs @@ -5,189 +5,182 @@ using System.Web.UI; namespace MoonPro.WebUserControls { - public partial class mod_menuTop : System.Web.UI.UserControl + public partial class mod_menuTop : System.Web.UI.UserControl + { + private string _titleString; + + #region gestione eventi + + public event EventHandler eh_toggleMenuSx; + public event EventHandler eh_reqUpdateMenu; + + #endregion + + protected void Page_Load(object sender, EventArgs e) { - private string _titleString; + btnLogOut.Visible = user_std.UtSn.isForcedUser; + if (memLayer.ML.isInSessionObject("doUpdateNow")) + { + doFullDataUpdate(); + memLayer.ML.emptySessionVal("doUpdateNow"); + } + } + protected void btnLogOut_Click(object sender, EventArgs e) + { + Session.Abandon(); + Response.Redirect("forceUser.aspx"); + } + protected void btnUpdate_Click(object sender, EventArgs e) + { + doFullDataUpdate(); + updateWindowSize(); + } - #region gestione eventi + private void doFullDataUpdate() + { + // salvo i dati attuali... + string cod_cdc = SteamWare.memLayer.ML.StringSessionObj("valRicercaCdC"); + string lingua = user_std.UtSn.lingua; + string USER_NAME = SteamWare.memLayer.ML.StringSessionObj("USER_NAME"); + string DOMINIO = SteamWare.memLayer.ML.StringSessionObj("DOMINIO"); + bool isForceUser = user_std.UtSn.isForcedUser; + // salvo i valori delle tab in session... + Dictionary sessionParam = SteamWare.memLayer.ML.valSess2SurvUpd; - public event EventHandler eh_toggleMenuSx; - public event EventHandler eh_reqUpdateMenu; + // svuoto session e cache per rileggere i dati da Db + Session.RemoveAll(); - #endregion + SteamWare.memLayer.ML.flushRegisteredCache(); - protected void Page_Load(object sender, EventArgs e) + // rimemorizzo + SteamWare.memLayer.ML.setSessionVal("valRicercaCdC", cod_cdc); + user_std.UtSn.startUpUtente(DOMINIO, USER_NAME); + user_std.UtSn.lingua = lingua; + user_std.UtSn.isForcedUser = isForceUser; + DataWrap.DW.resetVocabolario(); + + // risalvo in session i valori... + foreach (KeyValuePair kvp in sessionParam) + { + SteamWare.memLayer.ML.setSessionVal(kvp.Key, kvp.Value, true); + } + + // cambio visibilità del menù laterale... + if (eh_reqUpdateMenu != null) + { + eh_reqUpdateMenu(this, new EventArgs()); + } + if (memLayer.ML.confReadBool("UpdateToDefault")) + { + Response.Redirect("Default.aspx"); + } + else + { + Response.Redirect(Page.Request.Url.ToString()); + } + } + + protected void bindControlli() + { + if (!Page.IsPostBack) + { + //lnkHelp.ToolTip = traduci("ApriManualeHelp"); + // solo se user è auth... + if (user_std.UtSn.isAuth) { - btnLogOut.Visible = user_std.UtSn.isForcedUser; - if (memLayer.ML.isInSessionObject("doUpdateNow")) - { - doFullDataUpdate(); - memLayer.ML.emptySessionVal("doUpdateNow"); - } + //lnkShowHide.Text = user_std.UtSn.Traduci("lnkShowHide"); + //lblTitle.Text = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("titleApp")); + if (_titleString != "") + { + _titleString = ""; + memLayer.ML.setSessionVal("_titleString",_titleString); + memLayer.ML.setSessionVal("SessionUpdateMenu", true); + } + else + { + memLayer.ML.setSessionVal("SessionUpdateMenu", false); + } + btnLogOut.Text = user_std.UtSn.Traduci("LogOut"); + btnUpdate.Text = user_std.UtSn.Traduci("Update"); + //lblUser.Text = String.Format("{0}: {1}", user_std.UtSn.Traduci("User"), user_std.UtSn.CognomeNome); + setTimer(); + setClock(); } - protected void btnLogOut_Click(object sender, EventArgs e) - { - Session.Abandon(); - Response.Redirect("forceUser.aspx"); - } - protected void btnUpdate_Click(object sender, EventArgs e) - { - doFullDataUpdate(); - updateWindowSize(); - } - - private void doFullDataUpdate() - { - // salvo i dati attuali... - string cod_cdc = SteamWare.memLayer.ML.StringSessionObj("valRicercaCdC"); - string lingua = user_std.UtSn.lingua; - string USER_NAME = SteamWare.memLayer.ML.StringSessionObj("USER_NAME"); - string DOMINIO = SteamWare.memLayer.ML.StringSessionObj("DOMINIO"); - bool isForceUser = user_std.UtSn.isForcedUser; - // salvo i valori delle tab in session... - Dictionary sessionParam = SteamWare.memLayer.ML.valSess2SurvUpd; - - // svuoto session e cache per rileggere i dati da Db - Session.RemoveAll(); - - SteamWare.memLayer.ML.flushRegisteredCache(); - - // rimemorizzo - SteamWare.memLayer.ML.setSessionVal("valRicercaCdC", cod_cdc); - user_std.UtSn.startUpUtente(DOMINIO, USER_NAME); - user_std.UtSn.lingua = lingua; - user_std.UtSn.isForcedUser = isForceUser; - DataWrap.DW.resetVocabolario(); - - // risalvo in session i valori... - foreach (KeyValuePair kvp in sessionParam) - { - SteamWare.memLayer.ML.setSessionVal(kvp.Key, kvp.Value, true); - } - - // cambio visibilità del menù laterale... - if (eh_reqUpdateMenu != null) - { - eh_reqUpdateMenu(this, new EventArgs()); - } - if (memLayer.ML.confReadBool("UpdateToDefault")) - { - Response.Redirect("Default.aspx"); - } - else - { - Response.Redirect(Page.Request.Url.ToString()); - } - } - - protected void bindControlli() - { - if (!Page.IsPostBack) - { - //lnkHelp.ToolTip = traduci("ApriManualeHelp"); - // solo se user è auth... - if (user_std.UtSn.isAuth) - { - //lnkShowHide.Text = user_std.UtSn.Traduci("lnkShowHide"); - //lblTitle.Text = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("titleApp")); - if (_titleString != "") - { - //// traduzione di tutti i termini - //lblMessUtente.Text = user_std.UtSn.Traduci(_titleString); - ////doppio in english! - //lblMessUtenteEn.Text = "(" + user_std.UtSn.TraduciEn(_titleString) + ")"; - _titleString = ""; - Session["_titleString"] = _titleString; - Session["SessionUpdateMenu"] = true; - } - else - { - //string titolo = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("welcomeApp")); - //lblMessUtente.Text = string.Format("{0} - {1}", titolo, memLayer.ML.confReadString("SiteName")); - //lblMessUtenteEn.Text = ""; - Session["SessionUpdateMenu"] = false; - } - btnLogOut.Text = user_std.UtSn.Traduci("LogOut"); - btnUpdate.Text = user_std.UtSn.Traduci("Update"); - //lblUser.Text = String.Format("{0}: {1}", user_std.UtSn.Traduci("User"), user_std.UtSn.CognomeNome); - setTimer(); - setClock(); - } - } - } - /// - /// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada - /// - private void setTimer() - { - //Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms"); - } - protected void lnkShowHide_Click(object sender, EventArgs e) - { - // cambio visibilità del menù laterale... - if (eh_toggleMenuSx != null) - { - eh_toggleMenuSx(this, new EventArgs()); - } - - } - protected void Timer1_Tick(object sender, EventArgs e) - { - setClock(); - } - - private void setClock() - { - //lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss"); - } - protected void lblUser_Click(object sender, EventArgs e) - { - Response.Redirect("./chLang.aspx"); - } - - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - btnUpdate.Text = "Update"; - updateWindowSize(); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - } - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - } - - private void updateWindowSize() - { - if (HiddenHeight.Value != "") - { - memLayer.ML.setSessionVal("WindowHeight", HiddenHeight.Value, true); - } - if (HiddenWidth.Value != "") - { - memLayer.ML.setSessionVal("WindowWidth", HiddenWidth.Value); - } - } - - public string scriviOra() - { - return string.Format("{0:d} - {0:HH.mm.ss}", DateTime.Now); - } - protected void HiddenHeight_ValueChanged(object sender, EventArgs e) - { - updateWindowSize(); - } - - protected void HiddenWidth_ValueChanged(object sender, EventArgs e) - { - updateWindowSize(); - } - + } + } + /// + /// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada + /// + private void setTimer() + { + //Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms"); + } + protected void lnkShowHide_Click(object sender, EventArgs e) + { + // cambio visibilità del menù laterale... + if (eh_toggleMenuSx != null) + { + eh_toggleMenuSx(this, new EventArgs()); + } } + protected void Timer1_Tick(object sender, EventArgs e) + { + setClock(); + } + + private void setClock() + { + //lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss"); + } + protected void lblUser_Click(object sender, EventArgs e) + { + Response.Redirect("./chLang.aspx"); + } + + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + btnUpdate.Text = "Update"; + updateWindowSize(); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + } + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + } + + private void updateWindowSize() + { + if (HiddenHeight.Value != "") + { + memLayer.ML.setSessionVal("WindowHeight", HiddenHeight.Value, true); + } + if (HiddenWidth.Value != "") + { + memLayer.ML.setSessionVal("WindowWidth", HiddenWidth.Value); + } + } + + public string scriviOra() + { + return string.Format("{0:d} - {0:HH.mm.ss}", DateTime.Now); + } + protected void HiddenHeight_ValueChanged(object sender, EventArgs e) + { + updateWindowSize(); + } + + protected void HiddenWidth_ValueChanged(object sender, EventArgs e) + { + updateWindowSize(); + } + + + } } \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs b/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs index 328e1894..76eb34df 100644 --- a/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs +++ b/MP-Site/WebUserControls/mod_periodoAnalisi.ascx.cs @@ -100,30 +100,30 @@ namespace MoonPro.WebUserControls intervalloDate _intervallo; try { - _intervallo = (intervalloDate)Session["_intervallo"]; + _intervallo = (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); } catch { _intervallo = new intervalloDate(); _intervallo.inizio = DateTime.Now.AddDays(-7); _intervallo.fine = DateTime.Now; - Session["_intervallo"] = _intervallo; - Session["_inizio"] = _intervallo.inizio; - Session["_fine"] = _intervallo.fine; + memLayer.ML.setSessionVal("_intervallo", _intervallo); + memLayer.ML.setSessionVal("_inizio", _intervallo.inizio); + memLayer.ML.setSessionVal("_fine", _intervallo.fine); } scriviDate(); } private void setDurataMin() { int _durataMin; - try + if (memLayer.ML.isInSessionObject("_durataMin")) { - _durataMin = (int)Session["_durataMin"]; + _durataMin = memLayer.ML.IntSessionObj("_durataMin"); } - catch + else { _durataMin = 0; - Session["_durataMin"] = _durataMin; + memLayer.ML.setSessionVal("_durataMin", _durataMin); } txtDurataMin.Text = _durataMin.ToString(); } @@ -149,7 +149,7 @@ namespace MoonPro.WebUserControls verificaCoerenzaDate(); int _durataMin; _durataMin = Convert.ToInt32(txtDurataMin.Text); - Session["_durataMin"] = _durataMin; + memLayer.ML.setSessionVal("_durataMin", _durataMin); reportUpdate(); } @@ -227,14 +227,14 @@ namespace MoonPro.WebUserControls { get { - return (intervalloDate)Session["_intervallo"]; + return (intervalloDate)memLayer.ML.objSessionObj("_intervallo"); } set { intervalloDate interv = value; - Session["_intervallo"] = interv; - Session["_inizio"] = interv.inizio; - Session["_fine"] = interv.fine; + memLayer.ML.setSessionVal("_intervallo", interv); + memLayer.ML.setSessionVal("_inizio", interv.inizio); + memLayer.ML.setSessionVal("_fine", interv.fine); } } /// diff --git a/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs b/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs index 97654715..2c46b656 100644 --- a/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs +++ b/MP-Site/WebUserControls/mod_sequencerStati.ascx.cs @@ -65,7 +65,7 @@ namespace MoonPro.WebUserControls try { // è la somma dei minuti totali dall'inizio alla fine... - totale = ((TimeSpan)_grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio)).TotalMinutes; + totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes; } catch { } @@ -137,7 +137,7 @@ namespace MoonPro.WebUserControls double valore = 0; //DataLayer_generic.serieDatiRow rigaPrec = (DataLayer_generic.serieDatiRow)datiSequencer.serieDati[0]; //foreach (DataLayer_generic.serieDatiRow riga in datiSequencer.serieDati) - DataLayer_generic.serieDatiRow rigaPrec = (DataLayer_generic.serieDatiRow)dati[0]; + DataLayer_generic.serieDatiRow rigaPrec = dati[0]; string codV = memLayer.ML.confReadString("codV"); string codG = memLayer.ML.confReadString("codG"); string codR = memLayer.ML.confReadString("codR"); @@ -172,7 +172,7 @@ namespace MoonPro.WebUserControls fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore); accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS); // aggiungo ultimo dato che è stato escluso - rigaPrec = (DataLayer_generic.serieDatiRow)dati[dati.Rows.Count - 1]; + rigaPrec = dati[dati.Rows.Count - 1]; inizio = rigaPrec.timeData; fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore); accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS); @@ -242,7 +242,7 @@ namespace MoonPro.WebUserControls { LinkButton lnk = (LinkButton)sender; // calcolo il giorno... - Session["dataZoom"] = lnk.CommandArgument.ToString();//Convert.ToDateTime + memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString()); if (eh_richiestaZoom != null) { eh_richiestaZoom(this, new EventArgs()); @@ -511,7 +511,7 @@ namespace MoonPro.WebUserControls // alzo evento if (eh_richiestaZoom != null) { - ImageMapEventArgs evIM = (ImageMapEventArgs)e; + ImageMapEventArgs evIM = e; // salvo in sessione memLayer.ML.setSessionVal("zoomCenter", e.PostBackValue); eh_richiestaZoom(this, new EventArgs()); diff --git a/MP-Site/WebUserControls/mod_sequencerTempiCiclo.ascx.cs b/MP-Site/WebUserControls/mod_sequencerTempiCiclo.ascx.cs index 757fdaef..1fa804e1 100644 --- a/MP-Site/WebUserControls/mod_sequencerTempiCiclo.ascx.cs +++ b/MP-Site/WebUserControls/mod_sequencerTempiCiclo.ascx.cs @@ -6,355 +6,355 @@ using System.Web.UI.WebControls; namespace MoonPro.WebUserControls { - public partial class mod_sequencerTempiCiclo : System.Web.UI.UserControl + public partial class mod_sequencerTempiCiclo : System.Web.UI.UserControl + { + #region proprietà + + protected int _timeSplits = 10; + protected double _minVal = 0.5; + /// + /// totale in minuti da plottare + /// + protected double totale = 1; + /// + /// valore minimo da plottare + /// + public double min2plot { get; set; } + /// + /// titolo del grafico + /// + public string titolo { get; set; } + /// + /// larghezza totale del grafico + /// + public int larghezza { get; set; } + /// + /// numero dei segmenti del grafico + /// + public int numSplit { get; set; } + /// + /// % minuma nel periodo per dire che sia verde + /// + public double minVal { get; set; } + /// + /// definisce se plottare "reversed" (ovvero i valori "minimi" sono con barre + alte dei massimi, come se vosse apssare da tempo a velocità...) + /// + public bool plotReversed { get; set; } + /// + /// altezza max grafico + /// + public int graphHeight { get; set; } + + #endregion + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { - #region proprietà - - protected int _timeSplits = 10; - protected double _minVal = 0.5; - /// - /// totale in minuti da plottare - /// - protected double totale = 1; - /// - /// valore minimo da plottare - /// - public double min2plot { get; set; } - /// - /// titolo del grafico - /// - public string titolo { get; set; } - /// - /// larghezza totale del grafico - /// - public int larghezza { get; set; } - /// - /// numero dei segmenti del grafico - /// - public int numSplit { get; set; } - /// - /// % minuma nel periodo per dire che sia verde - /// - public double minVal { get; set; } - /// - /// definisce se plottare "reversed" (ovvero i valori "minimi" sono con barre + alte dei massimi, come se vosse apssare da tempo a velocità...) - /// - public bool plotReversed { get; set; } - /// - /// altezza max grafico - /// - public int graphHeight { get; set; } - - #endregion - - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - // setup valori - min2plot = 0.0; - titolo = "TempiCiclo"; - doUpdate(); - } - } - /// - /// disegna la tabella - /// - protected void plottaGrafico() - { - // a seconda del numero di eventi da plottare decido la procedura... - DataLayer_generic.serieTimeValDataTable dati = _grafico.serieDati; - try - { - // è la somma dei minuti totali dall'inizio alla fine... - totale = ((TimeSpan)_grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio)).TotalMinutes; - } - catch - { } - - plottaDettaglio(dati); - } - - /// - /// popola il sequencer degli stati riportando tutti i singoli valori - /// - /// - /// - private void plottaDettaglio(DataLayer_generic.serieTimeValDataTable dati) - { - // definizioni x chart - Chart1.Width = larghezza; - Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All; - Chart1.Height = graphHeight; - // definizione intervallo asse Y (che qui è anche asse X... - Chart1.ChartAreas["TempiCiclo"].AxisX.Minimum = _grafico.intervallo.inizio.ToOADate(); - Chart1.ChartAreas["TempiCiclo"].AxisX.Maximum = _grafico.intervallo.fine.ToOADate(); - LabelStyle lbst = new LabelStyle(); - lbst.Format = "HH:mm"; - Chart1.ChartAreas["TempiCiclo"].AxisX.LabelStyle = lbst; - - // definizioni x chart area tempi ciclo - Chart1.ChartAreas["TempiCiclo"].AxisY.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False; - Chart1.ChartAreas["TempiCiclo"].AxisY.IsLogarithmic = false; - Chart1.ChartAreas["TempiCiclo"].AxisY.IsReversed = true; - - - string tipo_A = ""; - string tipo_B = ""; - decimal ratioTC; - decimal deltaValori = grafico.maxVal - grafico.minVal; - foreach (DataLayer_generic.serieTimeValRow riga in _grafico.serieDati) - { - - ratioTC = riga.valore; - - // a seconda del tipo aggiungo all'una o all'altra serie... - if (grafico.palletChange) - { - // controllo per inizializzare i 2 tipi... - if (tipo_A == "") - { - tipo_A = riga.tipo; - if (Chart1.Series.Count < 1) - { - Chart1.Series.Add(tipo_A); - } - } - else if (tipo_B == "" && riga.tipo != tipo_A) - { - tipo_B = riga.tipo; - if (Chart1.Series.Count < 2) - { - // provo ad aggiungere nuova... - try - { - Chart1.Series.Add(tipo_B); - } - // ... sennò aggiungo vecchia serie - catch - { - Chart1.Series.Add(tipo_A); - } - } - } - // definisco colori - if (riga.tipo == tipo_A) - { - try - { - Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC); - } - catch - { - Chart1.Series[0].Points.AddXY(riga.DataEnd, ratioTC); - } - } - else - { - try - { - Chart1.Series[tipo_B].Points.AddXY(riga.DataEnd, ratioTC); - } - catch - { - Chart1.Series[1].Points.AddXY(riga.DataEnd, ratioTC); - } - } - } - else // unica serie - { - if (tipo_A == "") - { - tipo_A = riga.tipo; - if (Chart1.Series.Count < 1) - { - Chart1.Series.Add(tipo_A); - } - } - Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC); - } - } - - if (Chart1.Series.Count > 0) - { - // disegno plot nuovo... - try - { - Chart1.Series[tipo_A].XValueType = ChartValueType.DateTime; - Chart1.Series[tipo_A].ChartType = SeriesChartType.FastPoint; - } - catch - { - Chart1.Series[0].XValueType = ChartValueType.DateTime; - Chart1.Series[0].ChartType = SeriesChartType.FastPoint; - } - if (Chart1.Series.Count > 1) - { - try - { - Chart1.Series[tipo_B].XValueType = ChartValueType.DateTime; - Chart1.Series[tipo_B].ChartType = SeriesChartType.FastPoint; - } - catch - { - Chart1.Series[1].XValueType = ChartValueType.DateTime; - Chart1.Series[1].ChartType = SeriesChartType.FastPoint; - } - } - } - } - /// - /// calcola il rapporto tr ail valore e le grandezze reali dato masismo, intervallo, apdding, plot regolare o reversed... - /// - /// - /// - /// - /// - /// - protected decimal calcolaRatio(decimal valore, decimal maxVal, decimal deltaValori, bool plotReversed, decimal padding) - { - decimal answ = 0; - if (plotReversed) - { - answ = (padding + ((1 - 2 * padding) * ((maxVal - valore) / (deltaValori)))); - } - else - { - answ = (padding + ((1 - 2 * padding) * ((valore - maxVal) / (deltaValori)))); - } - return answ; - } - - /// - /// intercetta richiesta di zoom e zoomma sul giorno in esame... - /// - /// - /// - void lnkb_Click(object sender, EventArgs e) - { - LinkButton lnk = (LinkButton)sender; - // calcolo il giorno... - Session["dataZoom"] = lnk.CommandArgument.ToString();//Convert.ToDateTime - if (eh_richiestaZoom != null) - { - eh_richiestaZoom(this, new EventArgs()); - } - } - /// - /// popola il sequencer degli stati raggruppando perché troppi valori secondo MEDIA ARMONICA - /// - /// - /// - private void plottaGruppiMediaArmonica(DataLayer_generic.serieTimeValDataTable dati) - { - // creo oggetto x contenere i dati "mediati" - DataLayer_generic.serieTimeValDataTable datiGrouped = new DataLayer_generic.serieTimeValDataTable(); - // calcolo il val minimo da plottare (come ampiezza) - decimal ampiezzaMin = (decimal)totale / numSplit; - // setup valori iniziali - decimal valoreCurr = (decimal)0.0; - decimal valoreMedio = (decimal)1.0; - DateTime timeRaggiunto = _grafico.intervallo.inizio; - decimal ampiezzaCurr = (decimal)0.0; - decimal ampiezzaMedia = (decimal)0.0; - string label = ""; - // ciclo x tutti i record - foreach (DataLayer_generic.serieTimeValRow riga in dati) - { - // calcolo nuova ampiezza - ampiezzaCurr = (decimal)((TimeSpan)riga.DataEnd.Subtract(riga.DataStart)).TotalMinutes; - //...e calcolo nuovo valore medio... - valoreCurr = riga.valore; - // calcolo media armonica - valoreMedio = ((ampiezzaCurr + ampiezzaMedia) / (ampiezzaMedia / valoreMedio + ampiezzaCurr / valoreCurr)); - ampiezzaMedia = ampiezzaCurr + ampiezzaMedia; - // se supero il limite aggiungo in tabella, sennò proseguo... - if (ampiezzaMedia > ampiezzaMin) - { - label = string.Format("TC: {0} min/pz", valoreMedio); - datiGrouped.AddserieTimeValRow(timeRaggiunto, riga.DataEnd, valoreMedio, label, "TC"); - // resetto - timeRaggiunto = riga.DataEnd; - ampiezzaMedia = (decimal)0.0; - valoreMedio = (decimal)1.0; - } - } - _grafico.palletChange = false; - plottaDettaglio(datiGrouped); - } - /// - /// restituisce true se ci sono dati... - /// - /// - protected bool datiPresenti() - { - bool answ = false; - try - { - int numCelle = grafico.serieDati.Rows.Count; - answ = (numCelle > 0); - } - catch - { } - return answ; - } - /// - /// oggetto protected - /// - protected objTempiCiclo _grafico; - /// - /// elemento grafico da plottare - /// - public objTempiCiclo grafico - { - get - { - return _grafico; - } - set - { - _grafico = value; - } - } - - /// - /// aggiorna il controllo - /// - public void doUpdate() - { - if (datiPresenti()) - { - plottaGrafico(); - } - else - { - // non plotto - } - } - - /// - /// evento di richeista zoom sui dati - /// - public event EventHandler eh_richiestaZoom; - /// - /// evento di click x zoom - /// - /// - /// - protected void Chart1_Click(object sender, ImageMapEventArgs e) - { - // alzo evento - if (eh_richiestaZoom != null) - { - eh_richiestaZoom(this, new EventArgs()); - } - } - - + if (!Page.IsPostBack) + { + // setup valori + min2plot = 0.0; + titolo = "TempiCiclo"; + doUpdate(); + } } + /// + /// disegna la tabella + /// + protected void plottaGrafico() + { + // a seconda del numero di eventi da plottare decido la procedura... + DataLayer_generic.serieTimeValDataTable dati = _grafico.serieDati; + try + { + // è la somma dei minuti totali dall'inizio alla fine... + totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes; + } + catch + { } + + plottaDettaglio(dati); + } + + /// + /// popola il sequencer degli stati riportando tutti i singoli valori + /// + /// + /// + private void plottaDettaglio(DataLayer_generic.serieTimeValDataTable dati) + { + // definizioni x chart + Chart1.Width = larghezza; + Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All; + Chart1.Height = graphHeight; + // definizione intervallo asse Y (che qui è anche asse X... + Chart1.ChartAreas["TempiCiclo"].AxisX.Minimum = _grafico.intervallo.inizio.ToOADate(); + Chart1.ChartAreas["TempiCiclo"].AxisX.Maximum = _grafico.intervallo.fine.ToOADate(); + LabelStyle lbst = new LabelStyle(); + lbst.Format = "HH:mm"; + Chart1.ChartAreas["TempiCiclo"].AxisX.LabelStyle = lbst; + + // definizioni x chart area tempi ciclo + Chart1.ChartAreas["TempiCiclo"].AxisY.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False; + Chart1.ChartAreas["TempiCiclo"].AxisY.IsLogarithmic = false; + Chart1.ChartAreas["TempiCiclo"].AxisY.IsReversed = true; + + + string tipo_A = ""; + string tipo_B = ""; + decimal ratioTC; + decimal deltaValori = grafico.maxVal - grafico.minVal; + foreach (DataLayer_generic.serieTimeValRow riga in _grafico.serieDati) + { + + ratioTC = riga.valore; + + // a seconda del tipo aggiungo all'una o all'altra serie... + if (grafico.palletChange) + { + // controllo per inizializzare i 2 tipi... + if (tipo_A == "") + { + tipo_A = riga.tipo; + if (Chart1.Series.Count < 1) + { + Chart1.Series.Add(tipo_A); + } + } + else if (tipo_B == "" && riga.tipo != tipo_A) + { + tipo_B = riga.tipo; + if (Chart1.Series.Count < 2) + { + // provo ad aggiungere nuova... + try + { + Chart1.Series.Add(tipo_B); + } + // ... sennò aggiungo vecchia serie + catch + { + Chart1.Series.Add(tipo_A); + } + } + } + // definisco colori + if (riga.tipo == tipo_A) + { + try + { + Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC); + } + catch + { + Chart1.Series[0].Points.AddXY(riga.DataEnd, ratioTC); + } + } + else + { + try + { + Chart1.Series[tipo_B].Points.AddXY(riga.DataEnd, ratioTC); + } + catch + { + Chart1.Series[1].Points.AddXY(riga.DataEnd, ratioTC); + } + } + } + else // unica serie + { + if (tipo_A == "") + { + tipo_A = riga.tipo; + if (Chart1.Series.Count < 1) + { + Chart1.Series.Add(tipo_A); + } + } + Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC); + } + } + + if (Chart1.Series.Count > 0) + { + // disegno plot nuovo... + try + { + Chart1.Series[tipo_A].XValueType = ChartValueType.DateTime; + Chart1.Series[tipo_A].ChartType = SeriesChartType.FastPoint; + } + catch + { + Chart1.Series[0].XValueType = ChartValueType.DateTime; + Chart1.Series[0].ChartType = SeriesChartType.FastPoint; + } + if (Chart1.Series.Count > 1) + { + try + { + Chart1.Series[tipo_B].XValueType = ChartValueType.DateTime; + Chart1.Series[tipo_B].ChartType = SeriesChartType.FastPoint; + } + catch + { + Chart1.Series[1].XValueType = ChartValueType.DateTime; + Chart1.Series[1].ChartType = SeriesChartType.FastPoint; + } + } + } + } + /// + /// calcola il rapporto tr ail valore e le grandezze reali dato masismo, intervallo, apdding, plot regolare o reversed... + /// + /// + /// + /// + /// + /// + protected decimal calcolaRatio(decimal valore, decimal maxVal, decimal deltaValori, bool plotReversed, decimal padding) + { + decimal answ = 0; + if (plotReversed) + { + answ = (padding + ((1 - 2 * padding) * ((maxVal - valore) / (deltaValori)))); + } + else + { + answ = (padding + ((1 - 2 * padding) * ((valore - maxVal) / (deltaValori)))); + } + return answ; + } + + /// + /// intercetta richiesta di zoom e zoomma sul giorno in esame... + /// + /// + /// + void lnkb_Click(object sender, EventArgs e) + { + LinkButton lnk = (LinkButton)sender; + // calcolo il giorno... + memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString()); + if (eh_richiestaZoom != null) + { + eh_richiestaZoom(this, new EventArgs()); + } + } + /// + /// popola il sequencer degli stati raggruppando perché troppi valori secondo MEDIA ARMONICA + /// + /// + /// + private void plottaGruppiMediaArmonica(DataLayer_generic.serieTimeValDataTable dati) + { + // creo oggetto x contenere i dati "mediati" + DataLayer_generic.serieTimeValDataTable datiGrouped = new DataLayer_generic.serieTimeValDataTable(); + // calcolo il val minimo da plottare (come ampiezza) + decimal ampiezzaMin = (decimal)totale / numSplit; + // setup valori iniziali + decimal valoreCurr = (decimal)0.0; + decimal valoreMedio = (decimal)1.0; + DateTime timeRaggiunto = _grafico.intervallo.inizio; + decimal ampiezzaCurr = (decimal)0.0; + decimal ampiezzaMedia = (decimal)0.0; + string label = ""; + // ciclo x tutti i record + foreach (DataLayer_generic.serieTimeValRow riga in dati) + { + // calcolo nuova ampiezza + ampiezzaCurr = (decimal)riga.DataEnd.Subtract(riga.DataStart).TotalMinutes; + //...e calcolo nuovo valore medio... + valoreCurr = riga.valore; + // calcolo media armonica + valoreMedio = ((ampiezzaCurr + ampiezzaMedia) / (ampiezzaMedia / valoreMedio + ampiezzaCurr / valoreCurr)); + ampiezzaMedia = ampiezzaCurr + ampiezzaMedia; + // se supero il limite aggiungo in tabella, sennò proseguo... + if (ampiezzaMedia > ampiezzaMin) + { + label = string.Format("TC: {0} min/pz", valoreMedio); + datiGrouped.AddserieTimeValRow(timeRaggiunto, riga.DataEnd, valoreMedio, label, "TC"); + // resetto + timeRaggiunto = riga.DataEnd; + ampiezzaMedia = (decimal)0.0; + valoreMedio = (decimal)1.0; + } + } + _grafico.palletChange = false; + plottaDettaglio(datiGrouped); + } + /// + /// restituisce true se ci sono dati... + /// + /// + protected bool datiPresenti() + { + bool answ = false; + try + { + int numCelle = grafico.serieDati.Rows.Count; + answ = (numCelle > 0); + } + catch + { } + return answ; + } + /// + /// oggetto protected + /// + protected objTempiCiclo _grafico; + /// + /// elemento grafico da plottare + /// + public objTempiCiclo grafico + { + get + { + return _grafico; + } + set + { + _grafico = value; + } + } + + /// + /// aggiorna il controllo + /// + public void doUpdate() + { + if (datiPresenti()) + { + plottaGrafico(); + } + else + { + // non plotto + } + } + + /// + /// evento di richeista zoom sui dati + /// + public event EventHandler eh_richiestaZoom; + /// + /// evento di click x zoom + /// + /// + /// + protected void Chart1_Click(object sender, ImageMapEventArgs e) + { + // alzo evento + if (eh_richiestaZoom != null) + { + eh_richiestaZoom(this, new EventArgs()); + } + } + + + } } \ No newline at end of file diff --git a/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs b/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs index 167eb29b..1af9d50c 100644 --- a/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs +++ b/MP-Site/WebUserControls/mod_statoMacchina.ascx.cs @@ -1,4 +1,5 @@ using MapoDb; +using SteamWare; using System; namespace MoonPro.WebUserControls @@ -66,7 +67,7 @@ namespace MoonPro.WebUserControls { // popolazione tabelle tabMSE = MapoDb.DataLayer.obj.taMSE.getByIdxMacchina(IdxMacchina); - + tabAnagStati = MapoDb.DataLayer.obj.taAnagStati.GetData(); tabKeepAlive = MapoDb.DataLayer.obj.taKeepAlive.GetData(); } @@ -113,7 +114,7 @@ namespace MoonPro.WebUserControls //oreTot = durata.Days * 24 + durata.Hours; //minuti = durata.Minutes; idxStato = tabMSE[0].idxStato; - oreTot=(int)tabMSE[0].durata/60; + oreTot = (int)tabMSE[0].durata / 60; minuti = (int)tabMSE[0].durata - 60 * oreTot; } // 2018.02.05 cambio x fix nuovi impianti @@ -227,7 +228,7 @@ namespace MoonPro.WebUserControls { if (linkActive) { - Session["IdxMacchina"] = IdxMacchina; + memLayer.ML.setSessionVal("IdxMacchina", IdxMacchina); Response.Redirect(string.Format("~/DettaglioMacchina?IdxMacchina={0}", IdxMacchina)); } } diff --git a/MP-Site/excelAllMacchineDatiConfermati.aspx.cs b/MP-Site/excelAllMacchineDatiConfermati.aspx.cs index 1c675946..f463a50c 100644 --- a/MP-Site/excelAllMacchineDatiConfermati.aspx.cs +++ b/MP-Site/excelAllMacchineDatiConfermati.aspx.cs @@ -1,140 +1,137 @@ -using System; +using SteamWare; +using System; using System.Web; using System.Web.UI; public partial class excelAllMacchineDatiConfermati : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=DatiConfermati.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvDatiConf.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=DatiConfermati.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvDatiConf.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } - #endregion + public void aggiornamento() + { + gvDatiConf.AllowPaging = false; + //gvEventi.PageSize = _numRighe; + ods_Dati.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - - public void aggiornamento() - { - gvDatiConf.AllowPaging = false; - //gvEventi.PageSize = _numRighe; - ods_Dati.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } + /// + /// restituisce stringa formattata in HH:mm + /// + /// + /// + public string durataEvento(object durataMinuti) + { + return durataMinuti.ToString(); + } - /// - /// restituisce stringa formattata in HH:mm - /// - /// - /// - public string durataEvento(object durataMinuti) - { - //string durataFormattata = ""; - //int ore = (int)Math.Floor(((double)durataMinuti) / 60); - //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); - //return durataFormattata; - return durataMinuti.ToString(); - } - - #endregion + #endregion } diff --git a/MP-Site/excelAllMacchineExportEventi.aspx.cs b/MP-Site/excelAllMacchineExportEventi.aspx.cs index 4b9ec1a2..7299abbd 100644 --- a/MP-Site/excelAllMacchineExportEventi.aspx.cs +++ b/MP-Site/excelAllMacchineExportEventi.aspx.cs @@ -1,3 +1,4 @@ +using SteamWare; using System; using System.Web; using System.Web.UI; @@ -5,135 +6,131 @@ using System.Web.UI; public partial class excelAllMacchineExportEventi : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=Eventi.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvEventi.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=Eventi.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvEventi.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } + public void aggiornamento() + { + gvEventi.AllowPaging = false; + //gvEventi.PageSize = _numRighe; + ods_EventList.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - #endregion - - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - public void aggiornamento() - { - gvEventi.AllowPaging = false; - //gvEventi.PageSize = _numRighe; - ods_EventList.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } + /// + /// restituisce stringa formattata in HH:mm + /// + /// + /// + public string durataEvento(object durataMinuti) + { + return durataMinuti.ToString(); + } - /// - /// restituisce stringa formattata in HH:mm - /// - /// - /// - public string durataEvento(object durataMinuti) - { - //string durataFormattata = ""; - //int ore = (int)Math.Floor(((double)durataMinuti) / 60); - //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); - //return durataFormattata; - return durataMinuti.ToString(); - } - - #endregion + #endregion } diff --git a/MP-Site/excelAllMacchineExportStati.aspx.cs b/MP-Site/excelAllMacchineExportStati.aspx.cs index 5f1ef689..f54e099d 100644 --- a/MP-Site/excelAllMacchineExportStati.aspx.cs +++ b/MP-Site/excelAllMacchineExportStati.aspx.cs @@ -1,3 +1,4 @@ +using SteamWare; using System; using System.Web; using System.Web.UI; @@ -5,133 +6,129 @@ using System.Web.UI; public partial class excelAllMacchineExportStati : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=Stati.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvStati.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=Stati.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvStati.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public void aggiornamento() + { + gvStati.AllowPaging = false; + ods_DiarioDiBordo.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - #endregion - - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public void aggiornamento() - { - gvStati.AllowPaging = false; - ods_DiarioDiBordo.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } + /// + /// restituisce stringa formattata in HH:mm + /// + /// + /// + public string durataEvento(object durataMinuti) + { + return durataMinuti.ToString(); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } - /// - /// restituisce stringa formattata in HH:mm - /// - /// - /// - public string durataEvento(object durataMinuti) - { - //string durataFormattata = ""; - //int ore = (int)Math.Floor(((double)durataMinuti) / 60); - //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); - //return durataFormattata; - return durataMinuti.ToString(); - } - - #endregion + #endregion } diff --git a/MP-Site/excelExportDatiConfermati.aspx.cs b/MP-Site/excelExportDatiConfermati.aspx.cs index 5052cd68..ef16b31e 100644 --- a/MP-Site/excelExportDatiConfermati.aspx.cs +++ b/MP-Site/excelExportDatiConfermati.aspx.cs @@ -1,137 +1,134 @@ -using System; +using SteamWare; +using System; using System.Web; using System.Web.UI; public partial class excelExportDatiConfermati : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=DatiConfermati.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvDatiConf.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=DatiConfermati.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvDatiConf.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } + public void aggiornamento() + { + gvDatiConf.AllowPaging = false; + //gvEventi.PageSize = _numRighe; + ods_Dati.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - #endregion - - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - public void aggiornamento() - { - gvDatiConf.AllowPaging = false; - //gvEventi.PageSize = _numRighe; - ods_Dati.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } + /// + /// restituisce stringa formattata in HH:mm + /// + /// + /// + public string durataEvento(object durataMinuti) + { + return durataMinuti.ToString(); + } - /// - /// restituisce stringa formattata in HH:mm - /// - /// - /// - public string durataEvento(object durataMinuti) - { - //string durataFormattata = ""; - //int ore = (int)Math.Floor(((double)durataMinuti) / 60); - //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); - //return durataFormattata; - return durataMinuti.ToString(); - } - - #endregion + #endregion } diff --git a/MP-Site/excelExportEventi.aspx.cs b/MP-Site/excelExportEventi.aspx.cs index 15186a6d..69e20125 100644 --- a/MP-Site/excelExportEventi.aspx.cs +++ b/MP-Site/excelExportEventi.aspx.cs @@ -1,3 +1,4 @@ +using SteamWare; using System; using System.Web; using System.Web.UI; @@ -5,121 +6,121 @@ using System.Web.UI; public partial class excelExportEventi : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=Eventi.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvEventi.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=Eventi.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvEventi.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } + public void aggiornamento() + { + gvEventi.AllowPaging = false; + //gvEventi.PageSize = _numRighe; + ods_EventList.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - #endregion - - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - public void aggiornamento() - { - gvEventi.AllowPaging = false; - //gvEventi.PageSize = _numRighe; - ods_EventList.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } - - #endregion + #endregion } diff --git a/MP-Site/excelExportStati.aspx.cs b/MP-Site/excelExportStati.aspx.cs index d36b022a..c2a2ab70 100644 --- a/MP-Site/excelExportStati.aspx.cs +++ b/MP-Site/excelExportStati.aspx.cs @@ -1,3 +1,4 @@ +using SteamWare; using System; using System.Web; using System.Web.UI; @@ -5,133 +6,133 @@ using System.Web.UI; public partial class excelExportStati : System.Web.UI.Page { - public override void VerifyRenderingInServerForm(Control control) + public override void VerifyRenderingInServerForm(Control control) + { + + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + + } + + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=Stati.xls"); + Response.Charset = ""; + // If you want the option to open the Excel file without saving than + // comment out the line below + Response.Cache.SetCacheability(HttpCacheability.NoCache); + Response.ContentType = "application/vnd.xls"; + System.IO.StringWriter stringWrite = new System.IO.StringWriter(); + System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); + gvStati.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + protected resoconti _resoconti; + + protected void Page_Load(object sender, EventArgs e) + { + _resoconti = new resoconti(); + if (!Page.IsPostBack) { - - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - + aggiornamento(); + doExport(); } + } - private void doExport() + protected void reportUpdate() + { + // alzo l'evento d update/inserimento e ricarico cache... + if (eh_doUpdate != null) { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=Stati.xls"); - Response.Charset = ""; - // If you want the option to open the Excel file without saving than - // comment out the line below - Response.Cache.SetCacheability(HttpCacheability.NoCache); - Response.ContentType = "application/vnd.xls"; - System.IO.StringWriter stringWrite = new System.IO.StringWriter(); - System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); - gvStati.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - + eh_doUpdate(this, new EventArgs()); } + } - #region area protected + #endregion - protected resoconti _resoconti; - protected void Page_Load(object sender, EventArgs e) + #region area public + + #region gestione eventi + + public event EventHandler eh_doUpdate; + + #endregion + + /// + /// idx della macchina da mostrare + /// + public string idxMacchina + { + get { - _resoconti = new resoconti(); - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } + string idxMacchina = "1"; + try + { + idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina"); + } + catch + { + } + return idxMacchina; } - - protected void reportUpdate() + set { - // alzo l'evento d update/inserimento e ricarico cache... - if (eh_doUpdate != null) - { - eh_doUpdate(this, new EventArgs()); - } + memLayer.ML.setSessionVal("IdxMacchina", value); } + } + public string macchinaDaIdx(object idx) + { + return _resoconti.macchinaDaIdx(idx.ToString()); + } + public string statoDaIdx(object idx) + { + return _resoconti.statoDaIdx(Convert.ToInt32(idx)); + } + public string tipoDaIdx(object idx) + { + return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); + } + public void aggiornamento() + { + gvStati.AllowPaging = false; + ods_DiarioDiBordo.DataBind(); + } + public void reportUpdt(object sender, EventArgs e) + { + reportUpdate(); + } - #endregion - - - #region area public - - #region gestione eventi - - public event EventHandler eh_doUpdate; - - #endregion - - /// - /// idx della macchina da mostrare - /// - public string idxMacchina + public string operatoreDaMatr(object matricola) + { + int matr = 0; + try { - get - { - string idxMacchina = "1"; - try - { - idxMacchina = (string)Session["IdxMacchina"]; - } - catch - { - } - return idxMacchina; - } - set - { - Session["IdxMacchina"] = value; - } - } - public string macchinaDaIdx(object idx) - { - return _resoconti.macchinaDaIdx(idx.ToString()); - } - public string statoDaIdx(object idx) - { - return _resoconti.statoDaIdx(Convert.ToInt32(idx)); - } - public string tipoDaIdx(object idx) - { - return _resoconti.tipoDaIdx(Convert.ToInt32(idx)); - } - public void aggiornamento() - { - gvStati.AllowPaging = false; - ods_DiarioDiBordo.DataBind(); - } - public void reportUpdt(object sender, EventArgs e) - { - reportUpdate(); + matr = Convert.ToInt32(matricola); } + catch + { } + return _resoconti.oprDaMatr(matr); + } + /// + /// restituisce stringa formattata in HH:mm + /// + /// + /// + public string durataEvento(object durataMinuti) + { + //string durataFormattata = ""; + //int ore = (int)Math.Floor(((double)durataMinuti) / 60); + //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); + //return durataFormattata; + return durataMinuti.ToString(); + } - public string operatoreDaMatr(object matricola) - { - int matr = 0; - try - { - matr = Convert.ToInt32(matricola); - } - catch - { } - return _resoconti.oprDaMatr(matr); - } - /// - /// restituisce stringa formattata in HH:mm - /// - /// - /// - public string durataEvento(object durataMinuti) - { - //string durataFormattata = ""; - //int ore = (int)Math.Floor(((double)durataMinuti) / 60); - //durataFormattata = string.Format("{0}h:{1:#.0}min", ore, (double)durataMinuti - 60 * ore); - //return durataFormattata; - return durataMinuti.ToString(); - } - - #endregion + #endregion } diff --git a/MapoDb/DS_ProdTempi.Designer.cs b/MapoDb/DS_ProdTempi.Designer.cs index f0a36c8b..021d448e 100644 --- a/MapoDb/DS_ProdTempi.Designer.cs +++ b/MapoDb/DS_ProdTempi.Designer.cs @@ -27620,7 +27620,7 @@ FROM MappaStatoExpl"; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.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 idxPromessa, KeyRichiesta, KeyBCode, Attivabile, IdxODL, CodArticolo, Desc" + @@ -27649,45 +27649,51 @@ FROM MappaStatoExpl"; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_PODL_insertQuery"; + this._commandCollection[4].CommandText = "dbo.stp_PODL_getByMultiMacc"; 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("@KeyRichiesta", 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("@KeyBCode", 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("@Attivabile", 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("@CodArticolo", 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("@CodGruppo", 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("@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("@NumPezzi", 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("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", 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("@Priorita", 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("@PzPallet", 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("@idxMulti", global::System.Data.SqlDbType.NVarChar, 2147483647, 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_PODL_updateQta"; + this._commandCollection[5].CommandText = "dbo.stp_PODL_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("@KeyRichiesta", 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("@KeyBCode", 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("@Attivabile", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", 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("@CodGruppo", 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("@IdxMacchina", 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("@NumPezzi", 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("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", 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("@Priorita", 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("@PzPallet", 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("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_PODL_updateQuery"; + this._commandCollection[6].CommandText = "dbo.stp_PODL_updateQta"; 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("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyBCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].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[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", 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("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", 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("@Priorita", 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("@PzPallet", 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("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_PODL_updateQuery"; + 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("@KeyRichiesta", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@KeyBCode", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Attivabile", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodArticolo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodGruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumPezzi", 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("@TCAssegnato", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 8, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DueDate", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Priorita", 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("@PzPallet", 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("@Original_idxPromessa", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -27760,6 +27766,23 @@ FROM MappaStatoExpl"; return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_ProdTempi.PromesseODLDataTable getByMultiMacc(string idxMulti) { + this.Adapter.SelectCommand = this.CommandCollection[4]; + if ((idxMulti == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idxMulti)); + } + DS_ProdTempi.PromesseODLDataTable dataTable = new DS_ProdTempi.PromesseODLDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] @@ -27792,7 +27815,7 @@ FROM MappaStatoExpl"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertQuery(string KeyRichiesta, string KeyBCode, global::System.Nullable Attivabile, string CodArticolo, string CodGruppo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, global::System.Nullable DueDate, global::System.Nullable Priorita, global::System.Nullable PzPallet) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; if ((KeyRichiesta == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -27880,7 +27903,7 @@ FROM MappaStatoExpl"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQta(global::System.Nullable NumPezzi, global::System.Nullable PzPallet, global::System.Nullable Original_idxPromessa) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[5]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; if ((NumPezzi.HasValue == true)) { command.Parameters[1].Value = ((int)(NumPezzi.Value)); } @@ -27920,7 +27943,7 @@ FROM MappaStatoExpl"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateQuery(string KeyRichiesta, string KeyBCode, global::System.Nullable Attivabile, string CodArticolo, string CodGruppo, string IdxMacchina, global::System.Nullable NumPezzi, global::System.Nullable TCAssegnato, global::System.Nullable DueDate, global::System.Nullable Priorita, global::System.Nullable PzPallet, global::System.Nullable Original_idxPromessa) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; if ((KeyRichiesta == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } diff --git a/MapoDb/DS_ProdTempi.xsd b/MapoDb/DS_ProdTempi.xsd index 938d6e96..b99c8e7f 100644 --- a/MapoDb/DS_ProdTempi.xsd +++ b/MapoDb/DS_ProdTempi.xsd @@ -2129,6 +2129,17 @@ ORDER BY idxPromessa DESC + + + + dbo.stp_PODL_getByMultiMacc + + + + + + + @@ -2649,7 +2660,7 @@ FROM v_ECP - + @@ -2730,7 +2741,7 @@ FROM v_ECP - + @@ -2759,7 +2770,7 @@ FROM v_ECP - + @@ -2771,7 +2782,7 @@ FROM v_ECP - + @@ -2796,7 +2807,7 @@ FROM v_ECP - + @@ -2834,7 +2845,7 @@ FROM v_ECP - + @@ -2873,7 +2884,7 @@ FROM v_ECP - + @@ -2939,7 +2950,7 @@ FROM v_ECP - + @@ -2961,7 +2972,7 @@ FROM v_ECP - + @@ -3031,7 +3042,7 @@ FROM v_ECP - + diff --git a/MapoDb/DS_ProdTempi.xss b/MapoDb/DS_ProdTempi.xss index f2dbe314..ec007410 100644 --- a/MapoDb/DS_ProdTempi.xss +++ b/MapoDb/DS_ProdTempi.xss @@ -13,13 +13,13 @@ - - + + - +