diff --git a/.vs/WebGIM/v15/sqlite3/storage.ide b/.vs/WebGIM/v15/sqlite3/storage.ide index b191515..f647269 100644 Binary files a/.vs/WebGIM/v15/sqlite3/storage.ide and b/.vs/WebGIM/v15/sqlite3/storage.ide differ diff --git a/GIM_site/ExcelExportMtzPrev.aspx b/GIM_site/ExcelExportMtzPrev.aspx index 2e1f233..16f8ff9 100644 --- a/GIM_site/ExcelExportMtzPrev.aspx +++ b/GIM_site/ExcelExportMtzPrev.aspx @@ -1,72 +1,71 @@ <%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="ExcelExportMtzPrev.aspx.cs" - Inherits="GIM_site.ExcelExportMtzPrev" %> + Inherits="GIM_site.ExcelExportMtzPrev" %> - + -
-
- - - - - - - - - - - - - - - - - - - - - - <%--DataFormatString="{0:dd/MM/yy}" --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + <%--DataFormatString="{0:dd/MM/yy}" --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/GIM_site/ExcelExportMtzPrev.aspx.cs b/GIM_site/ExcelExportMtzPrev.aspx.cs index df892071..a98c70a 100644 --- a/GIM_site/ExcelExportMtzPrev.aspx.cs +++ b/GIM_site/ExcelExportMtzPrev.aspx.cs @@ -6,118 +6,111 @@ using System.Web.UI.WebControls; namespace GIM_site { - public partial class ExcelExportMtzPrev : System.Web.UI.Page + public partial class ExcelExportMtzPrev : System.Web.UI.Page + { + /// + /// evento dati associati a controllo + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) { - /// - /// evento dati associati a controllo - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) + if (grView.Rows.Count > 0) + { + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) { - if (grView.Rows.Count > 0) - { - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) - { - try - { - cella.Text = traduci(cella.Text); - } - catch - { } - } - } + try + { + cella.Text = traduci(cella.Text); + } + catch + { } } - /// - /// wrapper traduzione - /// - /// - /// - public string traduci(object lemma) - { - return user_std.UtSn.Traduci(lemma.ToString()); - } - /// - /// fix rendering tabelle standard in webform - /// - /// - public override void VerifyRenderingInServerForm(Control control) - { - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - } - /// - /// Si occupa di rendere l'out HTML come excel file (mimetype) - /// - private void doExport() - { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=SchemaInterventi.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); - grView.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); - } -#if false - /// - /// restituisce la data formattata coem da web.config - /// - /// - /// - public string dtFormat(string key) - { - return memLayer.ML.CRS("key"); - } -#endif - - #region area protected - - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } - } - - #endregion - - - public void aggiornamento() - { - grView.AllowPaging = false; - checkFixOds(); - ods.DataBind(); - grView.DataBind(); - } - - /// - /// sistemo filtraggio con valori selezionati - /// - private void checkFixOds() - { - ods.FilterExpression = "( codMacchina LIKE '%{0}%' OR nomeMacchina LIKE '%{0}%' OR descrizione LIKE '%{0}%' )"; - if (memLayer.ML.isInSessionObject("idxTipo_filt")) - { - ods.FilterExpression += " AND (idxTipo = {1})"; - } - if (memLayer.ML.isInSessionObject("idxMacchina_filt")) - { - ods.FilterExpression += " AND (idxMacchina = {2})"; - } - } - + } } + /// + /// wrapper traduzione + /// + /// + /// + public string traduci(object lemma) + { + return user_std.UtSn.Traduci(lemma.ToString()); + } + /// + /// fix rendering tabelle standard in webform + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. + } + /// + /// Si occupa di rendere l'out HTML come excel file (mimetype) + /// + private void doExport() + { + Response.Clear(); + Response.AddHeader("content-disposition", "attachment; filename=SchemaInterventi.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); + grView.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + } + + #region area protected + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + aggiornamento(); + doExport(); + } + } + + #endregion + + + public void aggiornamento() + { + grView.AllowPaging = false; + checkFixOds(); + ods.DataBind(); + grView.DataBind(); + } + + /// + /// sistemo filtraggio con valori selezionati + /// + private void checkFixOds() + { + ods.FilterExpression = "( codMacchina LIKE '%{0}%' OR nomeMacchina LIKE '%{0}%' OR descrizione LIKE '%{0}%' )"; + if (memLayer.ML.isInSessionObject("idxTipo_filt")) + { + ods.FilterExpression += " AND (idxTipo = {1})"; + } + if (memLayer.ML.isInSessionObject("idxImpianto_filt")) + { + ods.FilterExpression += " AND (idxImpianto = {2})"; + } + if (memLayer.ML.isInSessionObject("idxMacchina_filt")) + { + ods.FilterExpression += " AND (idxMacchina = {3})"; + } + } + + } } \ No newline at end of file diff --git a/GIM_site/ExcelExportMtzPrev.aspx.designer.cs b/GIM_site/ExcelExportMtzPrev.aspx.designer.cs index 29320d2..7832d9f 100644 --- a/GIM_site/ExcelExportMtzPrev.aspx.designer.cs +++ b/GIM_site/ExcelExportMtzPrev.aspx.designer.cs @@ -1,51 +1,50 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace GIM_site -{ - - +namespace GIM_site { + + public partial class ExcelExportMtzPrev { /// - /// Head1 control. + /// Controllo Head1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; /// - /// form1 control. + /// Controllo form1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; /// - /// grView control. + /// Controllo grView. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// 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; /// - /// ods control. + /// Controllo ods. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// 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; } diff --git a/GIM_site/ExcelExportMtzPrevPending.aspx.cs b/GIM_site/ExcelExportMtzPrevPending.aspx.cs index 1130238..987b7d2 100644 --- a/GIM_site/ExcelExportMtzPrevPending.aspx.cs +++ b/GIM_site/ExcelExportMtzPrevPending.aspx.cs @@ -6,84 +6,84 @@ using System.Web.UI.WebControls; public partial class ExcelExportMtzPrevPending : System.Web.UI.Page { - /// - /// evento dati associati a controllo - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) + /// + /// evento dati associati a controllo + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) { - if (grView.Rows.Count > 0) + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) - { - try - { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); - } - catch - { } - } + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); } + catch + { } + } } - /// - /// wrapper traduzione - /// - /// - /// - public string traduci(object lemma) + } + /// + /// wrapper traduzione + /// + /// + /// + public string traduci(object lemma) + { + return user_std.UtSn.Traduci(lemma.ToString()); + } + + /// + /// fix x export excel + /// + /// + 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=InterventiProgrammati.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); + grView.RenderControl(htmlWrite); + Response.Write(stringWrite.ToString()); + Response.End(); + + } + + #region area protected + + + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) { - return user_std.UtSn.Traduci(lemma.ToString()); + aggiornamento(); + doExport(); } + } - /// - /// fix x export excel - /// - /// - public override void VerifyRenderingInServerForm(Control control) - { - // Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time. - } + #endregion - private void doExport() - { - Response.Clear(); - Response.AddHeader("content-disposition", "attachment; filename=InterventiProgrammati.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); - grView.RenderControl(htmlWrite); - Response.Write(stringWrite.ToString()); - Response.End(); + public void aggiornamento() + { + grView.AllowPaging = false; + ods.DataBind(); + grView.DataBind(); + } - } - - #region area protected - - - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - aggiornamento(); - doExport(); - } - } - - #endregion - - public void aggiornamento() - { - grView.AllowPaging = false; - ods.DataBind(); - grView.DataBind(); - } - } diff --git a/GIM_site/ExcelExportMtzPrevPending.aspx.designer.cs b/GIM_site/ExcelExportMtzPrevPending.aspx.designer.cs index d128675..11829f0 100644 --- a/GIM_site/ExcelExportMtzPrevPending.aspx.designer.cs +++ b/GIM_site/ExcelExportMtzPrevPending.aspx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ @@ -12,29 +12,29 @@ public partial class ExcelExportMtzPrevPending { /// - /// form1 control. + /// Controllo form1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; /// - /// grView control. + /// Controllo grView. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// 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; /// - /// ods control. + /// Controllo ods. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// 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; }