Merge branch 'release/CheckPayloadReset'

This commit is contained in:
Samuele Locatelli
2021-11-09 16:51:31 +01:00
19 changed files with 611 additions and 483 deletions
+33 -33
View File
@@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<DesktopBuildPackageLocation>C:\Users\samuele\Documents\Visual Studio 2012\Projects\GestionePresenze\GPW\ReleasesClienti\ETS\GPW.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/GPW/Smart</DeployIisAppPath>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="GPW_data.Properties.Settings.GPWConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\GPW_data.Properties.Settings.GPWConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<LastUsedBuildConfiguration>ETS</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<ExcludeApp_Data>True</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)GPW_data.Properties.Settings.GPWConnectionString-Web.config Connection String" />
</ItemGroup>
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<DesktopBuildPackageLocation>C:\Users\samuele\Documents\Visual Studio 2012\Projects\GestionePresenze\GPW\ReleasesClienti\ETS\GPW.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/GPW/Smart</DeployIisAppPath>
<PublishDatabaseSettings>
<Objects xmlns="">
<ObjectGroup Name="GPW_data.Properties.Settings.GPWConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\GPW_data.Properties.Settings.GPWConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
<LastUsedBuildConfiguration>ETS</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<ExcludeApp_Data>True</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
</PropertyGroup>
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)GPW_data.Properties.Settings.GPWConnectionString-Web.config Connection String" />
</ItemGroup>
</Project>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@@ -20,11 +20,11 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ObjectGroup Name="GPW_data.Properties.Settings.GPWConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<PreSource Path="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\GPW_data.Properties.Settings.GPWConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
<Source MatchValue="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
<ObjectGroup Name="ErrorLog" Order="2" Enabled="False" xmlns="">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@@ -20,11 +20,11 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ObjectGroup Name="GPW_data.Properties.Settings.GPWConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<PreSource Path="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\GPW_data.Properties.Settings.GPWConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
<Source MatchValue="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
<ObjectGroup Name="ErrorLog" Order="2" Enabled="False" xmlns="">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
@@ -20,11 +20,11 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ObjectGroup Name="GPW_data.Properties.Settings.GPWConnectionString" Order="1" Enabled="False">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<PreSource Path="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\GPW_data.Properties.Settings.GPWConnectionString_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
<Source MatchValue="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
<ObjectGroup Name="ErrorLog" Order="2" Enabled="False" xmlns="">
+31 -31
View File
@@ -4,55 +4,55 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
Nell'esempio seguente, la trasformazione "SetAttributes" modifica il valore di
"connectionString" in modo da utilizzare "ReleaseSQLServer" solo quando il localizzatore "Match"
Nell'esempio seguente, la trasformazione "SetAttributes" modifica il valore di
"connectionString" in modo da utilizzare "ReleaseSQLServer" solo quando il localizzatore "Match"
individua un attributo "name" con valore "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
</connectionStrings>
-->
<appSettings>
<!--area conf email-->
<add key="adminAnomalieEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="adminContinuatoEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="adminOreLavEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="checkAnomOreLav" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="checkAnomOreLavComm" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="_fromEmail" value="GPW@steamware.net" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="_smtpCli" value="smtp.gmail.com" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="_emailUser" value="info@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="_emailPwd" value="spsstampi_2012" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="_enableSSL" value="true" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="adminAnomalieEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="adminContinuatoEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="adminOreLavEmail" value="lucia.gervasoni@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="checkAnomOreLav" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="checkAnomOreLavComm" value="false" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_fromEmail" value="GPW@steamware.net" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_smtpCli" value="smtp.gmail.com" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailUser" value="info@spsstampi.it" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_emailPwd" value="spsstampi_2012" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="_enableSSL" value="true" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<!--altri parametri-->
<add key="authKey" value="giambaSPS" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="baseUrl" value="http://W2012FS/GPW_SPS/" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="GpwSmartUrl" value="../../GPW_SPS/SMART" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="GpwBCodeUrl" value="../../GPW_SPS/BCODE" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="reportBaseUrl" value="http://W2012FS/ReportServer?/Steamware/" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="authKey" value="giambaSPS" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="baseUrl" value="http://W2012FS/GPW_SPS/" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="GpwSmartUrl" value="../../GPW_SPS/SMART" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="GpwBCodeUrl" value="../../GPW_SPS/BCODE" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="reportBaseUrl" value="http://W2012FS/ReportServer?/Steamware/" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<!--area DB-->
<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="UtenteCdcConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="VocabolarioConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="GPWConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
<add key="PermessiConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="UtenteCdcConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="VocabolarioConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
<add key="GPWConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
</appSettings>
<connectionStrings>
<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQLSTEAM;Initial Catalog=SPS_GPW;Persist Security Info=True;User ID=sa;Password=steamware" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
</connectionStrings>
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
Nell'esempio seguente, la trasformazione "Replace" sostituisce l'intera
Nell'esempio seguente, la trasformazione "Replace" sostituisce l'intera
sezione <customErrors> del file web.config.
Poiché è presente un'unica sezione customErrors nel
Poiché è presente un'unica sezione customErrors nel
nodo <system.web>, non è necessario utilizzare l'attributo "xdt:Locator".
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
<error statusCode="500" redirect="InternalError.htm" />
</customErrors>
-->
</system.web>
+6 -6
View File
@@ -133,15 +133,15 @@
<!--Gestione SSRS-->
<add key="reportBaseUrl" value="http://sql-steam/ReportServer?/Steamware/" />
<!--CONF DB-->
<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="UtenteCdcConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=Steamware_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="VocabolarioConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW_vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="GPWConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="DbConfConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="PermessiConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="UtenteCdcConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=Steamware_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="VocabolarioConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=GPW_vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="GPWConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="DbConfConnectionString" value="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<connectionStrings>
<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQLSTEAM;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
<add name="ErrorLog" connectionString="Data Source=SQL2016DEV;Initial Catalog=Elmah;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
</connectionStrings>
<runtime>
+1 -1
View File
@@ -3,7 +3,7 @@
<asp:HiddenField runat="server" ID="hfAnonym" />
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-light py-1 fixed-top">
<%--<asp:LinkButton runat="server" ID="lbnUpdate" Text="---" OnClick="lbnUpdate_Click" CssClass="navbar-brand" ToolTip="HOME">Sauder NKC <i class="fa fa-object-group" aria-hidden="true"></i></asp:LinkButton>--%>
<a class="navbar-brand" href="../">GPW <i class="fa fa-code" aria-hidden="true"></i></a>
<a class="navbar-brand" href="/">GPW <i class="fa fa-code" aria-hidden="true"></i></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
+23 -23
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW_Admin.WebUserControls
@@ -15,56 +15,56 @@ namespace GPW_Admin.WebUserControls
{
/// <summary>
/// Controllo hfAnonym.
/// hfAnonym control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfAnonym;
/// <summary>
/// Controllo menu.
/// menu control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater menu;
/// <summary>
/// Controllo XmlMenu.
/// XmlMenu control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.XmlDataSource XmlMenu;
/// <summary>
/// Controllo divSearch.
/// divSearch control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSearch;
/// <summary>
/// Controllo txtSearch.
/// txtSearch control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSearch;
/// <summary>
/// Controllo lbtSearch.
/// lbtSearch control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtSearch;
}
@@ -143,7 +143,7 @@ namespace GPW_Admin.WebUserControls
protected override void traduciObj()
{
base.traduciObj();
btnNewLemma.Text = user_std.UtSn.Traduci("btnNewLemma");
btnNewLemma.Text = traduci("btnNewLemma");
txtNewLemma.Text = "";
}
@@ -35,7 +35,7 @@
<asp:LinkButton runat="server" ID="lbApprova" Visible='<%# userCanApprove && chkLicOk %>' Text="Approva" CommandArgument="approva" CommandName="Select" CssClass="btn btn-sm btn-success"><i class="fa fa-check" aria-hidden="true"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Dipendente">
<ItemTemplate>
<asp:Label ID="lblDip" runat="server" Text='<%# cognomeNome(Eval("idxDipendente")) %>' Visible='<%# userCanApprove %>' />
</ItemTemplate>
+1 -1
View File
@@ -3,7 +3,7 @@
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<asp:CheckBox ID="chkFilt" runat="server" Checked="false" AutoPostBack="True" CssClass='input-group-text2 <%# css %>' OnCheckedChanged="chkFilt_CheckedChanged" />
<asp:CheckBox ID="chkFilt" runat="server" Checked="false" AutoPostBack="True" CssClass='input-group-text2 <%# css %>' OnCheckedChanged="chkFilt_CheckedChanged" Text="filtro" />
</div>
<asp:ComboBox ID="dlFilt" runat="server" Visible="False" DataTextField="label" DataValueField="value" AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True" OnSelectedIndexChanged="dlFilt_SelectedIndexChanged" CssClass="Windows" />
<asp:Label ID="where" runat="server" Visible="false" Text="" />
+16 -4
View File
@@ -47,7 +47,10 @@ public partial class mod_filtro : ApplicationUserControl
set
{
hfShowAll.Value = value;
traduciObj();
if (!string.IsNullOrEmpty(value))
{
traduciObj();
}
}
}
@@ -60,7 +63,10 @@ public partial class mod_filtro : ApplicationUserControl
set
{
hfShowFiltered.Value = value;
traduciObj();
if (!string.IsNullOrEmpty(value))
{
traduciObj();
}
}
}
@@ -447,11 +453,17 @@ public partial class mod_filtro : ApplicationUserControl
{
if (!chkFilt.Checked)
{
chkFilt.Text = traduci(_showFiltered);
if (!string.IsNullOrEmpty(_showFiltered))
{
chkFilt.Text = traduci(_showFiltered);
}
}
else
{
chkFilt.Text = traduci(_showAll);
if (!string.IsNullOrEmpty(_showAll))
{
chkFilt.Text = traduci(_showAll);
}
}
}
}
+20 -20
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -13,47 +13,47 @@ public partial class mod_filtro
{
/// <summary>
/// Controllo chkFilt.
/// chkFilt control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkFilt;
/// <summary>
/// Controllo dlFilt.
/// dlFilt control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ComboBox dlFilt;
/// <summary>
/// Controllo where.
/// where control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label where;
/// <summary>
/// Controllo hfShowAll.
/// hfShowAll control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowAll;
/// <summary>
/// Controllo hfShowFiltered.
/// hfShowFiltered control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfShowFiltered;
}
+62 -66
View File
@@ -7,44 +7,40 @@ using System.Web.UI;
/// </summary>
public partial class mod_login : ApplicationUserControl
{
#region area protected/private
#region area proprietà
#region Private Fields
private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale;
#endregion
#endregion Private Fields
#region area metodi
#region Public Events
public event EventHandler Login_Error;
public event EventHandler Login_ok;
#endregion Public Events
#region Public Properties
/// <summary>
/// imposta la modalità di login tra normale / forceUser
/// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser
/// </summary>
private void setLoginMode()
public SteamWare.loginMode modoLogin
{
if (_isForceUser == SteamWare.loginMode.forceUser)
get
{
pnlForceUser.Visible = true;
return _isForceUser;
}
else
set
{
pnlForceUser.Visible = false;
_isForceUser = value;
}
}
protected override void traduciObj()
{
try
{
lblPwd.Text = user_std.UtSn.Traduci("lblPwd");
lblUser.Text = user_std.UtSn.Traduci("lblUser");
lblDominio.Text = user_std.UtSn.Traduci("lblDominio");
lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente");
btnOk.Text = user_std.UtSn.Traduci("btnCommit");
}
catch
{ }
}
#endregion Public Properties
#region Private Methods
/// <summary>
/// prova a verificare se l'utente sia ok x AD credentials
@@ -75,7 +71,7 @@ public partial class mod_login : ApplicationUserControl
}
else
{
lblMessage.Text = String.Format("{0}<br>There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
lblMessage.Text = String.Format("{0}<br>There are some problems instatiating user: {1}/{2}", traduci("AccessFail"), dom_user[0], dom_user[1]);
logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), tipoLog.ERROR);
if (Login_Error != null)
{
@@ -92,7 +88,7 @@ public partial class mod_login : ApplicationUserControl
}
else
{
lblMessage.Text = String.Format("{0}<br>user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
lblMessage.Text = String.Format("{0}<br>user not allowed: {1}/{2}", traduci("AccessFail"), dom_user[0], dom_user[1]);
logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), tipoLog.WARNING);
if (Login_Error != null)
{
@@ -103,7 +99,7 @@ public partial class mod_login : ApplicationUserControl
}
else
{
lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth");
lblMessage.Text = traduci("AccessFail") + traduci("UsrNotAuth");
logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), tipoLog.WARNING);
if (Login_Error != null)
{
@@ -147,8 +143,8 @@ public partial class mod_login : ApplicationUserControl
}
else
{
lblMessage.Text = String.Format("{0}<br>key not allowed for operation!!! operation logged!!!", user_std.UtSn.Traduci("AccessFail"));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
lblMessage.Text = String.Format("{0}<br>key not allowed for operation!!! operation logged!!!", traduci("AccessFail"));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, tipoLog.WARNING);
if (Login_Error != null)
@@ -159,7 +155,7 @@ public partial class mod_login : ApplicationUserControl
}
else
{
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!<br>L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, traduci(SteamWare.memLayer.ML.confReadString("defaultApp"))));
string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, tipoLog.WARNING);
if (Login_Error != null)
@@ -170,7 +166,7 @@ public partial class mod_login : ApplicationUserControl
}
else
{
lblMessage.Text = string.Format("{0}<br>user not authenticated!<br>", user_std.UtSn.Traduci("AccessFail"));
lblMessage.Text = string.Format("{0}<br>user not authenticated!<br>", traduci("AccessFail"));
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
@@ -180,44 +176,30 @@ public partial class mod_login : ApplicationUserControl
}
}
/// <summary>
/// imposta la modalità di login tra normale / forceUser
/// </summary>
private void setLoginMode()
{
if (_isForceUser == SteamWare.loginMode.forceUser)
{
pnlForceUser.Visible = true;
}
else
{
pnlForceUser.Visible = false;
}
}
#endregion Private Methods
#region Protected Methods
protected void btnOk_Click(object sender, EventArgs e)
{
ForceUserIdentity();
}
#endregion
#endregion
#region area public
#region eventi pubblici esposti
public event EventHandler Login_ok;
public event EventHandler Login_Error;
#endregion
#region area proprietà
/// <summary>
/// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser
/// </summary>
public SteamWare.loginMode modoLogin
{
get
{
return _isForceUser;
}
set
{
_isForceUser = value;
}
}
#endregion
/// <summary>
/// avvio pagina
/// </summary>
@@ -235,5 +217,19 @@ public partial class mod_login : ApplicationUserControl
}
}
#endregion
}
protected override void traduciObj()
{
try
{
lblPwd.Text = traduci("lblPwd");
lblUser.Text = traduci("lblUser");
lblDominio.Text = traduci("lblDominio");
lblTitolo.Text = traduci("ForzaUtente");
btnOk.Text = traduci("btnCommit");
}
catch
{ }
}
#endregion Protected Methods
}
+82 -63
View File
@@ -13,35 +13,21 @@ using SteamWare;
public partial class mod_menuTop : ApplicationUserControl
{
#region Private Fields
private string _titleString;
#region gestione eventi
#endregion Private Fields
#region Public Events
public event EventHandler eh_toggleMenuSx;
public event EventHandler eh_reqUpdateMenu;
#endregion
public event EventHandler eh_toggleMenuSx;
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
btnLogOut.Visible = user_std.UtSn.isForcedUser;
if(memLayer.ML.isInSessionObject("doUpdateNow"))
{
doFullDataUpdate();
memLayer.ML.emptySessionVal("doUpdateNow");
}
}
#endregion Public Events
protected void btnLogOut_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("forceUser.aspx");
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
doFullDataUpdate();
}
#region Private Methods
private void doFullDataUpdate()
{
@@ -81,12 +67,31 @@ public partial class mod_menuTop : ApplicationUserControl
Response.Redirect(_paginaCorrente);
}
protected override void loadSessionData()
/// <summary>
/// redirect
/// </summary>
private void returnHome()
{
base.loadSessionData();
_titleString = SteamWare.memLayer.ML.StringSessionObj("_titleString");
Response.Redirect(memLayer.ML.CRS("baseUrl"));
}
private void setClock()
{
lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
}
/// <summary>
/// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
/// </summary>
private void setTimer()
{
Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
}
#endregion Private Methods
#region Protected Methods
protected override void bindControlli()
{
if (!Page.IsPostBack)
@@ -95,12 +100,12 @@ public partial class mod_menuTop : ApplicationUserControl
// 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"));
lnkShowHide.Text = traduci("lnkShowHide");
lblTitle.Text = traduci(SteamWare.memLayer.ML.confReadString("titleApp"));
if (!string.IsNullOrEmpty(_titleString))
{
// traduzione di tutti i termini
lblMessUtente.Text = user_std.UtSn.Traduci(_titleString);
lblMessUtente.Text = traduci(_titleString);
//doppio in english!
_titleString = "";
Session["_titleString"] = _titleString;
@@ -108,54 +113,30 @@ public partial class mod_menuTop : ApplicationUserControl
}
else
{
string titolo = user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("welcomeApp"));
string titolo = traduci(SteamWare.memLayer.ML.confReadString("welcomeApp"));
lblMessUtente.Text = string.Format("{0} - {1}", titolo, memLayer.ML.confReadString("SiteName"));
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);
btnLogOut.Text = traduci("LogOut");
btnUpdate.Text = traduci("Update");
lblUser.Text = String.Format("{0}: {1}", traduci("User"), user_std.UtSn.CognomeNome);
setTimer();
setClock();
}
}
}
/// <summary>
/// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
/// </summary>
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)
protected void btnLogOut_Click(object sender, EventArgs e)
{
setClock();
Session.Abandon();
Response.Redirect("forceUser.aspx");
}
private void setClock()
protected void btnUpdate_Click(object sender, EventArgs e)
{
lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
}
protected void lblUser_Click(object sender, EventArgs e)
{
Response.Redirect("./chLang.aspx");
}
/// <summary>
/// redirect
/// </summary>
private void returnHome()
{
Response.Redirect(memLayer.ML.CRS("baseUrl"));
doFullDataUpdate();
}
/// <summary>
/// rimanda a pagina precedente
/// </summary>
@@ -165,4 +146,42 @@ public partial class mod_menuTop : ApplicationUserControl
{
returnHome();
}
}
protected void lblUser_Click(object sender, EventArgs e)
{
Response.Redirect("./chLang.aspx");
}
protected void lnkShowHide_Click(object sender, EventArgs e)
{
// cambio visibilità del menù laterale...
if (eh_toggleMenuSx != null)
{
eh_toggleMenuSx(this, new EventArgs());
}
}
protected override void loadSessionData()
{
base.loadSessionData();
_titleString = SteamWare.memLayer.ML.StringSessionObj("_titleString");
}
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
btnLogOut.Visible = user_std.UtSn.isForcedUser;
if (memLayer.ML.isInSessionObject("doUpdateNow"))
{
doFullDataUpdate();
memLayer.ML.emptySessionVal("doUpdateNow");
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
setClock();
}
#endregion Protected Methods
}
@@ -10,31 +10,22 @@ using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
public partial class mod_periodoAnalisi : System.Web.UI.UserControl
{
#region area protected
#region Protected Fields
protected intervalloDate _intervallo;
public string uid
{
get
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
}
}
#endregion Protected Fields
#region Public Events
public event EventHandler eh_doUpdate;
#endregion Public Events
#region Protected Properties
/// <summary>
/// avvio componente
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
setIntervallo();
setDurataMin();
}
/// <summary>
/// definisce se sia da mostrare il selettore delle ore nel controllo
/// </summary>
@@ -62,62 +53,58 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
}
}
/// <summary>
/// gestione del selettore rapido dell'intervallo temporale...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
#endregion Protected Properties
#region Public Properties
public intervalloDate intervalloAnalisi
{
// verifico cosa sia cambiato ed imposto date...
datario _datario = new datario();
switch (DropDownList1.SelectedValue)
get
{
case "oggi":
_intervallo = _datario.giornata(DateTime.Now);
break;
case "ieri":
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
break;
case "ultimi 7gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
break;
case "questa settimana":
_intervallo = _datario.questaSett(DateTime.Now);
break;
case "ultimi 30gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
break;
case "questo mese":
_intervallo = _datario.questoMese(DateTime.Now);
break;
case "mese precedente":
_intervallo = _datario.mesePrecedente(DateTime.Now);
break;
case "questo anno":
_intervallo = _datario.estremiAnno(DateTime.Now);
break;
case "1 anno":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
break;
case "10 anni":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 3660);
break;
case "2000 +":
DateTime anno2000 = new DateTime(2000, 1, 1);
_intervallo = _datario.setIntervallo(anno2000, DateTime.Now.AddDays(1));
break;
default:
break;
var answ = new intervalloDate();
if (memLayer.ML.isInSessionObject("_intervallo"))
{
answ = (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
}
return answ;
}
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
set
{
verificaCoerenzaDate();
aggiornaDateMostrate(realtimeUpdate);
// mostro btn update
btnUpdate.Visible = !realtimeUpdate;
intervalloDate interv = value;
Session["_intervallo"] = interv;
Session["_inizio"] = interv.inizio;
Session["_fine"] = interv.fine;
aggiornaDateMostrate(false);
}
}
/// <summary>
/// imposta realtime update (non mostra button am fa subito update)
/// </summary>
public bool realtimeUpdate
{
get
{
return memLayer.ML.BoolSessionObj("rltUpdatePeriodo");
}
set
{
memLayer.ML.setSessionVal("rltUpdatePeriodo", value);
}
}
public string uid
{
get
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
}
}
#endregion Public Properties
#region Private Methods
/// <summary>
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
/// </summary>
@@ -130,6 +117,46 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
reportUpdate();
}
}
private void aggiornaPeriodo()
{
_intervallo = new intervalloDate();
// calcolo tempi arrotondati
int oraInizio = 0;
int oraFine = 0;
if (mostraSelOra)
{
oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
}
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
verificaCoerenzaDate();
int _durataMin;
_durataMin = Convert.ToInt32(txtDurataMin.Text);
Session["_durataMin"] = _durataMin;
reportUpdate();
}
/// <summary>
/// controlla se aggiornare subito o mostrare update (a seconda del valore di realtime update...)
/// </summary>
private void checkIfUpdate()
{
// se richiesto realtime
if (realtimeUpdate)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
else
{
// altrimenti mostro btn update
btnUpdate.Visible = true;
}
}
/// <summary>
/// scrive nuove date in controllo
/// </summary>
@@ -155,6 +182,25 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
ddlOraFine.Visible = false;
}
}
/// <summary>
/// imposta durata minima
/// </summary>
private void setDurataMin()
{
int _durataMin;
if (memLayer.ML.isInSessionObject("_durataMin"))
{
_durataMin = memLayer.ML.IntSessionObj("_durataMin");
}
else
{
_durataMin = 0;
memLayer.ML.setSessionVal("_durataMin", _durataMin);
}
txtDurataMin.Text = _durataMin.ToString();
}
/// <summary>
/// imposta intervallo da sessione o di default
/// </summary>
@@ -163,65 +209,23 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
intervalloDate _intervallo;
try
{
_intervallo = (intervalloDate)Session["_intervallo"];
if (memLayer.ML.isInSessionObject("_intervallo"))
{
_intervallo = (intervalloDate)memLayer.ML.objSessionObj("_intervallo");
}
}
catch
{
_intervallo = new intervalloDate();
_intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom"));
_intervallo.fine = DateTime.Now.AddDays(1);
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();
}
/// <summary>
/// imposta durata minima
/// </summary>
private void setDurataMin()
{
int _durataMin;
try
{
_durataMin = (int)Session["_durataMin"];
}
catch
{
_durataMin = 0;
Session["_durataMin"] = _durataMin;
}
txtDurataMin.Text = _durataMin.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
lblPeriodo.Text = "Periodo";
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
lblDurataMin.Text = "Visualizza eventi con durata superiore a";
}
private void aggiornaPeriodo()
{
_intervallo = new intervalloDate();
// calcolo tempi arrotondati
int oraInizio = 0;
int oraFine = 0;
if (mostraSelOra)
{
oraInizio = Convert.ToInt32(ddlOraInizio.SelectedValue);
oraFine = Convert.ToInt32(ddlOraFine.SelectedValue);
}
_intervallo.inizio = Convert.ToDateTime(txtInizio.Text).AddHours(oraInizio);
_intervallo.fine = Convert.ToDateTime(txtFine.Text).AddHours(oraFine);
verificaCoerenzaDate();
int _durataMin;
_durataMin = Convert.ToInt32(txtDurataMin.Text);
Session["_durataMin"] = _durataMin;
reportUpdate();
}
/// <summary>
/// verifica che le date dell'intervallo siano coerenti (inizio < fine)
/// </summary>
@@ -240,46 +244,11 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
//intervalloAnalisi = _intervallo;
aggiornaDateMostrate(false);
}
/// <summary>
/// evento cambio testo data inizio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtInizio_TextChanged(object sender, EventArgs e)
{
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
/// <summary>
/// evento cambio testo data fine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtFine_TextChanged(object sender, EventArgs e)
{
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
/// <summary>
/// controlla se aggiornare subito o mostrare update (a seconda del valore di realtime update...)
/// </summary>
private void checkIfUpdate()
{
// se richiesto realtime
if (realtimeUpdate)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
else
{
// altrimenti mostro btn update
btnUpdate.Visible = true;
}
}
#endregion Private Methods
#region Protected Methods
/// <summary>
/// in questo caso faccio udpate periodo mostrato
/// </summary>
@@ -291,6 +260,94 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
// nascondo btn update
btnUpdate.Visible = false;
}
/// <summary>
/// gestione del selettore rapido dell'intervallo temporale...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
// verifico cosa sia cambiato ed imposto date...
datario _datario = new datario();
switch (DropDownList1.SelectedValue)
{
case "oggi":
_intervallo = _datario.giornata(DateTime.Now);
break;
case "ieri":
_intervallo = _datario.giornata(DateTime.Now.AddDays(-1));
break;
case "ultimi 7gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 7);
break;
case "questa settimana":
_intervallo = _datario.questaSett(DateTime.Now);
break;
case "ultimi 30gg":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 30);
break;
case "questo mese":
_intervallo = _datario.questoMese(DateTime.Now);
break;
case "mese precedente":
_intervallo = _datario.mesePrecedente(DateTime.Now);
break;
case "questo anno":
_intervallo = _datario.estremiAnno(DateTime.Now);
break;
case "1 anno":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 366);
break;
case "10 anni":
_intervallo = _datario.ultimiGiorni(DateTime.Now, 3660);
break;
case "2000 +":
DateTime anno2000 = new DateTime(2000, 1, 1);
_intervallo = _datario.setIntervallo(anno2000, DateTime.Now.AddDays(1));
break;
default:
break;
}
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
{
verificaCoerenzaDate();
aggiornaDateMostrate(realtimeUpdate);
// mostro btn update
btnUpdate.Visible = !realtimeUpdate;
}
}
/// <summary>
/// avvio componente
/// </summary>
/// <param name="e"></param>
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
setIntervallo();
setDurataMin();
}
protected void Page_Load(object sender, EventArgs e)
{
lblPeriodo.Text = "Periodo";
txtInizio.ToolTip = "inizio periodo di riferimento per i dati mostrati";
txtFine.ToolTip = "fine periodo di riferimento per i dati mostrati";
lblDurataMin.Text = "Visualizza eventi con durata superiore a";
}
/// <summary>
/// riporta aggiornamento a controller
/// </summary>
@@ -304,25 +361,34 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
}
}
#endregion
#region area public
public intervalloDate intervalloAnalisi
/// <summary>
/// evento cambio testo data fine
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtFine_TextChanged(object sender, EventArgs e)
{
get
{
return (intervalloDate)Session["_intervallo"];
}
set
{
intervalloDate interv = value;
Session["_intervallo"] = interv;
Session["_inizio"] = interv.inizio;
Session["_fine"] = interv.fine;
aggiornaDateMostrate(false);
}
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
/// <summary>
/// evento cambio testo data inizio
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtInizio_TextChanged(object sender, EventArgs e)
{
// imposto il selettore a discesa...
setPeriodoFree();
checkIfUpdate();
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// effettua update
/// </summary>
@@ -331,6 +397,7 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
{
aggiornaDateMostrate(doReportUpdate);
}
/// <summary>
/// imposta periodo libero di selezione
/// </summary>
@@ -338,27 +405,6 @@ public partial class mod_periodoAnalisi : System.Web.UI.UserControl
{
DropDownList1.SelectedIndex = 0;
}
/// <summary>
/// imposta realtime update (non mostra button am fa subito update)
/// </summary>
public bool realtimeUpdate
{
get
{
return memLayer.ML.BoolSessionObj("rltUpdatePeriodo");
}
set
{
memLayer.ML.setSessionVal("rltUpdatePeriodo", value);
}
}
#region gestione eventi
public event EventHandler eh_doUpdate;
#endregion
#endregion
}
#endregion Public Methods
}
@@ -12,9 +12,27 @@ using SteamWare;
public partial class mod_unauthorized : System.Web.UI.UserControl
{
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
lblTitle.Text = user_std.UtSn.Traduci("NonDisponibile");
lblMess.Text = user_std.UtSn.Traduci("NonAuth");
lblTitle.Text = traduci("NonDisponibile");
lblMess.Text = traduci("NonAuth");
}
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
#endregion Public Methods
}
+11 -11
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW_Admin
@@ -15,20 +15,20 @@ namespace GPW_Admin
{
/// <summary>
/// Controllo mod_approvaTimbr1.
/// mod_approvaTimbr1 control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Admin.WebUserControls.mod_approvaTimbr mod_approvaTimbr1;
/// <summary>
/// Controllo mod_pageSize.
/// mod_pageSize control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW_Admin.WebUserControls.mod_pageSize mod_pageSize;
}
+49 -12
View File
@@ -10,6 +10,7 @@ using System.Web;
using static GPW_data.LiManObj;
using System.Text;
using System.Security.Cryptography;
using System.Diagnostics;
namespace GPW_data
{
@@ -33,6 +34,7 @@ namespace GPW_data
protected static string rkeyAppInfo = memLayer.ML.redHash($"LiMan:AppInfo");
protected static string rkeyLicInfo = memLayer.ML.redHash($"LiMan:LicInfo");
protected static string rkeyPayload = memLayer.ML.redHash($"LiMan:Payload");
protected static string rkeyVetoRefPayL = memLayer.ML.redHash($"LiMan:VetoRefPayL");
#endregion Protected Fields
@@ -113,22 +115,34 @@ namespace GPW_data
{
bool answ = false;
string currPayload = "";
try
tryCheckPayloadOnline(ref answ, ref currPayload);
// se OK resetto counter, altrimenti incremento
if (!answ)
{
// cerco payload licenze locale...
currPayload = memLayer.ML.getRSV(rkeyPayload);
// se no ci fosse --> refresh online!
if (string.IsNullOrEmpty(currPayload))
bool okRefreshPayload = string.IsNullOrEmpty(memLayer.ML.getRSV(rkeyVetoRefPayL));
if (okRefreshPayload)
{
currPayload = calcPayload();
memLayer.ML.setRSV(rkeyPayload, currPayload, 3600);
Stopwatch sw = new Stopwatch();
sw.Start();
// richiedo update payload impostando TTL a 1 sec...
memLayer.ML.setRSV(rkeyPayload, "", 1);
var okApp = RefreshAppInfo().Result;
var okLic = RefreshActInfo().Result;
var okAct = RefreshLicInfo().Result;
var okPld = RefreshPayload().Result;
memLayer.ML.setRSV(rkeyVetoRefPayL, "Veto", 5);
sw.Stop();
logger.lg.scriviLog($"Trovato payload non valido, effettuato reset variabili in {sw.ElapsedMilliseconds} ms");
sw.Start();
tryCheckPayloadOnline(ref answ, ref currPayload);
sw.Stop();
logger.lg.scriviLog($"Rivalutato payload con esito {answ} in {sw.ElapsedMilliseconds} ms");
}
// confronto
answ = InfoApplicativo.Payload == currPayload;
}
catch
{ }
// confronto payload calc con quello della licenza
return answ;
}
}
@@ -343,6 +357,29 @@ namespace GPW_data
#endregion Public Properties
#region Private Methods
private static void tryCheckPayloadOnline(ref bool answ, ref string currPayload)
{
try
{
// cerco payload licenze locale...
currPayload = memLayer.ML.getRSV(rkeyPayload);
// se no ci fosse --> refresh online!
if (string.IsNullOrEmpty(currPayload))
{
currPayload = calcPayload();
memLayer.ML.setRSV(rkeyPayload, currPayload, 3600);
}
// confronto payload calc con quello della licenza
answ = InfoApplicativo.Payload == currPayload;
}
catch
{ }
}
#endregion Private Methods
#region Protected Methods
protected static string calcPayload()