abbozzato menù x import...
This commit is contained in:
@@ -81,6 +81,9 @@
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<HintPath>..\PROJ-ETS\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\PROJ-ETS\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\PROJ-ETS\packages\NLog.4.4.11\lib\net40\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="DocumentFormat.OpenXml" version="2.7.2" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" />
|
||||
<package id="NLog" version="4.4.11" targetFramework="net40" requireReinstallation="true" />
|
||||
<package id="NLog.Config" version="4.4.11" targetFramework="net40" />
|
||||
<package id="NLog.Schema" version="4.4.11" targetFramework="net40" />
|
||||
|
||||
+72
-5
@@ -7,9 +7,49 @@ using NLog;
|
||||
using System.Net.Mail;
|
||||
using System.Collections.Generic;
|
||||
using StackExchange.Redis;
|
||||
using System.Data;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ETS_Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Helper methods e funzioni x gestione conversione dataset tipizzati e non
|
||||
/// </summary>
|
||||
/// <typeparam name="T">A strongly type DataTable.
|
||||
/// A DataTable of type T will be returned from the DataSet.
|
||||
/// </typeparam>
|
||||
public static class DataSetAdapter<T>
|
||||
where T : DataTable, new()
|
||||
{
|
||||
/// <summary>
|
||||
/// Convert the first DataTable from a DataSet to a
|
||||
/// strongly-typed data table.
|
||||
/// </summary>
|
||||
public static T convert(DataSet dataSet)
|
||||
{
|
||||
if (dataSet == null)
|
||||
return null;
|
||||
if (dataSet.Tables.Count == 0)
|
||||
return null;
|
||||
DataTable dataTable = dataSet.Tables[0];
|
||||
return convert(dataTable);
|
||||
}
|
||||
/// <summary>
|
||||
/// Convert an ordinary DataTable to a strongly-typed
|
||||
/// data table.
|
||||
/// </summary>
|
||||
public static T convert(DataTable dataTable)
|
||||
{
|
||||
if (dataTable == null)
|
||||
return null;
|
||||
T stronglyTyped = new T();
|
||||
// add data from the regular DataTable to the
|
||||
// strongly typed DataTable.
|
||||
stronglyTyped.Merge(dataTable, true, MissingSchemaAction.Ignore);
|
||||
return stronglyTyped;
|
||||
}
|
||||
}
|
||||
|
||||
public class utils
|
||||
{
|
||||
protected AppSettingsReader configAppSetReader;
|
||||
@@ -111,8 +151,19 @@ namespace ETS_Data
|
||||
/// </summary>
|
||||
public static utils obj = new utils();
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Verifica se si debba serializzare ogni valore complesso (tabelle/righe) in sessione (per impiego di sessioni avanzate come Redis)
|
||||
/// </summary>
|
||||
public bool serializeSession
|
||||
{
|
||||
get
|
||||
{
|
||||
return confReadBool("serializeSession");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region gestione email & log...
|
||||
/// <summary>
|
||||
@@ -314,6 +365,24 @@ namespace ETS_Data
|
||||
|
||||
#region area Session
|
||||
|
||||
/// <summary>
|
||||
/// carica dalla sessione un dato di tipo DataSet NON Tipizzato
|
||||
/// </summary>
|
||||
/// <param name="nomeVar"></param>
|
||||
/// <returns></returns>
|
||||
public DataSet dsSessionObj(string nomeVar)
|
||||
{
|
||||
if (HttpContext.Current.Session[nomeVar] != null)
|
||||
{
|
||||
string valSer = obj.StringSessionObj(nomeVar);
|
||||
DataSet dataSet = JsonConvert.DeserializeObject<DataSet>(valSer);
|
||||
return dataSet;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// carica dalla sessione un dato di tipo object generico
|
||||
/// </summary>
|
||||
@@ -460,8 +529,7 @@ namespace ETS_Data
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region cache
|
||||
|
||||
/// <summary>
|
||||
@@ -692,8 +760,7 @@ namespace ETS_Data
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region gestione valori in RedisCache
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
|
||||
<siteMapNode url="Menu" title="Home" description="ETS - WebScip">
|
||||
<siteMapNode url="Bazaar" title="Bazaar" description="Gestione allocazione risorse ETS" />
|
||||
<siteMapNode url="BazaarVerify" title="Verifica Ore" description="Gestione verifica impiego risorse SCHEDULATE ETS" />
|
||||
<siteMapNode url="BazaarRA" title="Registro Ore full" description="Registro complessivo impiego risorse ETS" />
|
||||
</siteMapNode>
|
||||
<siteMapNode url="Menu" title="Home" description="ETS - WebScip">
|
||||
<siteMapNode url="Bazaar" title="Bazaar" description="Gestione allocazione risorse ETS" />
|
||||
<siteMapNode url="BazaarVerify" title="Verifica Ore" description="Gestione verifica impiego risorse SCHEDULATE ETS" />
|
||||
<siteMapNode url="BazaarRA" title="Registro Ore full" description="Registro complessivo impiego risorse ETS" />
|
||||
<siteMapNode url="BazaarImport" title="Import CSV" description="Import file CSV da Excel Bazaar di ETS" />
|
||||
</siteMapNode>
|
||||
</siteMap>
|
||||
@@ -84,6 +84,7 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<div>
|
||||
<h1>Reset applicativo</h1>
|
||||
<asp:Label runat="server" ID="lblOut" />
|
||||
<hr />
|
||||
<asp:HyperLink runat="server" ID="hlHome" NavigateUrl="~/menu" Text="HOME" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace PROJ_ETS
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//string paginaPrec = user_std.UtSn.pag;
|
||||
string paginaPrec = user_std.pagPrecedente;
|
||||
string action = utils.obj.QSS("Action");
|
||||
string nextPage = utils.obj.StringSessionObj("nextPage");
|
||||
string testo = "";
|
||||
@@ -20,14 +20,14 @@ namespace PROJ_ETS
|
||||
long recPost = 0;
|
||||
if (action != "")
|
||||
{
|
||||
//if (action.Contains("C"))
|
||||
//{
|
||||
// recPrev = Cache.Count;
|
||||
// // reset dati in cache...
|
||||
// utils.obj.flushRegisteredCache();
|
||||
// recPost = Cache.Count;
|
||||
// testo += string.Format("<hr/>Reset Cache: {0} --> {1}</br>", recPrev, recPost);
|
||||
//}
|
||||
if (action.Contains("C"))
|
||||
{
|
||||
recPrev = Cache.Count;
|
||||
// reset dati in cache...
|
||||
utils.obj.flushRegisteredCache();
|
||||
recPost = Cache.Count;
|
||||
testo += string.Format("<hr/>Reset Cache: {0} --> {1}</br>", recPrev, recPost);
|
||||
}
|
||||
//if (action.Contains("D"))
|
||||
//{
|
||||
// recPrev = utils.obj.numRecAppConf;
|
||||
@@ -52,19 +52,10 @@ namespace PROJ_ETS
|
||||
recPost = Session.Count;
|
||||
testo += string.Format("<hr/>Reset Sessione: {0} --> {1}</br>", recPrev, recPost);
|
||||
}
|
||||
//if (action.Contains("V"))
|
||||
//{
|
||||
// recPrev = DataWrap.DW.numRecVoc;
|
||||
// // aggiorno vocabolario
|
||||
// DataWrap.DW.resetVocabolario();
|
||||
// recPost = DataWrap.DW.numRecVoc;
|
||||
// testo += string.Format("<hr/>Reset Vocabolario: {0} --> {1}</br>", recPrev, recPost);
|
||||
//}
|
||||
}
|
||||
lblOut.Text = testo;
|
||||
if (nextPage != "")
|
||||
{
|
||||
//logger.lg.scriviLog(string.Format("Reset {0} OK: redirect a pag {1}", action, nextPage), tipoLog.INFO);
|
||||
Response.Redirect(nextPage);
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+9
@@ -29,5 +29,14 @@ namespace PROJ_ETS {
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblOut;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlHome.
|
||||
/// </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.HyperLink hlHome;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,11 @@
|
||||
<add name="Bazaar" type="System.Web.XmlSiteMapProvider" siteMapFile="Bazaar.sitemap" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
<sessionState>
|
||||
<providers>
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="localhost" accessKey="localhost" ssl="false" applicationName="PROJ-ETS" />
|
||||
</providers>
|
||||
</sessionState></system.web>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||
<providers>
|
||||
@@ -210,6 +214,10 @@
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="StackExchange.Redis.StrongName" publicKeyToken="c219ff1ca8c2ce46" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.4.0" newVersion="1.2.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
+11
-11
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 PROJ_ETS.WebMasterPages {
|
||||
@@ -13,20 +13,20 @@ namespace PROJ_ETS.WebMasterPages {
|
||||
public partial class Bazaar {
|
||||
|
||||
/// <summary>
|
||||
/// mod_menuBazaar1 control.
|
||||
/// Controllo mod_menuBazaar1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
protected global::PROJ_ETS.WebUserControls.mod_menuBazaar mod_menuBazaar1;
|
||||
|
||||
/// <summary>
|
||||
/// Contenuto control.
|
||||
/// Controllo Contenuto.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder Contenuto;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -131,7 +131,11 @@
|
||||
<add name="Bazaar" type="System.Web.XmlSiteMapProvider" siteMapFile="Bazaar.sitemap" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
<sessionState>
|
||||
<providers>
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="localhost" accessKey="localhost" ssl="false" applicationName="PROJ-ETS" />
|
||||
</providers>
|
||||
</sessionState></system.web>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||
<providers>
|
||||
@@ -210,6 +214,10 @@
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="StackExchange.Redis.StrongName" publicKeyToken="c219ff1ca8c2ce46" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.4.0" newVersion="1.2.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user