Completo fix BaseExportPage x excel export vari

This commit is contained in:
Samuele E. Locatelli
2020-09-11 14:57:14 +02:00
parent c2dabf0344
commit 4cb65697b2
24 changed files with 408 additions and 958 deletions
+12
View File
@@ -32,3 +32,15 @@ dotnet_diagnostic.CA2000.severity = none
# CA1030: Usare gli eventi dove appropriato
dotnet_diagnostic.CA1030.severity = none
# CA5368: Impostare ViewStateUserKey per classi derivate da Page
dotnet_diagnostic.CA5368.severity = none
# CA1052: I tipi che contengono membri static devono Static o NotInheritable
dotnet_diagnostic.CA1052.severity = none
# RCS1102: Make class static.
dotnet_diagnostic.RCS1102.severity = none
# CA1062: Convalidare gli argomenti di metodi pubblici
dotnet_diagnostic.CA1062.severity = none
+72 -68
View File
@@ -8,59 +8,8 @@ namespace MP_SITE
{
public class BaseExportPage : System.Web.UI.Page
{
public override void VerifyRenderingInServerForm(Control control)
{
// Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time.
}
protected resoconti _resoconti;
protected void Page_Load(object sender, EventArgs e)
{
_resoconti = new resoconti();
if (!Page.IsPostBack)
{
aggiornamento();
doExport();
}
}
internal void doExport()
{
StringWriter stringWrite;
HtmlTextWriter htmlWrite;
startResponse(out stringWrite, out htmlWrite);
renderControl(htmlWrite);
endResponse(stringWrite);
}
internal void startResponse(out StringWriter stringWrite, out HtmlTextWriter htmlWrite)
{
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";
stringWrite = new StringWriter();
htmlWrite = new HtmlTextWriter(stringWrite);
}
internal virtual void renderControl(HtmlTextWriter htmlWrite)
{
}
internal void endResponse(StringWriter stringWrite)
{
Response.Write(stringWrite.ToString());
Response.End();
}
internal virtual void aggiornamento()
{
}
/// <summary>
/// idx della macchina da mostrare
/// </summary>
@@ -84,14 +33,23 @@ namespace MP_SITE
}
}
public string statoDaIdx(object idx)
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
public string durataEvento(object durataMinuti)
{
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
}
public string tipoDaIdx(object idx)
{
return _resoconti.tipoDaIdx(Convert.ToInt32(idx));
string answ = "";
if (durataMinuti != null)
{
//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;
answ = durataMinuti.ToString();
}
return answ;
}
public string macchinaDaIdx(object idx)
@@ -119,19 +77,65 @@ namespace MP_SITE
return _resoconti.oprDaMatr(matr);
}
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
public string durataEvento(object durataMinuti)
public string statoDaIdx(object idx)
{
string answ = "";
if (durataMinuti != null)
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
}
public string tipoDaIdx(object idx)
{
return _resoconti.tipoDaIdx(Convert.ToInt32(idx));
}
public override void VerifyRenderingInServerForm(Control control)
{
// Confirms that an HtmlForm control is rendered for the specified ASP.NET server control at run time.
}
internal virtual void aggiornamento()
{
}
internal void doExport()
{
StringWriter stringWrite;
HtmlTextWriter htmlWrite;
startResponse(out stringWrite, out htmlWrite);
renderControl(htmlWrite);
endResponse(stringWrite);
}
internal void endResponse(StringWriter stringWrite)
{
Response.Write(stringWrite.ToString());
Response.End();
}
internal virtual void renderControl(HtmlTextWriter htmlWrite)
{
}
internal void startResponse(out StringWriter stringWrite, out HtmlTextWriter htmlWrite)
{
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";
stringWrite = new StringWriter();
htmlWrite = new HtmlTextWriter(stringWrite);
}
protected void Page_Load(object sender, EventArgs e)
{
_resoconti = new resoconti();
if (!Page.IsPostBack)
{
answ = durataMinuti.ToString();
aggiornamento();
doExport();
}
return answ;
}
}
}
+10 -13
View File
@@ -1,15 +1,14 @@
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_warning.master" AutoEventWireup="true" Inherits="erroreComunicazione" Title="Untitled Page" Codebehind="erroreComunicazione.aspx.cs" %>
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_warning.master" AutoEventWireup="true" Inherits="MP_SITE.erroreComunicazione" Title="Untitled Page" CodeBehind="erroreComunicazione.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<h1>
Cod 101: Errore di comunicazione</h1>
Sono oltre <asp:Label ID="lblMinLag" runat="server" /> minuti che non si ricevono dati di aggiornamento dalla macchina selezionata,
<h1>Cod 101: Errore di comunicazione</h1>
Sono oltre
<asp:Label ID="lblMinLag" runat="server" />
minuti che non si ricevono dati di aggiornamento dalla macchina selezionata,
prego seguire lo schema seguente per determinare il guasto:<br />
<br />
<h3>
Caso 1:</h3>
<h4>
tutte le macchine hanno problemi di comunicazione</h4>
<h3>Caso 1:</h3>
<h4>tutte le macchine hanno problemi di comunicazione</h4>
Prego verificare che non ci siano problemi globali alla rete:<br />
<br />
<i>
@@ -17,10 +16,8 @@
<li>Gli switch sono tutti accesi e funzionanti? </li>
<li>I cavi di rete sono tutti collegati?</li>
</i>
<h3>
Caso 2:</h3>
<h4>
solo questa macchina ha problemi di comunicazione</h4>
<h3>Caso 2:</h3>
<h4>solo questa macchina ha problemi di comunicazione</h4>
Prego verificare che la macchina corrente sia funzionante:<br />
<br />
<i>
@@ -29,4 +26,4 @@
<li>La scheda di aquisizione è accesa?</li>
<li>La macchina CN è accesa? </li>
</i>
</asp:Content>
</asp:Content>
+6 -3
View File
@@ -1,9 +1,12 @@
using System;
public partial class erroreComunicazione : BasePage
namespace MP_SITE
{
protected void Page_Load(object sender, EventArgs e)
public partial class erroreComunicazione : BasePage
{
lblMinLag.Text = SteamWare.memLayer.ML.CRS("keepAliveMin");
protected void Page_Load(object sender, EventArgs e)
{
lblMinLag.Text = SteamWare.memLayer.ML.CRS("keepAliveMin");
}
}
}
+19 -16
View File
@@ -1,23 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class erroreComunicazione {
/// <summary>
/// lblMinLag control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMinLag;
public partial class erroreComunicazione
{
/// <summary>
/// Controllo lblMinLag.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMinLag;
}
}
+1 -4
View File
@@ -1,10 +1,7 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" CodeBehind="excelAllMacchineDatiConfermati.aspx.cs" Inherits="MP_SITE.excelAllMacchineDatiConfermati" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:GridView ID="gvDatiConf" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="IdxConferma" OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt"
DataSourceID="ods_Dati">
<asp:GridView ID="gvDatiConf" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxConferma" DataSourceID="ods_Dati">
<Columns>
<asp:BoundField DataField="IdxConferma" HeaderText="IdxConferma" ReadOnly="True"
SortExpression="IdxConferma" />
+4 -6
View File
@@ -1,10 +1,8 @@
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false"
Inherits="excelAllMacchineExportEventi" Title="Untitled Page" Codebehind="excelAllMacchineExportEventi.aspx.cs" %>
Inherits="MP_SITE.excelAllMacchineExportEventi" Title="Untitled Page" CodeBehind="excelAllMacchineExportEventi.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:GridView ID="gvEventi" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt" DataSourceID="ods_EventList">
<asp:GridView ID="gvEventi" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato" DataSourceID="ods_EventList">
<Columns>
<asp:TemplateField HeaderText="Macchina">
<ItemTemplate>
@@ -26,7 +24,7 @@
<asp:Label ID="lblArticolo" runat="server" Text='<%# Eval("CodArticolo") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="pallet" HeaderText="Pallet"/>
<asp:BoundField DataField="pallet" HeaderText="Pallet" />
<asp:TemplateField HeaderText="Operatore">
<ItemTemplate>
<asp:Label ID="lblOperatore" runat="server" Text='<%# operatoreDaMatr(Eval("MatrOpr")) %>' />
@@ -43,4 +41,4 @@
Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
</asp:Content>
+13 -128
View File
@@ -3,134 +3,19 @@ using System;
using System.Web;
using System.Web.UI;
public partial class excelAllMacchineExportEventi : System.Web.UI.Page
namespace MP_SITE
{
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)
public partial class excelAllMacchineExportEventi : BaseExportPage
{
aggiornamento();
doExport();
internal override void renderControl(HtmlTextWriter htmlWrite)
{
gvEventi.RenderControl(htmlWrite);
}
internal override void aggiornamento()
{
gvEventi.AllowPaging = false;
ods_EventList.DataBind();
}
}
}
protected void reportUpdate()
{
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
set
{
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();
}
public string operatoreDaMatr(object matricola)
{
int matr = 0;
try
{
matr = Convert.ToInt32(matricola);
}
catch
{ }
return _resoconti.oprDaMatr(matr);
}
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
public string durataEvento(object durataMinuti)
{
return durataMinuti.ToString();
}
#endregion
}
}
+28 -24
View File
@@ -1,31 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class excelAllMacchineExportEventi {
/// <summary>
/// gvEventi control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvEventi;
/// <summary>
/// ods_EventList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_EventList;
public partial class excelAllMacchineExportEventi
{
/// <summary>
/// Controllo gvEventi.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvEventi;
/// <summary>
/// Controllo ods_EventList.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_EventList;
}
}
+7 -12
View File
@@ -1,10 +1,8 @@
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false"
Inherits="excelAllMacchineExportStati" Title="Untitled Page" Codebehind="excelAllMacchineExportStati.aspx.cs" %>
Inherits="MP_SITE.excelAllMacchineExportStati" Title="Untitled Page" CodeBehind="excelAllMacchineExportStati.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:GridView ID="gvStati" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
DataSourceID="ods_DiarioDiBordo">
<asp:GridView ID="gvStati" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato" DataSourceID="ods_DiarioDiBordo">
<Columns>
<asp:TemplateField HeaderText="Macchina">
<ItemTemplate>
@@ -25,7 +23,7 @@
</asp:TemplateField>
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" />
<asp:BoundField DataField="pallet" HeaderText="Pallet" />
<asp:TemplateField HeaderText="Operatore" >
<asp:TemplateField HeaderText="Operatore">
<ItemTemplate>
<asp:Label ID="lblOperatore" runat="server" Text='<%# operatoreDaMatr(Eval("MatrOpr")) %>' />
</ItemTemplate>
@@ -35,12 +33,9 @@
<asp:ObjectDataSource ID="ods_DiarioDiBordo" runat="server" OldValuesParameterFormatString="Original_{0}"
SelectMethod="GetAllMacchinePeriodo" TypeName="MapoDb.DS_applicazioneTableAdapters.DiarioDiBordoTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="inizio" SessionField="_inizio"
Type="DateTime" />
<asp:SessionParameter DefaultValue="DateTime.Now" Name="fine" SessionField="_fine"
Type="DateTime" />
<asp:SessionParameter DefaultValue="0" Name="durataMin" SessionField="_durataMin"
Type="Single" />
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="inizio" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter DefaultValue="DateTime.Now" Name="fine" SessionField="_fine" Type="DateTime" />
<asp:SessionParameter DefaultValue="0" Name="durataMin" SessionField="_durataMin" Type="Double" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
</asp:Content>
+13 -126
View File
@@ -3,132 +3,19 @@ using System;
using System.Web;
using System.Web.UI;
public partial class excelAllMacchineExportStati : System.Web.UI.Page
namespace MP_SITE
{
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)
public partial class excelAllMacchineExportStati : BaseExportPage
{
aggiornamento();
doExport();
internal override void aggiornamento()
{
gvStati.AllowPaging = false;
ods_DiarioDiBordo.DataBind();
}
internal override void renderControl(HtmlTextWriter htmlWrite)
{
gvStati.RenderControl(htmlWrite);
}
}
}
protected void reportUpdate()
{
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
set
{
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();
}
public string operatoreDaMatr(object matricola)
{
int matr = 0;
try
{
matr = Convert.ToInt32(matricola);
}
catch
{ }
return _resoconti.oprDaMatr(matr);
}
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
public string durataEvento(object durataMinuti)
{
return durataMinuti.ToString();
}
#endregion
}
}
+28 -24
View File
@@ -1,31 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class excelAllMacchineExportStati {
/// <summary>
/// gvStati control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvStati;
/// <summary>
/// ods_DiarioDiBordo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_DiarioDiBordo;
public partial class excelAllMacchineExportStati
{
/// <summary>
/// Controllo gvStati.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvStati;
/// <summary>
/// Controllo ods_DiarioDiBordo.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_DiarioDiBordo;
}
}
+7 -14
View File
@@ -1,15 +1,11 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master"
AutoEventWireup="true" CodeBehind="excelExportDatiConfermati.aspx.cs" Inherits="excelExportDatiConfermati"
AutoEventWireup="true" CodeBehind="excelExportDatiConfermati.aspx.cs" Inherits="MP_SITE.excelExportDatiConfermati"
EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:GridView ID="gvDatiConf" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
DataKeyNames="IdxConferma" OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt"
DataSourceID="ods_Dati">
<asp:GridView ID="gvDatiConf" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxConferma" DataSourceID="ods_Dati">
<Columns>
<asp:BoundField DataField="IdxConferma" HeaderText="IdxConferma" ReadOnly="True"
SortExpression="IdxConferma" />
<asp:BoundField DataField="IdxConferma" HeaderText="IdxConferma" ReadOnly="True" SortExpression="IdxConferma" />
<asp:BoundField DataField="IdxODL" HeaderText="IdxODL" SortExpression="IdxODL" />
<asp:BoundField DataField="DataOraApp" HeaderText="DataOraApp" SortExpression="DataOraApp" />
<asp:BoundField DataField="DataRif" HeaderText="DataRif" SortExpression="DataRif" />
@@ -30,12 +26,9 @@
<asp:ObjectDataSource ID="ods_Dati" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="getByMacchPeriodo" TypeName="MapoDb.DS_ProdTempiTableAdapters.DatiProduzioneTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="1" Name="IdxMacchina" SessionField="IdxMacchina"
Type="String" />
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="dataFrom" SessionField="_inizio"
Type="DateTime" />
<asp:SessionParameter DefaultValue="DateTime.Now" Name="dataTo" SessionField="_fine"
Type="DateTime" />
<asp:SessionParameter DefaultValue="1" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
<asp:SessionParameter DefaultValue="DateTime.Now.AddWeeks(-1)" Name="dataFrom" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter DefaultValue="DateTime.Now" Name="dataTo" SessionField="_fine" Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
</asp:Content>
+13 -126
View File
@@ -3,132 +3,19 @@ using System;
using System.Web;
using System.Web.UI;
public partial class excelExportDatiConfermati : System.Web.UI.Page
namespace MP_SITE
{
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)
public partial class excelExportDatiConfermati : BaseExportPage
{
aggiornamento();
doExport();
internal override void aggiornamento()
{
gvDatiConf.AllowPaging = false;
ods_Dati.DataBind();
}
internal override void renderControl(HtmlTextWriter htmlWrite)
{
gvDatiConf.RenderControl(htmlWrite);
}
}
}
protected void reportUpdate()
{
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
set
{
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();
}
public string operatoreDaMatr(object matricola)
{
int matr = 0;
try
{
matr = Convert.ToInt32(matricola);
}
catch
{ }
return _resoconti.oprDaMatr(matr);
}
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
public string durataEvento(object durataMinuti)
{
return durataMinuti.ToString();
}
#endregion
}
}
+28 -25
View File
@@ -1,32 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4961
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class excelExportDatiConfermati {
/// <summary>
/// gvDatiConf control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvDatiConf;
/// <summary>
/// ods_Dati control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_Dati;
public partial class excelExportDatiConfermati
{
/// <summary>
/// Controllo gvDatiConf.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvDatiConf;
/// <summary>
/// Controllo ods_Dati.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_Dati;
}
}
+4 -7
View File
@@ -1,10 +1,7 @@
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false" Inherits="excelExportEventi"
Title="Untitled Page" Codebehind="excelExportEventi.aspx.cs" %>
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false" Inherits="MP_SITE.excelExportEventi" Title="Untitled Page" CodeBehind="excelExportEventi.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:GridView ID="gvEventi" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
OnSorted="reportUpdt" OnPageIndexChanged="reportUpdt" DataSourceID="ods_EventList">
<asp:GridView ID="gvEventi" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato" DataSourceID="ods_EventList">
<Columns>
<asp:TemplateField HeaderText="Macchina">
<ItemTemplate>
@@ -26,7 +23,7 @@
<asp:Label ID="lblCodArticolo" runat="server" Text='<%# Eval("CodArticolo") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="pallet" HeaderText="Pallet"/>
<asp:BoundField DataField="pallet" HeaderText="Pallet" />
<asp:TemplateField HeaderText="Operatore">
<ItemTemplate>
<asp:Label ID="lblOperatore" runat="server" Text='<%# operatoreDaMatr(Eval("MatrOpr")) %>' />
@@ -45,4 +42,4 @@
Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
</asp:Content>
+13 -118
View File
@@ -3,124 +3,19 @@ using System;
using System.Web;
using System.Web.UI;
public partial class excelExportEventi : System.Web.UI.Page
namespace MP_SITE
{
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)
public partial class excelExportEventi : BaseExportPage
{
aggiornamento();
doExport();
internal override void aggiornamento()
{
gvEventi.AllowPaging = false;
ods_EventList.DataBind();
}
internal override void renderControl(HtmlTextWriter htmlWrite)
{
gvEventi.RenderControl(htmlWrite);
}
}
}
protected void reportUpdate()
{
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
set
{
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();
}
public string operatoreDaMatr(object matricola)
{
int matr = 0;
try
{
matr = Convert.ToInt32(matricola);
}
catch
{ }
return _resoconti.oprDaMatr(matr);
}
#endregion
}
}
+26 -24
View File
@@ -1,31 +1,33 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class excelExportEventi
{
/// <summary>
/// Controllo gvEventi.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvEventi;
public partial class excelExportEventi {
/// <summary>
/// gvEventi control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvEventi;
/// <summary>
/// ods_EventList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_EventList;
/// <summary>
/// Controllo ods_EventList.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_EventList;
}
}
+3 -6
View File
@@ -1,10 +1,7 @@
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false" Inherits="excelExportStati"
Title="Untitled Page" Codebehind="excelExportStati.aspx.cs" %>
<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MAPO_noAjax.master" AutoEventWireup="true" EnableEventValidation="false" Inherits="MP_SITE.excelExportStati" Title="Untitled Page" CodeBehind="excelExportStati.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:GridView ID="gvStati" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato"
DataSourceID="ods_DiarioDiBordo">
<asp:GridView ID="gvStati" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" DataKeyNames="IdxMacchina,InizioStato" DataSourceID="ods_DiarioDiBordo">
<Columns>
<asp:TemplateField HeaderText="Macchina">
<ItemTemplate>
@@ -45,4 +42,4 @@
Type="Double" />
</SelectParameters>
</asp:ObjectDataSource>
</asp:Content>
</asp:Content>
+13 -130
View File
@@ -3,136 +3,19 @@ using System;
using System.Web;
using System.Web.UI;
public partial class excelExportStati : System.Web.UI.Page
namespace MP_SITE
{
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)
public partial class excelExportStati : BaseExportPage
{
aggiornamento();
doExport();
internal override void aggiornamento()
{
gvStati.AllowPaging = false;
ods_DiarioDiBordo.DataBind();
}
internal override void renderControl(HtmlTextWriter htmlWrite)
{
gvStati.RenderControl(htmlWrite);
}
}
}
protected void reportUpdate()
{
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
set
{
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();
}
public string operatoreDaMatr(object matricola)
{
int matr = 0;
try
{
matr = Convert.ToInt32(matricola);
}
catch
{ }
return _resoconti.oprDaMatr(matr);
}
/// <summary>
/// restituisce stringa formattata in HH:mm
/// </summary>
/// <param name="durataMinuti"></param>
/// <returns></returns>
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
}
}
+28 -24
View File
@@ -1,31 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MP_SITE
{
public partial class excelExportStati {
/// <summary>
/// gvStati control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvStati;
/// <summary>
/// ods_DiarioDiBordo control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_DiarioDiBordo;
public partial class excelExportStati
{
/// <summary>
/// Controllo gvStati.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvStati;
/// <summary>
/// Controllo ods_DiarioDiBordo.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource ods_DiarioDiBordo;
}
}
+37 -37
View File
@@ -2,51 +2,51 @@
namespace MP_SITE
{
public class BundleConfig
{
// Per altre informazioni sulla creazione di bundle, vedere https://go.microsoft.com/fwlink/?LinkID=303951
public static void RegisterBundles(BundleCollection bundles)
public class BundleConfig
{
// codice JS!
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js",
"~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"));
// Per altre informazioni sulla creazione di bundle, vedere https://go.microsoft.com/fwlink/?LinkID=303951
public static void RegisterBundles(BundleCollection bundles)
{
// codice JS!
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js",
"~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"));
// L'ordine è molto importante per il funzionamento di questi file poiché hanno dipendenze esplicite
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
// L'ordine è molto importante per il funzionamento di questi file poiché hanno dipendenze esplicite
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new ScriptBundle("~/bundles/vis").Include(
"~/vis/vis.js"));
bundles.Add(new ScriptBundle("~/bundles/vis").Include(
"~/vis/vis.js"));
//// CSS!
//bundles.Add(new StyleBundle("~/Content/css").Include(
// "~/Content/bootstrap.css",
// "~/Content/Style.css"));
//// CSS!
//bundles.Add(new StyleBundle("~/Content/css").Include(
// "~/Content/bootstrap.css",
// "~/Content/Style.css"));
// abilito boundle "forzato"!
BundleTable.EnableOptimizations = true;
// abilito boundle "forzato"!
BundleTable.EnableOptimizations = true;
}
}
}
}
+15 -15
View File
@@ -3,21 +3,21 @@ using System;
namespace MP_SITE
{
public class MP_Startup
{
public static void Init()
public class MP_Startup
{
logger.lg.scriviLog("Esecuzione MyStartup.init()", tipoLog.STARTUP);
try
{
// inizializzo appConf prima di tutto il resto...
memLayer.ML.resetAppConf();
logger.lg.scriviLog("Completata esecuzione preliminare setup AppConf", tipoLog.STARTUP);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione in fase di INIT preliminare applicazione{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
}
public static void Init()
{
logger.lg.scriviLog("Esecuzione MyStartup.init()", tipoLog.STARTUP);
try
{
// inizializzo appConf prima di tutto il resto...
memLayer.ML.resetAppConf();
logger.lg.scriviLog("Completata esecuzione preliminare setup AppConf", tipoLog.STARTUP);
}
catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione in fase di INIT preliminare applicazione{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
}
}
}
}
}
+8 -8
View File
@@ -6,13 +6,13 @@ using Microsoft.AspNet.FriendlyUrls;
namespace MP_SITE
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
public static class RouteConfig
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
}
}
}
}
}