Pulizia codice da componenti inutili (sia progetto MAIN che SMART) + redirect

This commit is contained in:
Samuele E. Locatelli
2016-12-14 10:13:05 +01:00
parent 8a7c2663af
commit 560ace01f5
92 changed files with 128 additions and 5812 deletions
-23
View File
@@ -1,23 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="GPW.A3.Admin" %>
<%@ Register Src="~/WebUserControls/mod_resetUserAuthKey.ascx" TagName="mod_resetUserAuthKey" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_sendAuthToEmail.ascx" TagName="mod_sendAuthToEmail" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Admin Page
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div data-role="content">
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a">
<h3>
Reset User AuthKey</h3>
<uc1:mod_resetUserAuthKey ID="mod_resetUserAuthKey1" runat="server" />
</div>
</div>
<div data-role="content">
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a">
<h3>
Email AuthSecret</h3>
<uc2:mod_sendAuthToEmail ID="mod_sendAuthToEmail1" runat="server" />
</div>
</div>
</asp:Content>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class Admin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-33
View File
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class Admin {
/// <summary>
/// mod_resetUserAuthKey1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_resetUserAuthKey mod_resetUserAuthKey1;
/// <summary>
/// mod_sendAuthToEmail1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_sendAuthToEmail mod_sendAuthToEmail1;
}
}
+2 -5
View File
@@ -1,6 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW.A3.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
@@ -9,10 +9,7 @@
<body>
<form id="form1" runat="server">
<div>
<h1>
Smart device</h1>
<p>
Default page</p>
</div>
</form>
</body>
+3 -7
View File
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using System;
namespace GPW.A3
{
@@ -11,7 +7,7 @@ namespace GPW.A3
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect("Timbrature.aspx");
Response.Redirect(memLayer.ML.CRS("GpwSmartUrl"));
}
}
}
-9
View File
@@ -1,9 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Progetti.aspx.cs" Inherits="GPW.A3.Progetti" %>
<%@ Register Src="~/WebUserControls/mod_commAttivita.ascx" TagName="mod_commAttivita" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Progetti
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_commAttivita ID="mod_commAttivita1" runat="server" returnPage="Progetti.aspx" />
</asp:Content>
-21
View File
@@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GPW.A3
{
public partial class Progetti : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//if (!Page.IsPostBack)
//{
// mod_commAttivita1.dataRif = DateTime.Now;
//}
}
}
}
-24
View File
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class Progetti {
/// <summary>
/// mod_commAttivita1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commAttivita mod_commAttivita1;
}
}
-54
View File
@@ -1,54 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GPW.A3.Test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>nativeDroid II - jQueryMobile Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.css" />
<link rel="stylesheet" href="../Content/waves/waves.min.css" />
<link rel="stylesheet" href="../Content/wow/animate.css" />
<link rel="stylesheet" href="../Content/nativeDroid/nativedroid2.css" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>
<body>
<form id="form1" runat="server">
<div data-role="page">
<nd2-include data-src="~/fragments/panel.left.html"></nd2-include>
<div data-role="panel" id="bottomsheet" data-animate="false" data-position='bottom' data-display="overlay">
<nd2-include data-src="~/fragments/bottom.sheet.html"></nd2-include>
</div>
<div data-role="header" data-position="fixed" class="wow fadeInDown" data-wow-delay="0.2s">
<a href="#bottomsheet" class="ui-btn ui-btn-right wow fadeIn" data-wow-delay='1.2s'><i class="zmdi zmdi-more-vert"></i></a>
<a href="#leftpanel" class="ui-btn ui-btn-left wow fadeIn" data-wow-delay='0.8s'><i class="zmdi zmdi-menu"></i></a>
<h1 class="wow fadeIn" data-wow-delay='0.4s'>Page Title</h1>
</div>
<div role="main" class="ui-content" data-inset="false">
<p>(home)</p>
test pagina JQM finto android...
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script>
<script src="../Content/waves/waves.min.js"></script>
<script src="../Content/wow/wow.min.js"></script>
<script src="../Scripts/nativedroid2.js"></script>
<script src="../Scripts/nd2settings.js"></script>
</form>
</body>
</html>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-11
View File
@@ -1,11 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="GPW.A3.Test2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div role="main" class="ui-content" data-inset="false">
<p>(home)</p>
test pagina JQM finto android...
</div>
</asp:Content>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class Test2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-17
View File
@@ -1,17 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3
{
public partial class Test2
{
}
}
+15 -8
View File
@@ -1,9 +1,16 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Timbrature.aspx.cs" Inherits="GPW.A3.Timbrature" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Timbrature.aspx.cs" Inherits="GPW.A3.Timbrature" %>
<%@ Register Src="~/WebUserControls/mod_timbrature.ascx" TagName="mod_timbrature" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Timbrature
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_timbrature ID="mod_timbrature1" runat="server" />
</asp:Content>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
+3 -11
View File
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GPW_data;
using SteamWare;
using System;
namespace GPW.A3
{
@@ -12,10 +7,7 @@ namespace GPW.A3
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
utils.mng.dailyDuties();
}
Response.Redirect(memLayer.ML.CRS("GpwSmartUrl"));
}
}
}
+10 -8
View File
@@ -3,22 +3,24 @@
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class Timbrature {
namespace GPW.A3
{
public partial class Timbrature
{
/// <summary>
/// mod_timbrature1 control.
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_timbrature mod_timbrature1;
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}
-7
View File
@@ -1,7 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="attivitaIns.aspx.cs" Inherits="GPW.A3.attivitaIns" %>
<%@ Register src="~/WebUserControls/mod_attivitaIns.ascx" tagname="mod_attivitaIns" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_attivitaIns ID="mod_attivitaIns1" runat="server" />
</asp:Content>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class attivitaIns : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-24
View File
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class attivitaIns {
/// <summary>
/// mod_attivitaIns1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_attivitaIns mod_attivitaIns1;
}
}
-9
View File
@@ -1,9 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="mancataTimbr.aspx.cs" Inherits="GPW.A3.mancataTimbr" EnableEventValidation="false" %>
<%@ Register Src="~/WebUserControls/mod_mancTimb.ascx" TagName="mod_mancTimb" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Mancate Timbrature
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_mancTimb ID="mod_mancTimb1" runat="server" />
</asp:Content>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class mancataTimbr : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-24
View File
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class mancataTimbr {
/// <summary>
/// mod_mancTimb1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_mancTimb mod_mancTimb1;
}
}
-8
View File
@@ -1,8 +0,0 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileNoCookie.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="regNewDevice.aspx.cs" Inherits="GPW.A3.regNewDevice" %>
<%@ Register Src="~/WebUserControls/mod_regNewDevice.ascx" TagName="mod_regNewDevice" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_regNewDevice ID="mod_regNewDevice1" runat="server" />
</asp:Content>
-17
View File
@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
{
public partial class regNewDevice : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
-24
View File
@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
public partial class regNewDevice {
/// <summary>
/// mod_regNewDevice1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_regNewDevice mod_regNewDevice1;
}
}
+8 -56
View File
@@ -141,14 +141,7 @@
<Content Include="A1\unauthorized.aspx" />
<Content Include="A2\Barcode.aspx" />
<Content Include="A2\Default.aspx" />
<Content Include="A3\Admin.aspx" />
<Content Include="A3\attivitaIns.aspx" />
<Content Include="A3\Default.aspx" />
<Content Include="A3\mancataTimbr.aspx" />
<Content Include="A3\Progetti.aspx" />
<Content Include="A3\regNewDevice.aspx" />
<Content Include="A3\Test.aspx" />
<Content Include="A3\Test2.aspx" />
<Content Include="A3\Timbrature.aspx" />
<Content Include="A4\attivita.aspx" />
<Content Include="A4\attivitaIns.aspx" />
@@ -503,6 +496,7 @@
<Content Include="Scripts\nativedroid2.js" />
<Content Include="Scripts\nd2settings.js" />
<Content Include="Smart\Default.aspx" />
<Content Include="Smart\Timbrature.aspx" />
<Content Include="unauthorized.aspx" />
<Content Include="About.aspx" />
<Content Include="App_Readme\Elmah.txt" />
@@ -890,20 +884,6 @@
<Compile Include="A2\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Admin.aspx.cs">
<DependentUpon>Admin.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\Admin.aspx.designer.cs">
<DependentUpon>Admin.aspx</DependentUpon>
</Compile>
<Compile Include="A3\attivitaIns.aspx.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\attivitaIns.aspx.designer.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -911,41 +891,6 @@
<Compile Include="A3\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="A3\mancataTimbr.aspx.cs">
<DependentUpon>mancataTimbr.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\mancataTimbr.aspx.designer.cs">
<DependentUpon>mancataTimbr.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Progetti.aspx.cs">
<DependentUpon>Progetti.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\Progetti.aspx.designer.cs">
<DependentUpon>Progetti.aspx</DependentUpon>
</Compile>
<Compile Include="A3\regNewDevice.aspx.cs">
<DependentUpon>regNewDevice.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\regNewDevice.aspx.designer.cs">
<DependentUpon>regNewDevice.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Test.aspx.cs">
<DependentUpon>Test.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\Test.aspx.designer.cs">
<DependentUpon>Test.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Test2.aspx.cs">
<DependentUpon>Test2.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A3\Test2.aspx.designer.cs">
<DependentUpon>Test2.aspx</DependentUpon>
</Compile>
<Compile Include="A3\Timbrature.aspx.cs">
<DependentUpon>Timbrature.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1037,6 +982,13 @@
<Compile Include="Smart\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="Smart\Timbrature.aspx.cs">
<DependentUpon>Timbrature.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Smart\Timbrature.aspx.designer.cs">
<DependentUpon>Timbrature.aspx</DependentUpon>
</Compile>
<Compile Include="unauthorized.aspx.cs">
<DependentUpon>unauthorized.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
-5
View File
@@ -1,10 +1,5 @@
using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.Smart
{
+16
View File
@@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Timbrature.aspx.cs" Inherits="GPW.Smart.Timbrature" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
using SteamWare;
using System;
namespace GPW.Smart
{
public partial class Timbrature : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect(memLayer.ML.CRS("GpwSmartUrl"));
}
}
}
@@ -7,11 +7,11 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3
namespace GPW.Smart
{
public partial class Test
public partial class Timbrature
{
/// <summary>
+1 -1
View File
@@ -121,7 +121,7 @@
<add key="authKey" value="keyhammer" />
<add key="baseUrl" value="http://iis02/GPW/" />
<add key="baseWebUrl" value="http://seriate.steamware.net:8083/GPW/" />
<add key="GpwSmartUrl" value="../GPW-Smart" />
<add key="GpwSmartUrl" value="../../GPW-Smart" />
<!--Gestione SSRS-->
<add key="reportBaseUrl" value="http://sql-steam/ReportServer?/Steamware/" />
<!--<add key="reportBaseUrl" value="http://sql-steam/Reports/Pages/Report.aspx?ItemPath=/Steamware/" />-->
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="GPW.A3.Admin" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="GPW_Smart.Admin" %>
<%@ Register Src="~/WebUserControls/mod_resetUserAuthKey.ascx" TagName="mod_resetUserAuthKey" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_sendAuthToEmail.ascx" TagName="mod_sendAuthToEmail" TagPrefix="uc2" %>
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Admin : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class Admin {
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW.A3.Default" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW_Smart.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Default : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3
namespace GPW_Smart
{
-16
View File
@@ -113,11 +113,9 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<Content Include="About.aspx" />
<Content Include="Admin.aspx" />
<Content Include="App_Readme\Elmah.txt" />
<Content Include="attivitaIns.aspx" />
<Content Include="Contact.aspx" />
<Content Include="Content\bootstrap-theme.css" />
<Content Include="Content\bootstrap-theme.min.css">
<DependentUpon>bootstrap-theme.css</DependentUpon>
@@ -560,13 +558,6 @@
<DependentUpon>Admin.aspx</DependentUpon>
</Compile>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="About.aspx.cs">
<DependentUpon>About.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="About.aspx.designer.cs">
<DependentUpon>About.aspx</DependentUpon>
</Compile>
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="attivitaIns.aspx.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
@@ -575,13 +566,6 @@
<Compile Include="attivitaIns.aspx.designer.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
</Compile>
<Compile Include="Contact.aspx.cs">
<DependentUpon>Contact.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Contact.aspx.designer.cs">
<DependentUpon>Contact.aspx</DependentUpon>
</Compile>
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Progetti.aspx.cs" Inherits="GPW.A3.Progetti" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Progetti.aspx.cs" Inherits="GPW_Smart.Progetti" %>
<%@ Register Src="~/WebUserControls/mod_commAttivita.ascx" TagName="mod_commAttivita" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+1 -1
View File
@@ -6,7 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Progetti : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class Progetti {
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GPW.A3.Test" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="GPW_Smart.Test" %>
<!DOCTYPE html>
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Test : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3
namespace GPW_Smart
{
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="GPW.A3.Test2" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="GPW_Smart.Test2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Test2 : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3
namespace GPW_Smart
{
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Timbrature.aspx.cs" Inherits="GPW.A3.Timbrature" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/JQMob.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="Timbrature.aspx.cs" Inherits="GPW_Smart.Timbrature" %>
<%@ Register Src="~/WebUserControls/mod_timbrature.ascx" TagName="mod_timbrature" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_opzTimbratura.ascx" TagPrefix="uc1" TagName="mod_opzTimbratura" %>
+4 -1
View File
@@ -5,8 +5,9 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GPW_data;
using GPW.WebMasterPages;
namespace GPW.A3
namespace GPW_Smart
{
public partial class Timbrature : System.Web.UI.Page
{
@@ -15,6 +16,8 @@ namespace GPW.A3
if (!Page.IsPostBack)
{
utils.mng.dailyDuties();
((JQMob)Master).showSettings = false;
((JQMob)Master).showLeftPnl = true;
}
mod_opzTimbratura.ev_reqAbilitaAll += Mod_opzTimbratura_ev_reqAbilitaAll;
}
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class Timbrature {
+2 -2
View File
@@ -47,8 +47,8 @@
<div data-role="page">
<div data-role="header" data-position="fixed" class="wow">
<a href="#bottomsheet" class="ui-btn ui-btn-right wow fadeIn" data-wow-delay='0.2s'><i class="zmdi zmdi-more-vert"></i></a>
<a href="#leftpanel" class="ui-btn ui-btn-left wow fadeIn" data-wow-delay='0.1s'><i class="zmdi zmdi-menu"></i></a>
<a href="#bottomsheet" class="ui-btn ui-btn-right wow fadeIn <%: hideSettings %>" data-wow-delay='0.2s'><i class="zmdi zmdi-more-vert"></i></a>
<a href="#leftpanel" class="ui-btn ui-btn-left wow fadeIn <%: hideLeftPnl %>" data-wow-delay='0.1s'><i class="zmdi zmdi-menu"></i></a>
<h3>
<uc2:mod_title ID="mod_title1" runat="server" />
</h3>
+22
View File
@@ -35,5 +35,27 @@ namespace GPW.WebMasterPages
if (Request.Url.ToString().Contains(nomeElem.ToString())) answ = "ui-btn-active";
return answ;
}
public bool showSettings { get; set; }
public bool showLeftPnl{ get; set; }
public string hideSettings
{
get
{
string answ = "";
if (!showSettings) answ = "hidden";
return answ;
}
}
public string hideLeftPnl
{
get
{
string answ = "";
if (!showLeftPnl) answ = "hidden";
return answ;
}
}
}
}
@@ -1,225 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commAttivitaDesk.ascx.cs" Inherits="GPW.WebUserControls.mod_commAttivitaDesk" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc1" %>
<%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc2" TagName="mod_autocomplete" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:Panel runat="server" ID="pnlAll" Height="100%">
<asp:Panel runat="server" ID="pnlHeader" class="dataBlockHeader" Style="height: 30px; text-align: center; margin: auto; font-size: 12pt;">
<asp:Label runat="server" ID="lblTitle" />
<div class="divDx">
<asp:ImageButton ID="imgBtnNew" runat="server" ToolTip="Nuovo" CausesValidation="False" OnClick="btnNew_Click" ImageUrl="~/images/new_l.png" />
</div>
</asp:Panel>
<div class="dataBlockReset" style="padding: 4px 0px 4px 0px;">
<asp:GridView ID="grView" runat="server" DataSourceID="odsRA" AutoGenerateColumns="False" OnRowDeleted="grView_RowDeleted"
OnRowCommand="grView_RowCommand" DataKeyNames="idxRA" OnRowDataBound="grView_RowDataBound" OnRowEditing="grView_RowEditing"
ShowHeader="false" Width="100%" OnRowUpdated="grView_RowUpdated">
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<EditRowStyle CssClass="editRowStyle" />
<FooterStyle CssClass="footerRowStyle" />
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
<RowStyle CssClass="rowStyle" />
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
<SortedAscendingCellStyle CssClass="sortAscCell" />
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
<SortedDescendingCellStyle CssClass="sortDescCell" />
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record COMMESSA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgClona" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Update"
ToolTip='<%# traduci("Duplica") %>' ImageUrl="~/images/clonaObj_l.png" OnClick="imgClona_Click" Visible='<%# enableFull %>' />
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
<HeaderTemplate>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Record Commesse">
<ItemTemplate>
<div>
<asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
CssClass="noLink" Enabled='<%# enableFull %>'>
<div style="padding: 4px 4px 1px 4px; width: 326px;">
<div class="divSx">
<div style="font-size: 10pt; color: Black;">
<b>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("RagSociale") %>' /></b>|
<asp:Label ID="Label2" runat="server" Text='<%# Eval("nomeProj") %>' ForeColor="GrayText" Font-Size="8pt" />
</div>
<div style="font-size: 8pt;">
<asp:Label ID="Label10" runat="server" Text='<%# Eval("nomeFase") %>' ForeColor="Green" />
</div>
</div>
<div class="divDx" style="text-align: right; white-space: nowrap; right: 0px; top: 0px;">
<div class="ui-corner-all" style="font-size: 8pt; background: #EEE; border: 1px solid #333; color: #333; padding: .1em;">
<asp:Label ID="Label11" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' />
-
<asp:Label ID="Label12" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' />
</div>
<div style="font-size: 11pt; color: #333; padding: .1em;">
<b>
<asp:Label ID="Label13" runat="server" Text='<%# formatDurata(Eval("oreTot")) %>' /></b> h
</div>
</div>
</div>
<div class="clearDiv" style="font-size: 8pt; padding: 1px 4px 4px 4px; color: #333;">
<div style="font-size: 8pt;">
<asp:Label ID="Label9" runat="server" Text='<%# Eval("descrizione").ToString().Replace(Environment.NewLine,"<br />").Replace("\n","<br />") %>' />
</div>
</div>
</asp:LinkButton></div></ItemTemplate><EditItemTemplate>
<div style="padding: 4px 0px 0px 4px; width: 326px;">
<div>
<div class="divSx">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto </label><br /><asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="22em">
</asp:DropDownList>
</div>
<div>
<label for="ddlFase" style="font-size: x-small;">
Fase </label><br /><asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="22em">
</asp:DropDownList>
</div>
</div>
<div class="divSx" style="padding-left: 4px;">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label> <br /><asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="80px" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
<%--<br />
<uc2:mod_autocomplete runat="server" ID="acSearchFase" minCharAutocomplete="2" showKey="false" ServicePath="~/Services/WS_data.asmx/ElencoFasi" placeholder="Search" labelRicerca="search" labelWidth="45px" />--%>
</div>
</div>
<div>
<div class="divSx">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="divDx">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
<div class="divCenter">
&nbsp; </div></div><br />descrizione: <asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="24em" />
<div class="divCenter" style="height: 36px;">
<div class="divSx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsert" Text="Aggiorna" CssClass="btnVerde ui-corner-all shadowBox btnNew" CommandName="Update"
CausesValidation="true" />
</div>
<div class="divDx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btnRosso ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</div>
</EditItemTemplate>
<FooterTemplate>
<div style="padding: 4px 0px 0px 4px; width: 326px;">
<div>
<div class="divSx">
<div>
<label for="ddlProgetto" style="font-size: x-small;">
Progetto </label><br /><asp:DropDownList ID="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" Font-Size="8pt" Width="22em">
</asp:DropDownList>
</div>
<div>
<label for="ddlFase" style="font-size: x-small;">
Fase </label><br /><asp:DropDownList ID="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value" Font-Size="8pt"
OnDataBound="ddlFase_DataBound" Width="22em">
</asp:DropDownList>
</div>
</div>
<div class="divSx" style="padding-left: 4px;">
<label for="txtSearchFase" style="font-size: x-small;">
<-- Search</label> <br /><asp:TextBox runat="server" ID="txtSearchFase" AutoPostBack="true" Width="80px" Font-Size="8pt" OnTextChanged="txtSearchFase_TextChanged" TextMode="MultiLine" />
</div>
</div>
<div class="clearDiv">
<div class="divSx">
<uc1:mod_dateTime ID="dtInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
</div>
<div class="divDx">
<uc1:mod_dateTime ID="dtFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
</div>
<div class="divCenter">
&nbsp; </div></div><br />descrizione: <asp:TextBox ID="txtDescrizione" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="6em" Width="24em" />
<div class="divCenter" style="height: 36px;">
<div class="divSx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsert" Text="Salva" CssClass="btnVerde ui-corner-all shadowBox btnNew" CommandName="Insert"
CausesValidation="true" />
</div>
<div class="divDx third" style="padding: 2px 4px 2px 4px; margin: auto; text-align: center; height: 20px;">
<asp:Button runat="server" ID="btnInsertCancel" Text="Annulla" CssClass="btnRosso ui-corner-all shadowBox btnChiudi" CommandName="Cancel" />
</div>
</div>
</div>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxRA") %>' CommandName="Delete"
ImageUrl="~/images/elimina_l.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# enableFull %>' />
<asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete"></asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRA" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.regAttDayExplTableAdapter"
DeleteMethod="deleteQuery" InsertMethod="insertQuery" OnInserted="odsRA_Inserted" UpdateMethod="updateQuery" OnUpdating="odsRA_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter Name="dataRif" SessionField="dataRif" Type="DateTime" />
</SelectParameters>
<InsertParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter DefaultValue="0" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:Parameter Name="idxFase" Type="Int32" />
<asp:Parameter Name="inizio" Type="DateTime" />
<asp:Parameter Name="fine" Type="DateTime" />
<asp:Parameter Name="descrizione" Type="String" />
<asp:Parameter Name="importo" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsProgetto" runat="server" SelectMethod="getGrouped" TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter">
<SelectParameters>
<asp:Parameter DefaultValue="true" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selFasiOptTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxProjSel" DefaultValue="0" Name="conditio" Type="Int32" />
<asp:Parameter DefaultValue="false" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</asp:Panel>
@@ -1,635 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GPW_data;
using System.Data;
namespace GPW.WebUserControls
{
public partial class mod_commAttivitaDesk : System.Web.UI.UserControl
{
#region area protected / private
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
refreshControlli();
pnlHeader.Visible = enableFull;
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", valoreDateTime);
}
}
/// <summary>
/// minuti selezionati nel controllo radio in testa
/// </summary>
protected int minutiSel
{
get
{
return memLayer.ML.IntSessionObj("stdMinDurata");
}
set
{
memLayer.ML.setSessionVal("stdMinDurata", value);
}
}
/// <summary>
/// refresh dei controlli
/// </summary>
private void refreshControlli()
{
bool doDataBound = true;
switch (stato)
{
case statoControllo.edit:
doDataBound = true;
//grView.ShowFooter = false;
//grView.SelectedIndex = grView.EditIndex;
//int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
//// pre-seleziono idx progetto x ods fase...
//idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
//idxProjSel = idxPrjByFase(idxFaseSel);
break;
case statoControllo.insert:
grView.ShowFooter = true;
grView.DataBind();
// imposto arrotondato ad ora...
DateTime inizio = valoreDateTime.Date.AddHours(DateTime.Now.Hour);
// imposto durate standard!
int minuti = minutiSel;
if (minuti < 0)
{
minuti = 60;
}
// cerco ultimo valore inserito odierno (se c'è)
try
{
DS_Applicazione.RegAttivitaDataTable tabRA = DataProxy.DP.taRA.getByDipData(idxDipCurr, inizio.Date, inizio.Date.AddDays(1));
inizio = tabRA[tabRA.Rows.Count - 1].fine;
}
catch
{
}
#if false
// provo a leggere valore editato (se c'è...)
try
{
DateTime inizioSel = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
if (inizioSel != inizio && inizio != valoreDateTime.Date.AddHours(DateTime.Now.Hour)) inizio = inizioSel;
}
catch
{
}
#endif
// cerco di impostare inizio/fine
try
{
((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime = inizio;
((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime = inizio.AddMinutes(minuti);
}
catch
{ }
doDataBound = false;
break;
case statoControllo.item:
grView.ShowFooter = false;
// cerco di impostare inizio/fine
if (grView.EditIndex >= 0)
{
if (minutiSel > 0)
{
try
{
//salvo valori selezionati
string descrizione = ((TextBox)grView.Rows[grView.EditIndex].FindControl("txtDescrizione")).Text;
DateTime inizioEdit = ((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtInizio")).valoreDateTime;
grView.DataBind();
// reimposto! con durata calcolata
((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtInizio")).valoreDateTime = inizioEdit;
((mod_dateTime)grView.Rows[grView.EditIndex].FindControl("dtFine")).valoreDateTime = inizioEdit.AddMinutes(minutiSel);
((TextBox)grView.Rows[grView.EditIndex].FindControl("txtDescrizione")).Text = descrizione;
// DISATTIVO COLLEGAMENTO A DATI...
doDataBound = false;
}
catch
{ }
}
}
break;
default:
break;
}
if (doDataBound)
{
grView.DataBind();
}
}
/// <summary>
/// salvo in session che il prox comando è clonare...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgClona_Click(object sender, ImageClickEventArgs e)
{
ImageButton lbtn = (ImageButton)sender;
int idxRa = 0;
try
{
idxRa = Convert.ToInt32(lbtn.CommandArgument);
}
catch
{ }
// chiamo clona!
DataProxy.DP.taRA.clonaRecord(idxRa);
updateControl();
}
/// <summary>
/// fa update del controllo e chiama evento update esterno
/// </summary>
private void updateControl()
{
grView.SelectedIndex = -1;
refreshControlli();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// completato insert! aggiorno!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
stato = statoControllo.item;
refreshControlli();
}
/// <summary>
/// effettuato update
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
updateControl();
}
/// <summary>
/// riga eliminata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
updateControl();
}
/// <summary>
/// recupera i dati di un nuovo record contenuti nel footer di un gridView;
/// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void doInsert()
{
//recupero la riga footer...
int idxDip = DataProxy.idxDipendente;
int idxFase = 0;
DateTime inizio = DateTime.Now;
DateTime fine = DateTime.Now;
string descr = "";
try
{
idxFase = Convert.ToInt32(((DropDownList)grView.FooterRow.FindControl("ddlFase")).SelectedValue);
inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
}
catch
{ }
DataProxy.DP.taRA.Insert(idxDip, idxFase, inizio, fine, descr, 0);
}
/// <summary>
/// riga in edit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowEditing(object sender, GridViewEditEventArgs e)
{
grView.SelectedIndex = e.NewEditIndex;
int idxRASel = Convert.ToInt32(grView.SelectedDataKey["idxRA"]);
// salvo in sessione valori selezionati
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
idxProjSel = idxPrjByFase(idxFaseSel);
}
/// <summary>
/// riga popolata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
{
// controllo la riga
GridViewRow riga = e.Row;
if (grView.EditIndex >= 0 || grView.ShowFooter)
{
try
{
//pre-seleziono idx progetto x ods fase...
DropDownList ddlProj_int = (DropDownList)riga.FindControl("ddlProgetto");
if (idxProjSel >= 0 && (ddlProj_int != null))
{
ddlProj_int.SelectedValue = idxProjSel.ToString();
}
DropDownList ddlFase_int = (DropDownList)riga.FindControl("ddlFase");
if (idxFaseSel >= 0 && (ddlFase_int != null))
{
ddlFase_int.SelectedValue = idxFaseSel.ToString();
}
}
catch
{ }
}
}
/// <summary>
/// intercetto update!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
DropDownList ddlfase_int = (DropDownList)grView.Rows[grView.EditIndex].FindControl("ddlFase");
e.InputParameters["idxFase"] = ddlfase_int.SelectedValue;
}
/// <summary>
/// aggiorno ods fasi...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlProgetto_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo in session idxProjSel!
DropDownList ddlProj_int = (DropDownList)sender;
idxProjSel = Convert.ToInt32(ddlProj_int.SelectedValue);
// ricarico dati fasi
odsFase.DataBind();
// se in insert salvo orari e testo...
DateTime inizio = DateTime.Now;
DateTime fine = DateTime.Now;
string descr = "";
if (stato == statoControllo.insert)
{
inizio = ((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime;
fine = ((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime;
descr = ((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text;
}
else
{
// se è edit...
int idx = grView.EditIndex;
inizio = ((mod_dateTime)grView.Rows[idx].FindControl("dtInizio")).valoreDateTime;
fine = ((mod_dateTime)grView.Rows[idx].FindControl("dtFine")).valoreDateTime;
descr = ((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text;
}
refreshControlli();
// se in insert riporto orari e testo...
if (stato == statoControllo.insert)
{
((mod_dateTime)grView.FooterRow.FindControl("dtInizio")).valoreDateTime = inizio;
((mod_dateTime)grView.FooterRow.FindControl("dtFine")).valoreDateTime = fine;
((TextBox)grView.FooterRow.FindControl("txtDescrizione")).Text = descr;
try
{
DropDownList ddlFase_int = (DropDownList)grView.FooterRow.FindControl("ddlFase");
ddlFase_int.SelectedIndex = 1;
}
catch
{ }
}
else
{
// se è edit...
int idx = grView.EditIndex;
((mod_dateTime)grView.Rows[idx].FindControl("dtInizio")).valoreDateTime = inizio;
((mod_dateTime)grView.Rows[idx].FindControl("dtFine")).valoreDateTime = fine;
((TextBox)grView.Rows[idx].FindControl("txtDescrizione")).Text = descr;
try
{
DropDownList ddlFase_int = (DropDownList)grView.Rows[idx].FindControl("ddlFase");
ddlFase_int.SelectedIndex = 1;
}
catch
{ }
}
}
/// <summary>
/// progetto selezionato
/// </summary>
protected int idxProjSel
{
get
{
return memLayer.ML.IntSessionObj("idxProjSel");
}
set
{
memLayer.ML.setSessionVal("idxProjSel", value);
}
}
/// <summary>
/// fase selezionata
/// </summary>
protected int idxFaseSel
{
get
{
return memLayer.ML.IntSessionObj("idxFaseSel");
}
set
{
memLayer.ML.setSessionVal("idxFaseSel", value);
}
}
/// <summary>
/// generico comando riga
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "Cancel":
stato = statoControllo.item;
updateControl();
break;
case "Insert":
doInsert();
stato = statoControllo.item;
updateControl();
break;
default:
break;
}
}
#endregion
#region area public
/// <summary>
/// idxDipendente selezionato (0=tutti)
/// </summary>
public int idxDipCurr
{
get
{
return memLayer.ML.IntSessionObj("idxDipCurr");
}
set
{
memLayer.ML.setSessionVal("idxDipCurr", value);
}
}
/// <summary>
/// progetto selezionato..
/// </summary>
public string idxProgetto
{
get
{
return idxProjSel.ToString();
}
}
/// <summary>
/// abilitato editing + nuovo + delete + clona
/// </summary>
public bool enableFull
{
get
{
bool answ = false;
try
{
answ = memLayer.ML.BoolSessionObj("enableEditComm");
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("enableEditComm", value);
}
}
/// <summary>
/// stato attuale del controllo
/// </summary>
public statoControllo stato
{
get
{
statoControllo answ = statoControllo.item;
try
{
answ = (statoControllo)memLayer.ML.objSessionObj("statoControlloRA");
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("statoControlloRA", value);
}
}
/// <summary>
/// valore datetime selezionato!
/// </summary>
public DateTime valoreDateTime
{
get
{
DateTime answ = DateTime.Now;
try
{
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("dataRif", value);
lblTitle.Text = string.Format("{0:dddd dd/MM/yyyy}", value);
}
}
/// <summary>
/// evento update valori
/// </summary>
public event EventHandler eh_nuovoValore;
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// aggiorna
/// </summary>
public void doUpdate()
{
refreshControlli();
}
/// <summary>
/// calcola idxProgetto da idxFase
/// </summary>
/// <param name="idxFase"></param>
/// <returns></returns>
public int idxPrjByFase(object idxFase)
{
int answ = 0;
try
{
answ = DataProxy.DP.taAF.getByIdx(Convert.ToInt32(idxFase))[0].idxProgetto;
}
catch
{ }
return answ;
}
/// <summary>
/// sistemo eventuali "headers"
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlFase_DataBound(object sender, EventArgs e)
{
// cerco eventuali controlli tipo "ancestor" e li disattivo!
DropDownList ddlFase_int = (DropDownList)sender;
ListItem li = new ListItem();
while (li != null)
{
li = ddlFase_int.Items.FindByValue("0");
try
{
li.Attributes.Add("style", "color:gray;");
li.Attributes.Add("disabled", "true");
li.Value = "-1";
li.Text = string.Format("[ {0} ]", li.Text);
}
catch
{ }
}
try
{
ddlFase_int.SelectedIndex = 1;
}
catch
{ }
}
/// <summary>
/// richiesta creazioen nuovo record
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
// controllo: se ho righe mostro il footer...
stato = statoControllo.insert;
refreshControlli();
}
else
{
// default: inizia ora la dichiarazione
double oraStart = DateTime.Now.Hour;
int durataMinuti = memLayer.ML.IntSessionObj("stdMinDurata");
// se c'è timbratura ingresso prendo quella come ora inizio...
try
{
DS_Applicazione.TimbratureRow riga = DataProxy.DP.taTimb.getByIdxDipPeriodo(DataProxy.idxDipendente, valoreDateTime, valoreDateTime.AddDays(1))[0];
oraStart = Convert.ToDouble(riga.dataOra.Hour + riga.dataOra.Minute / 60);
}
catch
{ }
// altrimenti duplico ultima entry utente..
DataProxy.DP.taRA.clonaLastRA_Utente(DataProxy.idxDipendente, valoreDateTime.AddHours(oraStart), durataMinuti);
updateControl();
}
}
/// <summary>
/// esegue ricerca progetto/fase x sovrascrivere
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtSearchFase_TextChanged(object sender, EventArgs e)
{
// recupero testo...
string search = "";
try
{
search = ((TextBox)sender).Text.Trim();
}
catch
{ }
if (search != "")
{
// faccio ricerca x progetto e fase...
GPW_data.DS_Utility.stp_VSProjFasi_searchDataTable tabRes = DataProxy.DP.taVSProjFasiSearch.GetData(search);
if (tabRes.Rows.Count > 0)
{
idxFaseSel = tabRes[0].idxFase;
idxProjSel = tabRes[0].idxProgetto;
}
}
//stato = statoControllo.edit;
//refreshControlli();
//stato = statoControllo.item;
//minutiSel = -1;
refreshControlli();
}
/// <summary>
/// formatta la durata in ore secondo web.config (centesimale/ore:min)
/// </summary>
/// <param name="oreCent"></param>
/// <returns></returns>
public string formatDurata(object oreCent)
{
decimal ore = 0;
try
{
ore = Convert.ToDecimal(oreCent);
}
catch
{ }
string answ = "";
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
answ = utils.formOreMin(ore);
}
else
{
answ = ore.ToString("0.00");
}
return answ;
}
#endregion
}
}
@@ -1,87 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_commAttivitaDesk {
/// <summary>
/// pnlAll 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.Panel pnlAll;
/// <summary>
/// pnlHeader 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.Panel pnlHeader;
/// <summary>
/// lblTitle 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 lblTitle;
/// <summary>
/// imgBtnNew 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.ImageButton imgBtnNew;
/// <summary>
/// grView 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 grView;
/// <summary>
/// odsRA 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 odsRA;
/// <summary>
/// odsProgetto 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 odsProgetto;
/// <summary>
/// odsFase 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 odsFase;
}
}
@@ -1,178 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commUtLog.ascx.cs" Inherits="GPW.WebUserControls.mod_commUtLog" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_menuTopFull.ascx" TagName="mod_menuTopFull" TagPrefix="uc1" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc3" %>
<%@ Register Src="mod_commUtMancTimbr.ascx" TagName="mod_commUtMancTimbr" TagPrefix="uc4" %>
<%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc5" %>
<%@ Register Src="mod_TagCloudProgetti.ascx" TagName="mod_TagCloudProgetti" TagPrefix="uc6" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:HiddenField runat="server" ID="hfDataFrom" />
<asp:HiddenField runat="server" ID="hfDataTo" />
<asp:Panel runat="server" ID="pnlAll" Height="100%">
<div style="height: 100%;">
<div style="float: none;">
<uc1:mod_menuTopFull ID="mod_menuTopFull1" runat="server" titolo="Gestione Commesse Utente" returnUrl="~/Default.aspx" />
</div>
<div>
<div class="filtro_1 fontPiccolo" style="height: 26px;">
<div class="divSx">
<uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" realtimeUpdate="true" />
</div>
</div>
<div style="float: none; text-align: center; margin: auto;">
<div class="divDx">
<asp:Panel ID="pnlEditCom" runat="server" Height="100%" Visible="false">
<div style="padding: 5px; margin-bottom: 40px;">
<div class="blockSizeXXXLarge divSx">
<asp:Button runat="server" ID="btnCloseRA" Text="Chiudi" Font-Bold="true" OnClick="btnClose_Click" CssClass="btnRosso ui-corner-all shadowBox fontMedio btnChiudi" />
</div>
</div>
<div class="dataBlock blockSizeXXXLarge divSx">
<%--<div id="accordion">
<h3>
Tag Cloud ultimi progetti</h3>
<div style="background-color: White;">
aaa
</div>
<h3>
Task Aperti</h3>
<div>
<p>
...
</p>
</div>
</div>--%>
<uc6:mod_TagCloudProgetti ID="mod_TagCloudProgetti1" runat="server" />
<uc3:mod_commAttivitaDesk ID="mod_commAttivitaDesk1" runat="server" Visible="false" enableFull="true" />
</div>
</asp:Panel>
</div>
<div class="divSx">
<asp:Panel ID="pnlEditOre" runat="server" Height="100%" Visible="false">
<div style="padding: 5px; margin-bottom: 40px;">
<div class="blockSizeXLarge divSx">
<asp:Button runat="server" ID="btnCloseTimb" Text="Chiudi" Font-Bold="true" OnClick="btnClose_Click" CssClass="btnRosso ui-corner-all shadowBox fontMedio btnChiudi" />
</div>
</div>
<div style="padding: 5px;">
<div class="dataBlock blockSizeXLarge divSx">
<div class="dataBlockHeader" style="height: 24px; text-align: center; margin: auto; font-size: 12pt;">
Timbrature Approvate
</div>
<uc5:mod_elencoTimbr ID="mod_elencoTimbr1" runat="server" showUserName="false" showLongDateFormat="false" />
</div>
</div>
<uc4:mod_commUtMancTimbr ID="mod_commUtMancTimbr1" runat="server" Visible="false" />
</asp:Panel>
</div>
<div style="float: none;">
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="Data,idxDipendente"
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="9pt" ViewStateMode="Disabled" AllowPaging="True" PageSize="50">
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<EditRowStyle CssClass="editRowStyle" />
<FooterStyle CssClass="footerStyle" ForeColor="White" />
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
<RowStyle CssClass="rowStyle" />
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
<EmptyDataTemplate>
No record
</EmptyDataTemplate>
<Columns>
<asp:BoundField DataField="Data" HeaderText="Data" ReadOnly="True" SortExpression="Data" DataFormatString="{0:dd/MM/yy, ddd}"
ItemStyle-Width="8em" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="8em">
<HeaderTemplate>
<div style="text-align: right; margin: auto; margin-left: 8px;">
<b>
<asp:Label ID="lblHead_h_lav" runat="server" Text="Ore lavorate" /></b>
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="text-align: right; margin: auto; margin-left: 8px;">
<b>
<asp:Label ID="lblIsOk" runat="server" Text="*" ForeColor="Red" Visible='<%# invBool(Eval("okTimbr")) %>' />
</b><b>
<asp:Label ID="lblh_lav" runat="server" Text='<%# formatDurata(Eval("h_lav")) %>' CssClass='<%# classByPerm(Eval("minPerm")) %>'
ToolTip='<%# tooltipPermStra(Eval("minStra"),Eval("minPerm")) %>' /></b>
<asp:ImageButton ID="imgEditTimbr" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Edit Timbrature"
ImageUrl="~/images/edit_s.png" OnClick="imgEditTimbr_Click" CommandArgument='<%# Eval("Data") %>' />
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="4em">
<HeaderTemplate>
<asp:Label runat="server" ID="lblGiust" Text="Giust" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" ID="oreGiust" Text='<%# txtGiust(Eval("minPerm"),Eval("minFer"),Eval("minMal"),Eval("minFest"),Eval("minMpp")) %>'
ToolTip='<%# tooltipGiust(Eval("minPerm"),Eval("minFer"),Eval("minMal"),Eval("minFest"),Eval("minMpp")) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="8em">
<HeaderTemplate>
<div style="text-align: right; margin: auto; margin-left: 8px;">
<b>
<asp:Label ID="lblHead_h_com" runat="server" Text="Ore caricate" /></b>
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="text-align: right; margin: auto; margin-left: 8px;">
<b>
<asp:Label ID="lblh_com" runat="server" Text='<%# formatDurata(Eval("h_com")) %>' /></b>
<asp:ImageButton ID="imgEditComm" runat="server" CausesValidation="False" CommandName="Select" ToolTip="Edit Ore commesse"
ImageUrl="~/images/edit_s.png" OnClick="imgEditComm_Click" CommandArgument='<%# Eval("Data") %>' Visible='<%# regAttEnabled %>' />
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField SortExpression="progetti">
<HeaderTemplate>
<div style="margin-left: 8px;">
<b>
<asp:Label ID="lblHead_progetti" runat="server" Text="Progetti" /></b>
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="margin-left: 4px; font-size: 8pt;">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Progetti") %>' />
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Height="24px" SortExpression="okLavCom" ItemStyle-Width="32px">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div style="margin: 0px 8px 0px 8px; float: right;">
<asp:Image runat="server" ID="imgChk" ImageUrl='<%# imgChk(Eval("okLavCom")) %>' />
</div>
</ItemTemplate>
<ItemStyle Height="24px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByIdxDipDate"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.v_logCommUtTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxDipendente" Name="idxDipendente" Type="Int32" DefaultValue="0" />
<asp:ControlParameter DefaultValue="" Name="dataFrom" ControlID="hfDataFrom" PropertyName="Value" Type="DateTime" />
<asp:ControlParameter DefaultValue="" Name="dataTo" ControlID="hfDataTo" PropertyName="Value" Type="DateTime" />
<%--<asp:SessionParameter DefaultValue="" Name="dataFrom" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter Name="dataTo" SessionField="_fine" Type="DateTime" />--%>
<asp:SessionParameter SessionField="maxErrMin" Name="maxErrMin" Type="Int32" DefaultValue="-30" />
<asp:SessionParameter SessionField="maxErrPlus" Name="maxErrPlus" Type="Int32" DefaultValue="30" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</div>
</div>
</div>
</asp:Panel>
@@ -1,397 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using System.Globalization;
using GPW_data;
namespace GPW.WebUserControls
{
/// <summary>
/// modalità ammesse per il controllo
/// </summary>
public enum modoCommesse
{
/// <summary>
/// elenco giornate e resoconto
/// </summary>
elenco,
/// <summary>
/// edit timbrature attivo
/// </summary>
editTimb,
/// <summary>
/// edit Registro Attività attivo
/// </summary>
editRegAtt
}
public partial class mod_commUtLog : System.Web.UI.UserControl
{
public modoCommesse activeMode
{
get
{
modoCommesse answ = modoCommesse.elenco;
try
{
answ = (modoCommesse)memLayer.ML.objSessionObj("activeModeComm");
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("activeModeComm", value);
}
}
/// <summary>
/// Avvio pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin"));
memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus"));
if (!Page.IsPostBack)
{
activeMode = modoCommesse.elenco;
intervalloDate periodo = new intervalloDate();
periodo.fine = DateTime.Now.AddDays(1);
periodo.inizio = periodo.fine.AddDays(-10);
mod_periodoAnalisi1.intervalloAnalisi = periodo;
// salvo link in HF
hfDataFrom.Value = periodo.inizio.ToString();
hfDataTo.Value = periodo.fine.ToString();
// imposto modo tag cloud
string modoTC = memLayer.ML.confReadString("TagCloudMode");
switch (modoTC)
{
case "elenco":
mod_TagCloudProgetti1.modo = TagCloudMode.elenco;
break;
case "elencoCPF":
mod_TagCloudProgetti1.modo = TagCloudMode.elencoCPF;
break;
case "piramide":
mod_TagCloudProgetti1.modo = TagCloudMode.piramide;
break;
case "standard":
default:
mod_TagCloudProgetti1.modo = TagCloudMode.standard;
break;
}
}
showPanels();
grView.DataBind();
mod_commUtMancTimbr1.eh_nuovoValore += new EventHandler(mod_commUtMancTimbr1_eh_nuovoValore);
mod_commAttivitaDesk1.eh_nuovoValore += new EventHandler(mod_commAttivitaDesk1_eh_nuovoValore);
mod_TagCloudProgetti1.eh_newVal += new EventHandler(mod_TagCloudProgetti1_eh_newVal);
mod_TagCloudProgetti1.eh_refresh += mod_TagCloudProgetti1_eh_refresh;
mod_periodoAnalisi1.eh_doUpdate += mod_periodoAnalisi1_eh_doUpdate;
}
void mod_TagCloudProgetti1_eh_refresh(object sender, EventArgs e)
{
mod_commAttivitaDesk1.doUpdate();
grView.DataBind();
}
void mod_periodoAnalisi1_eh_doUpdate(object sender, EventArgs e)
{
// 2016.04.07: salvo intervallo nei 2 hidden field
hfDataFrom.Value = mod_periodoAnalisi1.intervalloAnalisi.inizio.ToString();
hfDataTo.Value= mod_periodoAnalisi1.intervalloAnalisi.fine.ToString();
// update
mod_commAttivitaDesk1.doUpdate();
grView.DataBind();
}
void mod_TagCloudProgetti1_eh_newVal(object sender, EventArgs e)
{
mod_commAttivitaDesk1.doUpdate();
grView.DataBind();
}
void mod_commAttivitaDesk1_eh_nuovoValore(object sender, EventArgs e)
{
mod_TagCloudProgetti1.doUpdate();
grView.DataBind();
}
void mod_commUtMancTimbr1_eh_nuovoValore(object sender, EventArgs e)
{
grView.DataBind();
}
/// <summary>
/// inverte valore booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool invBool(object valore)
{
bool answ = true;
try
{
answ = !Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// idxDipendente insessione
/// </summary>
protected int idxDip
{
get
{
return memLayer.ML.IntSessionObj("idxDipBCode");
}
set
{
memLayer.ML.setSessionVal("idxDipBCode", value);
}
}
/// <summary>
/// gestione evento richiesta edit timbrature
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgEditTimbr_Click(object sender, EventArgs e)
{
DateTime adesso = DateTime.Now;
string dataRif = ((ImageButton)sender).CommandArgument;
CultureInfo ita = new CultureInfo("it-IT");
mod_commUtMancTimbr1.valoreDateTime = Convert.ToDateTime(dataRif, ita).AddHours(adesso.Hour).AddMinutes(adesso.Minute - adesso.Minute % 5);
//salvo in sessione dati x detail timbrature
memLayer.ML.setSessionVal("inizioDet", Convert.ToDateTime(dataRif, ita).Date);
memLayer.ML.setSessionVal("fineDet", Convert.ToDateTime(dataRif, ita).Date.AddDays(1));
memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente);
// imposto modalità
activeMode = modoCommesse.editTimb;
showPanels();
}
/// <summary>
/// gestione evento richiesta edit commesse
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgEditComm_Click(object sender, EventArgs e)
{
DateTime adesso = DateTime.Now;
string dataRif = ((ImageButton)sender).CommandArgument;
CultureInfo ita = new CultureInfo("it-IT");
mod_commAttivitaDesk1.idxDipCurr = DataProxy.idxDipendente;
mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita);
mod_TagCloudProgetti1.dataRif = Convert.ToDateTime(dataRif, ita);
activeMode = modoCommesse.editRegAtt;
showPanels();
mod_commAttivitaDesk1.doUpdate();
}
/// <summary>
/// indica se sia abilitato l'editing delle attività legate alle commesse
/// </summary>
public bool regAttEnabled
{
get
{
return memLayer.ML.confReadBool("regAttEnabled");
}
}
/// <summary>
///
/// </summary>
/// <param name="minPerm"></param>
/// <returns></returns>
public string classByPerm(object minPerm)
{
string answ = "";
if (Convert.ToDouble(minPerm) > 0)
{
answ = "lblWarning";
}
return answ;
}
/// <summary>
/// prepara tooltip permessi/straordinarie
/// </summary>
/// <param name="minStra"></param>
/// <param name="minPerm"></param>
/// <returns></returns>
public string tooltipPermStra(object minStra, object minPerm)
{
string answ = "";
try
{
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
answ = string.Format("Straordinarie: {0} - Permessi: {1} (h:mm)", utils.formOreMin(Convert.ToDecimal(minStra) / 60), utils.formOreMin(Convert.ToDecimal(minPerm) / 60));
}
else
{
answ = string.Format("Straordinarie: {0:0.##} h - Permessi: {1:0.##} h", Convert.ToDouble(minStra) / 60, Convert.ToDouble(minPerm) / 60);
}
}
catch
{ }
return answ;
}
/// <summary>
/// imposta visualizzazione dei pannelli opzionali laterali a seocnda del modo attivo
/// </summary>
protected void showPanels()
{
// imposto valori default
bool timbr = false;
bool commesse = false;
switch (activeMode)
{
case modoCommesse.editTimb:
timbr = true;
break;
case modoCommesse.editRegAtt:
commesse = true;
break;
case modoCommesse.elenco:
default:
break;
}
pnlEditCom.Visible = commesse;
pnlEditOre.Visible = timbr;
mod_commUtMancTimbr1.Visible = timbr;
mod_commAttivitaDesk1.Visible = commesse;
}
/// <summary>
/// chiamata del button close (entrambi)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnClose_Click(object sender, EventArgs e)
{
activeMode = modoCommesse.elenco;
showPanels();
grView.DataBind();
}
/// <summary>
/// fornisce img x check coerenza ore timbrate e commesse
/// </summary>
/// <param name="okLavCom"></param>
/// <returns></returns>
public string imgChk(object okLavCom)
{
string answ = "~/images/statoKo_m.png";
try
{
if (Convert.ToBoolean(okLavCom))
{
answ = "~/images/statoOk_m.png";
}
}
catch
{ }
return answ;
}
/// <summary>
/// formatta stringa giustificativi
/// </summary>
/// <param name="_minPerm">permessi</param>
/// <param name="_minFer">ferie</param>
/// <param name="_minMal">malattia</param>
/// <param name="_minFest">festività</param>
/// <param name="_minMPP">MPP</param>
/// <returns></returns>
public string txtGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP)
{
string answ = "";
double minPerm = Convert.ToInt32(_minPerm);
double minFer = Convert.ToInt32(_minFer);
double minMal = Convert.ToInt32(_minMal);
double minFest = Convert.ToInt32(_minFest);
double minMpp = Convert.ToInt32(_minMPP);
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
if (minPerm > 0) answ += string.Format("{0} Pe ", utils.formOreMin(Convert.ToDecimal(minPerm / 60)));
if (minFer > 0) answ += string.Format("{0} Fe ", utils.formOreMin(Convert.ToDecimal(minFer / 60)));
if (minMal > 0) answ += string.Format("{0} Ma ", utils.formOreMin(Convert.ToDecimal(minMal / 60)));
if (minFest > 0) answ += string.Format("{0} Fs ", utils.formOreMin(Convert.ToDecimal(minFest / 60)));
if (minMpp > 0) answ += string.Format("{0} Mpp ", utils.formOreMin(Convert.ToDecimal(minMpp / 60)));
}
else
{
if (minPerm > 0) answ += string.Format("{0:0.00} Pe ", minPerm / 60);
if (minFer > 0) answ += string.Format("{0:0.00} Fe ", minFer / 60);
if (minMal > 0) answ += string.Format("{0:0.00} Ma ", minMal / 60);
if (minFest > 0) answ += string.Format("{0:0.00} Fs ", minFest / 60);
if (minMpp > 0) answ += string.Format("{0:0.00} Mpp ", minMpp / 60);
}
return answ;
}
/// <summary>
/// formatta stringa tooltip giustificativi
/// </summary>
/// <param name="_minPerm">permessi</param>
/// <param name="_minFer">ferie</param>
/// <param name="_minMal">malattia</param>
/// <param name="_minFest">festività</param>
/// <param name="_minMPP">MPP</param>
/// <returns></returns>
public string tooltipGiust(object _minPerm, object _minFer, object _minMal, object _minFest, object _minMPP)
{
string answ = "";
double minPerm = Convert.ToInt32(_minPerm);
double minFer = Convert.ToInt32(_minFer);
double minMal = Convert.ToInt32(_minMal);
double minFest = Convert.ToInt32(_minFest);
double minMpp = Convert.ToInt32(_minMPP);
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
if (minPerm > 0) answ += string.Format("{0} Permesso ", utils.formOreMin(Convert.ToDecimal(minPerm / 60)));
if (minFer > 0) answ += string.Format("{0} Ferie ", utils.formOreMin(Convert.ToDecimal(minFer / 60)));
if (minMal > 0) answ += string.Format("{0} Malattia ", utils.formOreMin(Convert.ToDecimal(minMal / 60)));
if (minFest > 0) answ += string.Format("{0} Festività ", utils.formOreMin(Convert.ToDecimal(minFest / 60)));
if (minMpp > 0) answ += string.Format("{0} Manc.Pausa Pranzo ", utils.formOreMin(Convert.ToDecimal(minMpp / 60)));
}
else
{
if (minPerm > 0) answ += string.Format("{0:0.00}h Permesso ", minPerm / 60);
if (minFer > 0) answ += string.Format("{0:0.00}h Ferie ", minFer / 60);
if (minMal > 0) answ += string.Format("{0:0.00}h Malattia ", minMal / 60);
if (minFest > 0) answ += string.Format("{0:0.00}h Festività ", minFest / 60);
if (minMpp > 0) answ += string.Format("{0:0.00}h Manc.Pausa Pranzo ", minMpp / 60);
}
return answ;
}
/// <summary>
/// formatta la durata in ore secondo web.config (centesimale/ore:min)
/// </summary>
/// <param name="oreCent"></param>
/// <returns></returns>
public string formatDurata(object oreCent)
{
decimal ore = 0;
try
{
ore = Convert.ToDecimal(oreCent);
}
catch
{ }
string answ = "";
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
answ = utils.formOreMin(ore);
}
else
{
answ = ore.ToString("0.00");
}
return answ;
}
}
}
-150
View File
@@ -1,150 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_commUtLog {
/// <summary>
/// hfDataFrom 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.HiddenField hfDataFrom;
/// <summary>
/// hfDataTo 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.HiddenField hfDataTo;
/// <summary>
/// pnlAll 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.Panel pnlAll;
/// <summary>
/// mod_menuTopFull1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_menuTopFull mod_menuTopFull1;
/// <summary>
/// mod_periodoAnalisi1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
/// <summary>
/// pnlEditCom 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.Panel pnlEditCom;
/// <summary>
/// btnCloseRA 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.Button btnCloseRA;
/// <summary>
/// mod_TagCloudProgetti1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_TagCloudProgetti mod_TagCloudProgetti1;
/// <summary>
/// mod_commAttivitaDesk1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1;
/// <summary>
/// pnlEditOre 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.Panel pnlEditOre;
/// <summary>
/// btnCloseTimb 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.Button btnCloseTimb;
/// <summary>
/// mod_elencoTimbr1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_elencoTimbr mod_elencoTimbr1;
/// <summary>
/// mod_commUtMancTimbr1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commUtMancTimbr mod_commUtMancTimbr1;
/// <summary>
/// grView 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 grView;
/// <summary>
/// ods 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;
}
}
@@ -1,127 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commUtMancTimbr.ascx.cs" Inherits="GPW.WebUserControls.mod_commUtMancTimbr" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_menuTopFull.ascx" TagName="mod_menuTopFull" TagPrefix="uc1" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:Panel runat="server" ID="pnlAll" Height="100%">
<div style="padding: 5px;">
<div class="clearDiv dataBlock blockSizeXLarge divSx">
<div class="dataBlockHeader" style="height: 24px; text-align: center; margin: auto; font-size: 12pt;">
Gestione Mancate Timbrature
</div>
<div class="dataBlockReset" style="height: 24px; padding: 4px 0px 4px 0px;">
<div class="dataBlockSx">
<div class="dataBlockValue">
<asp:RadioButtonList ID="rblEntrata" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="radioBtn">
<asp:ListItem Text="IN" Value="true" />
<asp:ListItem Text="OUT" Value="false" />
</asp:RadioButtonList>
</div>
</div>
<div class="dataBlockDx">
<div class="dataBlockValue">
<asp:TextBox runat="server" ID="txtData" Width="6em" />
<asp:CalendarExtender ID="ceTxtData" runat="server" TargetControlID="txtData" FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
</asp:CalendarExtender>
</div>
</div>
</div>
<div class="dataBlockReset" style="height: 24px; padding: 4px 0px 4px 0px;">
<div class="dataBlockSx">
<div class="dataBlockLabel">
Ora:
</div>
<div class="dataBlockValue">
<asp:DropDownList runat="server" ID="ddlOra" name="Ora" DataSourceID="odsOra" DataTextField="Ora" DataValueField="Ora" data-mini="true">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsOra" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getHoursTableAdapter">
</asp:ObjectDataSource>
</div>
</div>
<div class="dataBlockDx">
<div class="dataBlockLabel">
Min:
</div>
<div class="dataBlockValue">
<asp:DropDownList runat="server" ID="ddlMin" name="Min" DataSourceID="odsMin" DataTextField="Minuto" DataValueField="Minuto"
data-mini="true">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsMin" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getMinTableAdapter">
<SelectParameters>
<asp:Parameter DefaultValue="5" Name="interv" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</div>
</div>
<div class="dataBlockReset">
</div>
<div class="dataBlockBtn">
<asp:Button ID="btnRichMT" runat="server" Text="Richiesta" OnClick="btnRichMT_Click" CssClass="btnNew" />
</div>
</div>
<div class="clearDiv dataBlock blockSizeXLarge divSx">
<div class="dataBlockHeader" style="height: 24px; text-align: center; margin: auto; font-size: 12pt;">
Richieste in corso:
</div>
<asp:GridView ID="grViewRichieste" nome="grView" runat="server" AllowPaging="True" DataSourceID="odsRichieste" AutoGenerateColumns="False"
DataKeyNames="dataOra,idxDipendente" CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="100%"
OnRowUpdated="grView_RowUpdated" OnRowDeleted="grViewRichieste_RowDeleted">
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
<Columns>
<asp:TemplateField HeaderText="dataOra" SortExpression="dataOra" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblData" runat="server" Text='<%# Eval("dataOra", "{0:ddd yyyy.MM.dd, HH:mm}") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IN" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblIn" runat="server" Text="X" Visible='<%# Eval("entrata") %>' ForeColor="#666666" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="scambia" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton runat="server" ID="btnSwapInOut" ToolTip="Scambia In/Out" CommandName="Update" ImageUrl="~/images/InOutArrows_m.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="OUT" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblOut" runat="server" Text="X" Visible='<%# invBool(Eval("entrata")) %>' ForeColor="#666666" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbDelete" Text="Elimina" CommandArgument="Elimina" CommandName="Delete" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsRichieste" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getNonApprByDip"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureTableAdapter" DeleteMethod="DeleteNonAppr" UpdateMethod="updateSwapInOut">
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter SessionField="idxDipendente" Name="idxDipendente" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>
</div>
</asp:Panel>
@@ -1,224 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GPW_data;
using System.Globalization;
namespace GPW.WebUserControls
{
public partial class mod_commUtMancTimbr : System.Web.UI.UserControl
{
/// <summary>
/// data selezionata
/// </summary>
protected DateTime dataRif
{
get
{
DateTime answ = DateTime.Now;
try
{
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("dataRif", value);
}
}
/// <summary>
/// avvio pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// imposto entrata
rblEntrata.SelectedIndex = 0;
}
}
/// <summary>
/// valore datetime selezionato!
/// </summary>
public DateTime valoreDateTime
{
get
{
DateTime answ = DateTime.Now;
try
{
int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
int minSel = Convert.ToInt32(ddlMin.SelectedValue);
answ = Convert.ToDateTime(txtData.Text).AddHours(oreSel).AddMinutes(minSel);
}
catch
{ }
return answ;
}
set
{
txtData.Text = value.Date.ToString("dd/MM/yyyy");
ddlOra.SelectedValue = value.Hour.ToString();
ddlMin.SelectedValue = value.Minute.ToString();
}
}
/// <summary>
/// inverte valore booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool invBool(object valore)
{
bool answ = true;
try
{
answ = !Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// evento riga caricata...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowDataBound(object sender, GridViewRowEventArgs e)
{
// controllo la riga
GridViewRow riga = e.Row;
// se la data è quella rif...
Label data = new Label();
bool trovato = false;
try
{
data = (Label)riga.FindControl("lblDataLav");
trovato = (data.Text == Convert.ToDateTime(memLayer.ML.StringSessionObj("dataRif")).ToString("dd-MM"));
}
catch
{ }
}
/// <summary>
/// sistemo post eliminazione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
checkFixOds();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// update post cancellazione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grViewRichieste_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
checkFixOds();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// effettua fix dell'ods
/// </summary>
private void checkFixOds()
{
grViewRichieste.DataBind();
}
/// <summary>
/// salvo richiesta
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnRichMT_Click(object sender, EventArgs e)
{
logger.lg.scriviLog("Richiesta registrazione timbratura manuale", tipoLog.INFO);
// salva una richiesta di timbratura (ovvero approvata = FALSE!!!)
DateTime richiesta = DateTime.Now;
try
{
CultureInfo ita = new CultureInfo("it-IT");
logger.lg.scriviLog(string.Format("Data: {0}", txtData.Text));
richiesta = Convert.ToDateTime(txtData.Text, ita);
double ora = Convert.ToDouble(ddlOra.SelectedValue);
double minuto = Convert.ToDouble(ddlMin.SelectedValue);
richiesta = richiesta.AddHours(ora).AddMinutes(minuto);
bool isEntrata = Convert.ToBoolean(rblEntrata.SelectedValue);
registraTimbraturaNonApp(isEntrata, richiesta);
// aggiorno gridview
checkFixOds();
}
catch
{
logger.lg.scriviLog("Errore conversione datetime!");
}
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// registro timbratura NON APPROVATA
/// </summary>
/// <param name="isEntrata"></param>
/// <returns></returns>
private void registraTimbraturaNonApp(bool isEntrata, DateTime dataOra)
{
// salvo evento entrata...
string IPv4 = "";
bool approvata = false; // è una richiesta!!!!
if (DataProxy.idxDipendente > 0)
{
// recupero IP
IPv4 = Request.UserHostName;
DataProxy.DP.taTimb.stp_insTimbMan(DataProxy.idxDipendente, dataOra, isEntrata, IPv4, "NoTim", approvata);
logger.lg.scriviLog(string.Format("Richiesta timbratura per il dipendente:{0} in data:{1} isEntrata:{2}", DataProxy.idxDipendente, dataOra, isEntrata), tipoLog.INFO);
}
else
{
logger.lg.scriviLog("IdxDipendente non trovato! inserimento timbratura mancante impossibile", tipoLog.INFO);
}
}
/// <summary>
/// calcola cognome-nome da idx
/// </summary>
/// <param name="idxDip"></param>
/// <returns></returns>
public string cognomeNome(object idxDip)
{
string answ = "";
try
{
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0];
answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
}
catch
{ }
return answ;
}
/// <summary>
/// evento update valori
/// </summary>
public event EventHandler eh_nuovoValore;
}
}
@@ -1,114 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_commUtMancTimbr {
/// <summary>
/// pnlAll 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.Panel pnlAll;
/// <summary>
/// rblEntrata 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.RadioButtonList rblEntrata;
/// <summary>
/// txtData 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.TextBox txtData;
/// <summary>
/// ceTxtData control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.CalendarExtender ceTxtData;
/// <summary>
/// ddlOra 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.DropDownList ddlOra;
/// <summary>
/// odsOra 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 odsOra;
/// <summary>
/// ddlMin 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.DropDownList ddlMin;
/// <summary>
/// odsMin 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 odsMin;
/// <summary>
/// btnRichMT 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.Button btnRichMT;
/// <summary>
/// grViewRichieste 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 grViewRichieste;
/// <summary>
/// odsRichieste 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 odsRichieste;
}
}
@@ -1,30 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_dateTime.ascx.cs" Inherits="GPW.WebUserControls.mod_dateTime" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="divCenter" style="font-size: small; text-align: right;">
<div class="divSx">
<asp:Label runat="server" ID="lblData" />
<asp:TextBox ID="txtData" TabIndex="1" runat="server" Width="6em" MaxLength="10" Font-Size="8pt" />
<asp:CalendarExtender ID="ceTxtData" runat="server" TargetControlID="txtData" FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
</asp:CalendarExtender>
</div>
<div class="divSx">
<asp:Label runat="server" ID="lblOra" />
<asp:DropDownList runat="server" ID="ddlOra" name="Ora" DataSourceID="odsOra" DataTextField="Ora" DataValueField="Ora" Font-Size="8pt">
</asp:DropDownList>
<asp:DropDownList runat="server" ID="ddlMin" name="Min" DataSourceID="odsMin" DataTextField="Minuto" DataValueField="Minuto"
Font-Size="8pt">
</asp:DropDownList>
</div>
</div>
<asp:ObjectDataSource ID="odsOra" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getHoursTableAdapter">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsMin" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.stp_getMinTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="lblSnapMin" DefaultValue="5" Name="interv" Type="Int32" PropertyName="Text" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Label runat="server" Visible="false" ID="lblSnapMin" />
@@ -1,154 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
namespace GPW.WebUserControls
{
public partial class mod_dateTime : System.Web.UI.UserControl
{
/// <summary>
/// uuid univoco
/// </summary>
protected string uuid
{
get
{
return this.UniqueID.Replace("$", "_");
}
}
protected DateTime dataOra
{
get
{
DateTime answ = DateTime.Now;
try
{
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif")).AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
}
catch
{ }
answ = answ.AddMinutes(-answ.Minute % snapMinuti);
try
{
answ = (DateTime)memLayer.ML.objSessionObj(string.Format("dt_{0}", uuid));
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal(string.Format("dt_{0}", uuid), value);
}
}
/// <summary>
/// avvio pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)// || txtData.Text == "")
{
setInitVal();
valoreDateTime = dataOra;
}
}
private void setInitVal()
{
// imposto un datetime di default ad adesso...
DateTime adesso = DateTime.Now;
try
{
adesso = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif")).AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
}
catch
{ }
dataOra = adesso.AddMinutes(-adesso.Minute % snapMinuti);
}
/// <summary>
/// Valore di arrotondamento x selettore minuti
/// </summary>
public int snapMinuti
{
get
{
int answ = 5;
try
{
answ = Convert.ToInt32(lblSnapMin.Text);
}
catch
{ }
return answ;
}
set
{
lblSnapMin.Text = value.ToString();
}
}
/// <summary>
/// valore datetime selezionato!
/// </summary>
public DateTime valoreDateTime
{
get
{
DateTime answ = DateTime.Now;
try
{
int oreSel = Convert.ToInt32(ddlOra.SelectedValue);
int minSel = Convert.ToInt32(ddlMin.SelectedValue);
answ = Convert.ToDateTime(txtData.Text).AddHours(oreSel).AddMinutes(minSel);
}
catch
{ }
return answ;
}
set
{
txtData.Text = value.Date.ToShortDateString();
ddlOra.SelectedValue = value.Hour.ToString();
ddlMin.SelectedValue = value.Minute.ToString();
}
}
/// <summary>
/// stringa data
/// </summary>
public string lblabelData
{
get
{
return lblData.Text;
}
set
{
lblData.Text = value;
}
}
/// <summary>
/// stringa ora
/// </summary>
public string lblabelOra
{
get
{
return lblOra.Text;
}
set
{
lblOra.Text = value;
}
}
}
}
-96
View File
@@ -1,96 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_dateTime {
/// <summary>
/// lblData 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 lblData;
/// <summary>
/// txtData 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.TextBox txtData;
/// <summary>
/// ceTxtData control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.CalendarExtender ceTxtData;
/// <summary>
/// lblOra 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 lblOra;
/// <summary>
/// ddlOra 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.DropDownList ddlOra;
/// <summary>
/// ddlMin 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.DropDownList ddlMin;
/// <summary>
/// odsOra 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 odsOra;
/// <summary>
/// odsMin 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 odsMin;
/// <summary>
/// lblSnapMin 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 lblSnapMin;
}
}
@@ -1,99 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoTimbr.ascx.cs" Inherits="GPW.WebUserControls.mod_elencoTimbr" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataOra,idxDipendente"
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="100%" OnRowDeleted="grView_RowDeleted"
OnRowUpdated="grView_RowUpdated">
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<EditRowStyle CssClass="editRowStyle" />
<FooterStyle CssClass="footerStyle" ForeColor="White" />
<HeaderStyle CssClass="headerStyle" ForeColor="White" />
<PagerStyle CssClass="pagerStyle" ForeColor="White" />
<RowStyle CssClass="rowStyle" />
<SelectedRowStyle CssClass="selectedRowStyle" ForeColor="#333333" />
<SortedAscendingCellStyle CssClass="sortAscCell" />
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
<SortedDescendingCellStyle CssClass="sortDescCell" />
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun record TIMBRATURA
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblDip" runat="server" Text='<%# cognomeNome(Eval("idxDipendente")) %>' Visible='<%# showUserName %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="data - ora" SortExpression="dataOra" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblData" runat="server" Text='<%# Eval("dataOra", "{0:MM/dd - HH:mm}") %>' Visible='<%# invBool(showLongDateFormat) %>' />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("dataOra", "{0:yyyy/MM/dd ddd - HH:mm}") %>' Visible='<%# showLongDateFormat %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label runat="server" ID="lblHeadIn" Text="IN" />
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label ID="lblIn" runat="server" Text="X" Visible='<%# Eval("entrata") %>' ForeColor="#666666" />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:ImageButton runat="server" ID="btnSwapInOut" ToolTip="Scambia In/Out" CommandName="Update" ImageUrl="~/images/InOutArrows_m.png" Visible='<%# userCanDelete(Eval("Approv")) %>' />
<asp:ConfirmButtonExtender ID="cbeSwapInOut" runat="server" ConfirmText="Procedo con scambio Entrata/Uscita della timbratura?"
TargetControlID="btnSwapInOut">
</asp:ConfirmButtonExtender>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<HeaderTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label runat="server" ID="lblHeadOut" Text="OUT" />
</div>
</HeaderTemplate>
<ItemTemplate>
<div style="margin: auto; text-align: center;">
<asp:Label ID="lblOut" runat="server" Text="X" Visible='<%# invBool(Eval("entrata")) %>' ForeColor="#666666" />
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<div style="padding: 10px;">
<asp:LinkButton runat="server" ID="lbDelete" Text="Elimina" CommandArgument="Elimina" CommandName="Delete" CssClass="btnDelete btnRosso" Visible='<%# userCanDelete(Eval("Approv")) %>' />
<asp:ConfirmButtonExtender ID="cbeDelete" runat="server" ConfirmText="Sicuro di voler eliminare la timbratura? non è possibile annullare l'operazione."
TargetControlID="lbDelete">
</asp:ConfirmButtonExtender>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getByIdxDipPeriodo"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureTableAdapter" DeleteMethod="DeleteNonAppr" UpdateMethod="updateSwapInOut">
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter SessionField="idxDip_det" Name="idxDipendente" Type="Int32" DefaultValue="0" />
<asp:SessionParameter SessionField="inizioDet" Name="inizio" Type="DateTime" />
<asp:SessionParameter SessionField="fineDet" Name="fine" Type="DateTime" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
@@ -1,158 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GPW_data;
using SteamWare;
namespace GPW.WebUserControls
{
public partial class mod_elencoTimbr : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
/// evento update valori
/// </summary>
public event EventHandler eh_nuovoValore;
/// <summary>
/// evento update righe
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
grView.DataBind();
raiseUpdate();
}
private void raiseUpdate()
{
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// evento cancellazione riga
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
grView.DataBind();
raiseUpdate();
}
/// <summary>
/// imposto ODS
/// </summary>
private void checkFixOds()
{
ods.DataBind();
grView.DataBind();
}
public void doUpdate()
{
checkFixOds();
}
/// <summary>
/// calcola cognome-nome da idx
/// </summary>
/// <param name="idxDip"></param>
/// <returns></returns>
public string cognomeNome(object idxDip)
{
string answ = "";
try
{
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0];
answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
}
catch
{ }
return answ;
}
/// <summary>
/// inverte valore booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool invBool(object valore)
{
bool answ = true;
try
{
answ = !Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// converte valore in booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool toBool(object valore)
{
bool answ = true;
try
{
answ = Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// verifica se l'utente possa approvare la modifica oraria
/// </summary>
public bool userCanApprove
{
get
{
bool answ = false;
try
{
answ = user_std.UtSn.userHasRight("GPW_admin");
}
catch
{ }
return answ;
}
}
/// <summary>
/// verifica se l'utente possa eliminare il record:
/// - se non approvato
/// - se admin
/// </summary>
public bool userCanDelete(object approvata)
{
bool answ = !Convert.ToBoolean(approvata);
try
{
answ = user_std.UtSn.userHasRight("GPW_admin");
}
catch
{ }
return answ;
}
/// <summary>
/// determina se sia visibile username
/// </summary>
public bool showUserName { get; set; }
/// <summary>
/// determina se sia visibile formato data estesa
/// </summary>
public bool showLongDateFormat { get; set; }
}
}
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_elencoTimbr {
/// <summary>
/// grView 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 grView;
/// <summary>
/// ods 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;
}
}
-13
View File
@@ -1,13 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_filtro" CodeBehind="mod_filtro.ascx.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<div>
<div style="float: left;">
<asp:CheckBox ID="chkFilt" runat="server" Checked="false" AutoPostBack="True" CssClass='<%# css %>' OnCheckedChanged="chkFilt_CheckedChanged" />
</div>
<div style="float: left;">
<asp:ComboBox ID="dlFilt" runat="server" Visible="False" DataTextField="label" DataValueField="value" AutoCompleteMode="SuggestAppend" DropDownStyle="DropDownList" AutoPostBack="True" OnSelectedIndexChanged="dlFilt_SelectedIndexChanged" CssClass="Windows" />
</div>
<div style="float: left;">
<asp:Label ID="where" runat="server" Visible="false" Text="" />
</div>
</div>
@@ -1,446 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
public partial class mod_filtro : ApplicationUserControl
{
protected string _css;
protected ObjectDataSource _ods;
protected string _valore
{
get
{
return memLayer.ML.StringSessionObj(string.Format("valFiltro_{0}", this.ID));
}
set
{
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), value, false);
}
}
/// <summary>
/// calcola se ci sia in sessione il valore del filtro
/// </summary>
protected bool valueInSession
{
get
{
bool answ=false;
try
{
memLayer.ML.isInSessionObject(string.Format("valFiltro_{0}", this.ID));
}
catch
{ }
return answ;
}
}
protected bool _changeCheckEnabled = true;
protected bool _changeCheckVisible = true;
protected bool _changeSelEnabled = true;
protected string _where = "";
protected string _showFiltered
{
get
{
return memLayer.ML.StringSessionObj(string.Format("_showFiltered_{0}", this.ID));
}
set
{
memLayer.ML.setSessionVal(string.Format("_showFiltered_{0}", this.ID), value);
traduciObj();
}
}
protected string _showAll
{
get
{
return memLayer.ML.StringSessionObj(string.Format("_showAll_{0}", this.ID));
}
set
{
memLayer.ML.setSessionVal(string.Format("_showAll_{0}", this.ID), value);
traduciObj();
}
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!Page.IsPostBack)
{
if (_showFiltered == "") _showFiltered = "mostraSoloSelez";
if (_showAll == "") _showAll = "mostraTutti";
}
}
/// <summary>
/// traduzione oggetti
/// </summary>
protected override void traduciObj()
{
if (_changeCheckVisible)
{
if (!chkFilt.Checked)
{
chkFilt.Text = traduci(_showFiltered);
}
else
{
chkFilt.Text = traduci(_showAll);
}
}
}
/// <summary>
/// get/set messaggio di attivazione filtraggio
/// </summary>
public string filterChekText
{
get
{
return _showFiltered;
}
set
{
_showFiltered = value;
}
}
/// <summary>
/// get/set messaggio di disattivazione filtraggio
/// </summary>
public string filterUnchekText
{
get
{
return _showAll;
}
set
{
_showAll = value;
}
}
protected void chkFilt_CheckedChanged(object sender, EventArgs e)
{
// cambio modalità visualizzazione del filtro...
dlFilt.Visible = !dlFilt.Visible;
raiseSelEvent();
}
protected void raiseSelEvent()
{
if (!dlFilt.Visible)
{
memLayer.ML.setSessionVal(string.Format("valFiltro_{0}", this.ID), "", false);
}
else
{
_valore = dlFilt.SelectedValue;
}
if (eh_selValore != null)
{
eh_selValore(this, new EventArgs());
}
}
protected void updateChk()
{
chkFilt.Enabled = _changeCheckEnabled;
if (!_changeCheckEnabled)
{
chkFilt.Checked = true;
dlFilt.Visible = true;
}
}
protected void updateSel()
{
dlFilt.Enabled = _changeSelEnabled;
}
protected void updateChkLbl()
{
chkFilt.Visible = _changeCheckVisible;
}
protected override void bindControlli()
{
updateChk();
fixValore();
where.Text = _where;
traduciObj();
}
protected SteamWare.tipoVistaMod _modo = SteamWare.tipoVistaMod.editing;
protected void dlFilt_SelectedIndexChanged(object sender, EventArgs e)
{
raiseSelEvent();
}
/// <summary>
/// condizione where per ridurre elementi mostrati in selettore
/// </summary>
public string condizione
{
get
{
return _where;
}
set
{
_where = value;
}
}
/// <summary>
/// fornisce il valore scelto o "*" se nulla selezionato
/// </summary>
public string valore
{
get
{
string answ = "*";
if (chkFilt.Checked)
{
answ = dlFilt.SelectedValue;
}
return answ;
}
set
{
_valore = value;
//fixValore();
}
}
/// <summary>
/// primo valore di una chiave multicampo
/// </summary>
public string val_1
{
get
{
string answ = "";
if (chkFilt.Checked)
{
try
{
string[] _dataKey = dlFilt.SelectedValue.Split('#');
answ = _dataKey[0];
}
catch
{ }
}
else
{
answ = "*";
}
return answ;
}
}
/// <summary>
/// secondo valore di una chiave multicampo
/// </summary>
public string val_2
{
get
{
string answ = "";
if (chkFilt.Checked)
{
try
{
string[] _dataKey = dlFilt.SelectedValue.Split('#');
answ = _dataKey[1];
}
catch
{ }
}
else
{
answ = "*";
}
return answ;
}
}
/// <summary>
/// fornisce il valore scelto o "0" se nulla selezionato o non valido
/// </summary>
public int valoreInt
{
get
{
int answ = -1;
try
{
if (chkFilt.Checked)
{
answ = Convert.ToInt32(dlFilt.SelectedValue);
}
}
catch
{ }
return answ;
}
}
/// <summary>
/// sistema visualizzazione
/// </summary>
protected void fixValore()
{
if (_ods != null)
{
try
{
dlFilt.DataSource = _ods;
dlFilt.DataBind();
if (_valore != "")
{
dlFilt.SelectedValue = _valore;
dlFilt.Visible = true;
chkFilt.Checked = true;
}
}
catch(Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
dlFilt.SelectedIndex = 0;
}
}
}
public event EventHandler eh_selValore;
/// <summary>
/// determina se sia possibile (de)selezionare il check di filtraggio, altrimenti sempre attivo
/// </summary>
public bool changeCheckEnabled
{
get
{
return _changeCheckEnabled;
}
set
{
_changeCheckEnabled = value;
updateChk();
}
}
/// <summary>
/// determina se sia possibile modificare la selezione
/// </summary>
public bool changeSelEnabled
{
get
{
return _changeSelEnabled;
}
set
{
_changeSelEnabled = value;
updateSel();
}
}
/// <summary>
/// determina se sia possibile visibile il check di filtraggio
/// </summary>
public bool changeCheckVisible
{
get
{
return _changeCheckVisible;
}
set
{
_changeCheckVisible = value;
updateChkLbl();
}
}
/// <summary>
/// get/set della checkbox
/// </summary>
public bool isChecked
{
get
{
return chkFilt.Checked;
}
set
{
chkFilt.Checked = value;
dlFilt.Visible = value;
updateChkLbl();
}
}
/// <summary>
/// oggetto ODS con cui popolare il selettore, VINCOLO abbia campi value(key) / label
/// </summary>
public ObjectDataSource ods
{
get
{
return _ods;
}
set
{
_ods = value;
}
}
/// <summary>
/// css applicato agli elementi del controllo
/// </summary>
public string css
{
get
{
return _css;
}
set
{
_css = value;
}
}
/// <summary>
/// resetta il controllo (un-checked)
/// </summary>
public void reset()
{
chkFilt.Checked = false;
dlFilt.Visible = false;
memLayer.ML.emptySessionVal(string.Format("valFiltro_{0}", this.ID));
}
/// <summary>
/// resetta e seleziona primo valore
/// </summary>
public void reselFirst()
{
dlFilt.DataBind();
bindControlli();
try
{
dlFilt.SelectedIndex = 0;
}
catch
{ }
}
/// <summary>
/// get/set per la larghezza della combo dropdown
/// </summary>
public int comboWidth
{
get
{
return Convert.ToInt32(dlFilt.Width);
}
set
{
dlFilt.Width = value;
}
}
}
-40
View File
@@ -1,40 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class mod_filtro {
/// <summary>
/// chkFilt 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.CheckBox chkFilt;
/// <summary>
/// dlFilt control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ComboBox dlFilt;
/// <summary>
/// where 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 where;
}
-58
View File
@@ -1,58 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" CodeBehind="mod_login.ascx.cs" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:Panel ID="pnlForceUser" runat="server">
<table width="100%">
<tr>
<td class="chPwdTitle">
<asp:Label runat="server" ID="lblTitolo" />
</td>
</tr>
</table>
<table class="smallTable">
<tr>
<td>
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblPwd" />
</td>
<td>
<asp:TextBox runat="server" ID="authKey" TextMode="Password" Width="210px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblDominio" />
</td>
<td>
<asp:TextBox runat="server" ID="dominio" Width="210px"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label CssClass="chPwdTxt" runat="server" ID="lblUser" />
</td>
<td>
<asp:TextBox runat="server" ID="user" Width="210px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button Width="100%" runat="server" ID="btnOk" CommandName="ok" CommandArgument="ok"
OnClick="btnOk_Click"></asp:Button>
</td>
</tr>
</table>
</asp:Panel>
<table class="smallTable">
<tr>
<td colspan="2">
<asp:Label CssClass="chPwdTxt" ID="lblMessage" runat="server" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:HyperLink ID="HypLinkSSO" runat="server" NavigateUrl="~/login.aspx" Text="Single-Sign-On Login"></asp:HyperLink>
</td>
</tr>
</table>
-241
View File
@@ -1,241 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
/// <summary>
/// classe gestione login e forzatura login
/// </summary>
public partial class mod_login : ApplicationUserControl
{
#region area protected/private
#region area proprietà
private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale;
#endregion
#region area metodi
/// <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;
}
}
protected override void traduciObj()
{
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");
}
/// <summary>
/// prova a verificare se l'utente sia ok x AD credentials
/// </summary>
private void AdLogin()
{
lblMessage.Text = traduci("UserNotAuth");
if (Page.User.Identity.IsAuthenticated)
{
//recupera user windows se c'è...
string ad_name = Page.User.Identity.Name;
string delimStr = "\\";
char[] delimiter = delimStr.ToCharArray();
string[] dom_user = ad_name.Split(delimiter, 2);
// passo al controllo di verifica ADuserOk...
user_std _utente = new user_std();
if (_utente.ADuserOk(dom_user[0], dom_user[1]))
{
bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]);
if (fatto)
{
SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO);
if (Login_ok != null)
{
Login_ok(this, new EventArgs());
}
}
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]);
SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR);
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
}
}
else
{
if (memLayer.ML.confReadBool("autoEnrollEnabled"))
{
// rimando al modulo di auto enroll...
Response.Redirect("autoEnroll.aspx");
}
else
{
lblMessage.Text = String.Format("{0}<br>user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING);
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
}
}
}
else
{
lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth");
SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING);
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
}
}
/// <summary>
/// effettua verifiche e se concesso permette di forzare l'accesso utente
/// </summary>
private void ForceUserIdentity()
{
if (Page.User.Identity.IsAuthenticated)
{
bool _allowForceUser = false;
try
{
_allowForceUser = SteamWare.memLayer.ML.confReadBool("_allowForceUser");
}
catch
{
_allowForceUser = false;
}
if (_allowForceUser)
{
if (authKey.Text == "triplete") // verifica passphrase...
{
user_std _utente = new user_std();
user_std.UtSn.isForcedUser = true;
bool fatto = _utente.startUpUtente(dominio.Text, user.Text);
if (fatto)
{
string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO);
if (Login_ok != null)
{
Login_ok(this, new EventArgs());
}
}
}
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"))));
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, SteamWare.tipoLog.WARNING);
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
}
}
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"))));
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, SteamWare.tipoLog.WARNING);
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
}
}
else
{
lblMessage.Text = string.Format("{0}<br>user not authenticated!<br>", user_std.UtSn.Traduci("AccessFail"));
if (Login_Error != null)
{
Login_Error(this, new EventArgs());
}
string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text);
SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING);
}
}
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>
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
//carico da web.config i default values
loadDefaultsWebConfig();
// procedo...
setLoginMode();
Session.RemoveAll();
if (_isForceUser == SteamWare.loginMode.normale)
{
AdLogin();
}
}
#endregion
}
-112
View File
@@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class mod_login {
/// <summary>
/// pnlForceUser 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.Panel pnlForceUser;
/// <summary>
/// lblTitolo 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 lblTitolo;
/// <summary>
/// lblPwd 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 lblPwd;
/// <summary>
/// authKey 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.TextBox authKey;
/// <summary>
/// lblDominio 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 lblDominio;
/// <summary>
/// dominio 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.TextBox dominio;
/// <summary>
/// lblUser 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 lblUser;
/// <summary>
/// user 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.TextBox user;
/// <summary>
/// btnOk 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.Button btnOk;
/// <summary>
/// lblMessage 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 lblMessage;
/// <summary>
/// HypLinkSSO 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.HyperLink HypLinkSSO;
}
+1 -1
View File
@@ -44,7 +44,7 @@
<asp:Button ID="btnRichMT" runat="server" Text="Richiesta" CssClass="ui-btn ui-btn-icon-left ui-shadow ui-corner-all clr-btn-orange" data-icon="check" OnClick="btnRichMT_Click" Width="100%" />
</div>
<div class="ui-block-b">
<asp:HyperLink runat="server" ID="hlMancateTimbr" data-role="button" CssClass="ui-btn ui-btn-icon-left ui-icon-back ui-shadow ui-corner-all clr-btn-green" rel="external" data-icon="back" Text="Return" NavigateUrl="~/A3/Timbrature.aspx" />
<asp:HyperLink runat="server" ID="hlMancateTimbr" data-role="button" CssClass="ui-btn ui-btn-icon-left ui-icon-back ui-shadow ui-corner-all clr-btn-green" rel="external" data-icon="back" Text="Return" NavigateUrl="~/Timbrature" />
</div>
</div>
<label for="grView">
@@ -1,94 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_periodoAnalisi" CodeBehind="mod_periodoAnalisi.ascx.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<table cellpadding="0" cellspacing="0" class="filtraggio">
<tr>
<td>
<asp:Label ID="lblPeriodo" runat="server"></asp:Label>
<asp:TextBox ID="txtInizio" TabIndex="1" runat="server" Width="5em" MaxLength="10"
AutoPostBack="True" OnTextChanged="txtInizio_TextChanged" />
<asp:DropDownList ID="ddlOraInizio" TabIndex="2" runat="server" AutoPostBack="True"
OnTextChanged="txtInizio_TextChanged" Font-Size="Smaller">
<asp:ListItem>00</asp:ListItem>
<asp:ListItem>01</asp:ListItem>
<asp:ListItem>02</asp:ListItem>
<asp:ListItem>03</asp:ListItem>
<asp:ListItem>04</asp:ListItem>
<asp:ListItem>05</asp:ListItem>
<asp:ListItem>06</asp:ListItem>
<asp:ListItem>07</asp:ListItem>
<asp:ListItem>08</asp:ListItem>
<asp:ListItem>09</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>13</asp:ListItem>
<asp:ListItem>14</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>16</asp:ListItem>
<asp:ListItem>17</asp:ListItem>
<asp:ListItem>18</asp:ListItem>
<asp:ListItem>19</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>21</asp:ListItem>
<asp:ListItem>22</asp:ListItem>
<asp:ListItem>23</asp:ListItem>
</asp:DropDownList>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInizio"
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
</asp:CalendarExtender>
&#8594;
<asp:TextBox ID="txtFine" TabIndex="3" runat="server" Width="5em" MaxLength="10" AutoPostBack="True" OnTextChanged="txtFine_TextChanged" />
<asp:DropDownList ID="ddlOraFine" TabIndex="2" runat="server" AutoPostBack="True"
OnTextChanged="txtFine_TextChanged" Font-Size="Smaller">
<asp:ListItem>00</asp:ListItem>
<asp:ListItem>01</asp:ListItem>
<asp:ListItem>02</asp:ListItem>
<asp:ListItem>03</asp:ListItem>
<asp:ListItem>04</asp:ListItem>
<asp:ListItem>05</asp:ListItem>
<asp:ListItem>06</asp:ListItem>
<asp:ListItem>07</asp:ListItem>
<asp:ListItem>08</asp:ListItem>
<asp:ListItem>09</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>13</asp:ListItem>
<asp:ListItem>14</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>16</asp:ListItem>
<asp:ListItem>17</asp:ListItem>
<asp:ListItem>18</asp:ListItem>
<asp:ListItem>19</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>21</asp:ListItem>
<asp:ListItem>22</asp:ListItem>
<asp:ListItem>23</asp:ListItem>
</asp:DropDownList>
<asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFine"
FirstDayOfWeek="Monday" Format="dd/MM/yyyy">
</asp:CalendarExtender>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
Font-Size="Smaller">
<asp:ListItem Selected="True">selezione</asp:ListItem>
<asp:ListItem>oggi</asp:ListItem>
<asp:ListItem>ieri</asp:ListItem>
<asp:ListItem>questa settimana</asp:ListItem>
<asp:ListItem>ultimi 7gg</asp:ListItem>
<asp:ListItem>questo mese</asp:ListItem>
<asp:ListItem>mese precedente</asp:ListItem>
<asp:ListItem>ultimi 30gg</asp:ListItem>
<asp:ListItem>questo anno</asp:ListItem>
<asp:ListItem>1 anno</asp:ListItem>
</asp:DropDownList>
&nbsp;
<asp:Button ID="btnUpdate" runat="server" Text="update" Visible="false" OnClick="btnUpdate_Click" />
</td>
<td>
<asp:Label ID="lblDurataMin" runat="server" Visible="false"></asp:Label>
<asp:TextBox ID="txtDurataMin" TabIndex="3" runat="server" Width="2em" MaxLength="3"
AutoPostBack="True" OnTextChanged="txtInizio_TextChanged" Visible="false"></asp:TextBox>
</td>
</tr>
</table>
@@ -1,357 +0,0 @@
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
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
protected intervalloDate _intervallo;
public string uid
{
get
{
return this.UniqueID.Replace("$", "_").Replace("-", "_");
}
}
/// <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>
protected bool mostraSelOra
{
get
{
bool answ = false;
if (memLayer.ML.isInSessionObject("mostraSelOra"))
{
answ = memLayer.ML.BoolSessionObj("mostraSelOra");
}
else
{
// leggo da sessione e salvo...
try
{
answ = memLayer.ML.confReadBool("mostraSelOra");
}
catch
{ }
memLayer.ML.setSessionVal("mostraSelOra", answ);
}
return answ;
}
}
/// <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;
default:
break;
}
if ((intervalloAnalisi.inizio != _intervallo.inizio) || (intervalloAnalisi.fine != _intervallo.fine))
{
verificaCoerenzaDate();
aggiornaDateMostrate(realtimeUpdate);
// mostro btn update
btnUpdate.Visible = !realtimeUpdate;
}
}
/// <summary>
/// effettua update delle date mostrate da intervallo analisi (ed eventualmente riporta update...)
/// </summary>
/// <param name="doReportUpdate"></param>
private void aggiornaDateMostrate(bool doReportUpdate)
{
scriviDate();
if (doReportUpdate)
{
reportUpdate();
}
}
/// <summary>
/// scrive nuove date in controllo
/// </summary>
private void scriviDate()
{
// se intervallo non è valorizzato leggo da sessione...
if (!_intervallo.isValid)
{
_intervallo = intervalloAnalisi;
}
txtInizio.Text = _intervallo.inizio.ToShortDateString();
ddlOraInizio.SelectedValue = _intervallo.inizio.Hour.ToString("00");
txtFine.Text = _intervallo.fine.ToShortDateString();
ddlOraFine.SelectedValue = _intervallo.fine.Hour.ToString("00");
if (mostraSelOra)
{
ddlOraInizio.Visible = true;
ddlOraFine.Visible = true;
}
else
{
ddlOraInizio.Visible = false;
ddlOraFine.Visible = false;
}
}
/// <summary>
/// imposta intervallo da sessione o di default
/// </summary>
private void setIntervallo()
{
intervalloDate _intervallo;
try
{
_intervallo = (intervalloDate)Session["_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;
}
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>
private void verificaCoerenzaDate()
{
// controllo date siano coerenti (fine > inizio)...
if (_intervallo.inizio >= _intervallo.fine)
{
// controllo non siano date successive ad oggi...
if (_intervallo.fine > DateTime.Now)
{
_intervallo.fine = DateTime.Now;
}
_intervallo.fine = _intervallo.inizio.AddDays(1);
}
//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;
}
}
/// <summary>
/// in questo caso faccio udpate periodo mostrato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUpdate_Click(object sender, EventArgs e)
{
aggiornaPeriodo();
// nascondo btn update
btnUpdate.Visible = false;
}
/// <summary>
/// riporta aggiornamento a controller
/// </summary>
protected void reportUpdate()
{
intervalloAnalisi = _intervallo;
// alzo l'evento d update/inserimento e ricarico cache...
if (eh_doUpdate != null)
{
eh_doUpdate(this, new EventArgs());
}
}
#endregion
#region area public
public intervalloDate intervalloAnalisi
{
get
{
return (intervalloDate)Session["_intervallo"];
}
set
{
intervalloDate interv = value;
Session["_intervallo"] = interv;
Session["_inizio"] = interv.inizio;
Session["_fine"] = interv.fine;
aggiornaDateMostrate(false);
}
}
/// <summary>
/// effettua update
/// </summary>
/// <param name="doReportUpdate"></param>
public void doUpdate(bool doReportUpdate)
{
aggiornaDateMostrate(doReportUpdate);
}
/// <summary>
/// imposta periodo libero di selezione
/// </summary>
public void setPeriodoFree()
{
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
}
@@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public partial class mod_periodoAnalisi {
/// <summary>
/// lblPeriodo 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 lblPeriodo;
/// <summary>
/// txtInizio 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.TextBox txtInizio;
/// <summary>
/// ddlOraInizio 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.DropDownList ddlOraInizio;
/// <summary>
/// CalendarExtender1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.CalendarExtender CalendarExtender1;
/// <summary>
/// txtFine 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.TextBox txtFine;
/// <summary>
/// ddlOraFine 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.DropDownList ddlOraFine;
/// <summary>
/// CalendarExtender2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.CalendarExtender CalendarExtender2;
/// <summary>
/// DropDownList1 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.DropDownList DropDownList1;
/// <summary>
/// btnUpdate 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.Button btnUpdate;
/// <summary>
/// lblDurataMin 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 lblDurataMin;
/// <summary>
/// txtDurataMin 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.TextBox txtDurataMin;
}
@@ -1,30 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reportUtenteAD.ascx.cs" Inherits="GPW.WebUserControls.mod_reportUtenteAD" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_dateTime.ascx" TagName="mod_dateTime" TagPrefix="uc3" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div>
<asp:Repeater ID="repReports" runat="server" DataSourceID="odsReports">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl='<%# fullUrl(Eval("ReportUrl"))%>'>
<div class="divSx" style="padding: 1px; width: 100%; min-width: 120px;">
<div class='<%# fullCss(Eval("cssClass")) %>' style="margin: 3px;">
<div class="areaTestoSmall">
<asp:Label runat="server" ID="lblTitle" Text='<%# Eval("nome") %>' ToolTip='<%# Eval("descrizione") %>' />
</div>
</div>
</div>
</asp:HyperLink>
</ItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID="odsReports" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByArea"
TypeName="GPW_data.DS_exportTableAdapters.ElencoReportTableAdapter">
<SelectParameters>
<asp:Parameter DefaultValue="A4" Name="Area" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
@@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GPW_data;
using System.Globalization;
namespace GPW.WebUserControls
{
public partial class mod_reportUtenteAD : System.Web.UI.UserControl
{
/// <summary>
/// css completo dell'oggetto
/// </summary>
/// <param name="url"></param>
/// <returns></returns>
public string fullCss(object css)
{
return string.Format("ui-corner-all shadowBox {0}Small", css);
}
/// <summary>
/// calcola URL completo del report
/// </summary>
/// <param name="repUrl"></param>
/// <returns></returns>
public string fullUrl(object repUrl)
{
string answ = "";
try
{
answ = string.Format(@"{0}{1}", memLayer.ML.confReadString("reportBaseUrl"), repUrl);
}
catch
{ }
return answ;
}
}
}
@@ -1,33 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_reportUtenteAD {
/// <summary>
/// repReports 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.Repeater repReports;
/// <summary>
/// odsReports 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 odsReports;
}
}
@@ -1,329 +0,0 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reviewTimbrature.ascx.cs" Inherits="GPW.WebUserControls.mod_reviewTimbrature" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc3" %>
<%@ Register Src="mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc4" %>
<% if (false)
{ %>
<link href="~/css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="filtro_1" style="height: 28px; padding: 2px;">
<div class="divSx fontPiccolo">
<div class="divSx">
<uc1:mod_filtro ID="filtroDip" runat="server" filterUnchekText="mostraTutti" filterChekText="filtraDip" changeCheckEnabled="false"
changeCheckVisible="false" />
<asp:ObjectDataSource ID="odsDip" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.v_selDipendentiTableAdapter"></asp:ObjectDataSource>
</div>
<div class="divSx">
<uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" />
</div>
<div class="divSx">
<asp:CheckBox runat="server" ID="chkWE" Text="Week-End" Checked="true" OnCheckedChanged="chkWE_CheckedChanged" AutoPostBack="True" />
</div>
<div class="divSx">
<asp:Button runat="server" ID="btnRicalcPeriodo" Text="&Sigma;(h)" Font-Size="Medium" OnClick="btnRicalcPeriodo_Click" ToolTip="Ricalcola valori" />
</div>
</div>
<div class="divDx" style="padding-top: 4px;">
<asp:HyperLink Target="_blank" runat="server" ID="hlExport" CssClass="btnExportCSV" Text="Export Ore" NavigateUrl="~/A1/ExportTimbZucchetti.aspx" />
<asp:HyperLink Target="_blank" runat="server" ID="hlExportComm" CssClass="btnExportCSV" Text="Export Comm." NavigateUrl="~/A1/ExportCommesse.aspx" />
</div>
</div>
<div class="clearDiv">
<div class="divSx">
<asp:GridView ID="grViewExpl" runat="server" AllowPaging="True" DataSourceID="odsExpl" AutoGenerateColumns="False" DataKeyNames="dataLav,idxDipendente"
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="100%" OnSelectedIndexChanged="grViewExpl_SelectedIndexChanged">
<AlternatingRowStyle CssClass="alternatingRowStyleRed" />
<EditRowStyle CssClass="editRowStyleRed" />
<FooterStyle CssClass="footerStyleRed" ForeColor="White" />
<HeaderStyle CssClass="headerStyleRed" ForeColor="White" />
<PagerStyle CssClass="pagerStyleRed" ForeColor="White" />
<RowStyle CssClass="rowStyleRed" />
<SelectedRowStyle CssClass="selectedRowStyleRed" ForeColor="#333333" />
<SortedAscendingCellStyle CssClass="sortAscCellRed" />
<SortedAscendingHeaderStyle CssClass="sortAscHeadRed" />
<SortedDescendingCellStyle CssClass="sortDescCellRed" />
<SortedDescendingHeaderStyle CssClass="sortDescHeadRed" />
<EmptyDataTemplate>
Nessun record trovato
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ImageUrl="~/images/view_s.png"
ToolTip="Mostra timbrature" />
</ItemTemplate>
<HeaderTemplate>
<asp:ImageButton ID="imgBtnReset" runat="server" CausesValidation="False" ImageUrl="~/images/reload_m.png" OnClick="btnReset_Click"
ToolTip="reset" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="False" />
</asp:TemplateField>
<asp:TemplateField HeaderText="dip" SortExpression="CognomeNome">
<ItemTemplate>
<asp:Label ID="lblDip" runat="server" Text='<%# Eval("idxDipendente","{0:00}") %>' ToolTip='<%# Eval("CognomeNome") %>' Font-Size="X-Small"
ForeColor="Blue" Visible='<%# !showCognomeNome %>' />
<asp:Label ID="Label2" runat="server" Text='<%# Eval("CognomeNome") %>' ToolTip='<%# Eval("idxDipendente","{0:00}") %>' Font-Size="X-Small"
ForeColor="Blue" Visible='<%# showCognomeNome %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="left" Wrap="False" Width="1.5em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="data" SortExpression="dataLav">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("dataLav", "{0:dd/MM/yy}, {0:ddd}") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="left" Wrap="False" Width="7.5em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_1">
<ItemTemplate>
<asp:Label ID="lblIn1" runat="server" Text='<%# Eval("entrata_1","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_1">
<ItemTemplate>
<asp:Label ID="lblOut1" runat="server" Text='<%# Eval("uscita_1","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_2">
<ItemTemplate>
<asp:Label ID="lblIn2" runat="server" Text='<%# Eval("entrata_2","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_2">
<ItemTemplate>
<asp:Label ID="lblOut2" runat="server" Text='<%# Eval("uscita_2","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_3">
<ItemTemplate>
<asp:Label ID="lblIn3" runat="server" Text='<%# Eval("entrata_3","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_3">
<ItemTemplate>
<asp:Label ID="lblOut3" runat="server" Text='<%# Eval("uscita_3","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_4">
<ItemTemplate>
<asp:Label ID="lblIn4" runat="server" Text='<%# Eval("entrata_4","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_4">
<ItemTemplate>
<asp:Label ID="lblOut4" runat="server" Text='<%# Eval("uscita_4","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="XX-Small" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="3em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="H lav" SortExpression="h_lav" HeaderStyle-HorizontalAlign="Right">
<ItemTemplate>
<%--<asp:Label ID="lblHLav" runat="server" Text='<%# Eval("h_lav","<b>{0:0.00}</b>") %>' CssClass='<%# classByNL(Eval("minNonLav")) %>' ToolTip='<%# tooltipPermStra(Eval("minStra"),Eval("minPerm")) %>' />--%>
<asp:Label ID="lblHLav" runat="server" Text='<%# formatDurata(Eval("h_lav")) %>' Font-Bold="true" CssClass='<%# classByNL(Eval("minNonLav")) %>'
ToolTip='<%# tooltipPermStra(Eval("minStra"),Eval("minPerm"),Eval("minMpp")) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="4em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="H Giu" SortExpression="h_giust" HeaderStyle-HorizontalAlign="Right">
<ItemTemplate>
<%--<asp:Label ID="lblHGiust" runat="server" Text='<%# Eval("h_giust","{0:0.00}") %>' Visible='<%# isGTZ(Eval("h_giust","{0:0.00}")) %>' />--%>
<asp:Label ID="lblHGiust" runat="server" Text='<%# formatDurata(Eval("h_giust")) %>' Visible='<%# isGTZ(Eval("h_giust","{0:0.00}")) %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="4em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label runat="server" ID="lblHeadCheck" Text="-" ToolTip="Controllo coerenza Timbrature" />
</HeaderTemplate>
<ItemTemplate>
<b>
<asp:Label ID="lblIsOkTim" runat="server" Text="T" ForeColor="Red" Visible='<%# invBool(Eval("isOkTim")) %>' ToolTip="Errore Entrata/Uscita: non corrispondono." />
<asp:Label ID="lblIsOkApp" runat="server" Text="A" ForeColor="Red" Visible='<%# invBool(Eval("isOkApp")) %>' ToolTip="Errore: timbrature non approvate." />
<asp:Label ID="lblIsOkLav" runat="server" Text="O" ForeColor="Red" Visible='<%# invBool(Eval("isOkLav")) %>' ToolTip="Errore: manca copertura ore ordinarie." />
<asp:Label ID="lblChkFun" runat="server" Text='<%# Eval("chkFunCod") %>' ForeColor='<%# coloreMPP(Eval("minMpp")) %>' Visible='<%# Eval("chkFunCod")!="" %>' ToolTip='<%# Eval("chkFunRes") %>' />
<asp:Label ID="lblIsOk" runat="server" Text="Ok" ForeColor="Green" Visible='<%# toBool(Eval("isOk")) %>' ToolTip="Errore di uno o più fra timbrature / giustificativi / approvazione" />
</b>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="4em"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="H Com" SortExpression="h_com" HeaderStyle-HorizontalAlign="Right">
<ItemTemplate>
<b>
<asp:Label ID="lblHComm" runat="server" Text='<%# formatDurata(Eval("h_com")) %>' ForeColor='<%# coloreComm(Eval("OkLavCom")) %>' />
</b>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Wrap="False" Width="4em"></ItemStyle>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsExpl" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.TE_RA_ExplTableAdapter">
<SelectParameters>
<asp:SessionParameter SessionField="idxDip_sel" Name="idxDipendente" Type="Int32" DefaultValue="0" />
<asp:SessionParameter SessionField="_inizio" Name="dataFrom" Type="DateTime" />
<asp:SessionParameter SessionField="_fine" Name="dataTo" Type="DateTime" />
<asp:ControlParameter ControlID="chkWE" Name="showWE" Type="Boolean" />
<asp:SessionParameter SessionField="maxErrMin" Name="maxErrMin" Type="Int32" DefaultValue="-30" />
<asp:SessionParameter SessionField="maxErrPlus" Name="maxErrPlus" Type="Int32" DefaultValue="30" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<div class="divSx fontPiccolo">
<asp:Panel runat="server" ID="pnlDettagli">
<div id="accordion">
<h3>Timbrature e Giustificativi</h3>
<div>
<div class="dataBlock blockSizeXXLarge divSx">
<uc3:mod_elencoTimbr ID="mod_elencoTimbr1" runat="server" showUserName="false" showLongDateFormat="true" />
<hr />
<asp:GridView ID="grViewGiust" runat="server" DataSourceID="odsGiust" AutoGenerateColumns="False" DataKeyNames="dataLav,idxDipendente,codGiust"
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="100%" Visible="False">
<AlternatingRowStyle CssClass="alternatingRowStyleGreen" />
<EditRowStyle CssClass="editRowStyleGreen" />
<FooterStyle CssClass="footerStyleGreen" ForeColor="White" />
<HeaderStyle CssClass="headerStyleGreen" ForeColor="White" />
<PagerStyle CssClass="pagerStyleGreen" ForeColor="White" />
<RowStyle CssClass="rowStyleGreen" />
<SelectedRowStyle CssClass="selectedRowStyleGreen" ForeColor="#333333" />
<SortedAscendingCellStyle CssClass="sortAscCellGreen" />
<SortedAscendingHeaderStyle CssClass="sortAscHeadGreen" />
<SortedDescendingCellStyle CssClass="sortDescCellGreen" />
<SortedDescendingHeaderStyle CssClass="sortDescHeadGreen" />
<EmptyDataTemplate>
<div style="background-color: #ACACAC;">
Nessun GIUSTIFICATIVO attivo:
<br />
<asp:Button runat="server" ID="btNewGiust" Text="Aggiungi" OnClick="btNewGiust_Click" Visible='<%# userCanApprove %>' />
<i>(tipo PERM, editabile)</i>
</div>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="~/images/edit_s.png" Visible='<%# userCanApprove %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update")%>'
ImageUrl="~/images/apply_s.png" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="~/images/cancel_s.png" />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("Insert") %>'
ImageUrl="~/images/new_s.png" OnClick="lblIns_click" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="~/images/cancel_s.png" />
</FooterTemplate>
<HeaderTemplate>
<asp:ImageButton ID="imgBtnReset" runat="server" ToolTip='<%# traduci("Reset") %>' CausesValidation="False" OnClick="btnResetGiust_Click"
ImageUrl="~/images/reload_s.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="dataLav" SortExpression="dataLav">
<ItemTemplate>
<asp:Label ID="lbldataLav" runat="server" Text='<%# Eval("dataLav", "{0:yyyy/MM/dd}") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lbldataLav" runat="server" Text='<%# Eval("dataLav", "{0:yyyy/MM/dd}") %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="codGiust" SortExpression="codGiust">
<ItemTemplate>
<asp:Label ID="lblcodGiust" runat="server" Text='<%# Bind("codGiust") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlcodGiust" runat="server" DataSourceID="odsCodGiust" SelectedValue='<%# Bind("codGiust") %>' DataTextField="value"
DataValueField="value">
</asp:DropDownList>
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlcodGiust" runat="server" DataSourceID="odsCodGiust" SelectedValue='<%# Bind("codGiust") %>' DataTextField="value"
DataValueField="value">
</asp:DropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="minuti" SortExpression="minuti">
<ItemTemplate>
<asp:Label ID="lblminuti" runat="server" Text='<%# Bind("minuti") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtminuti" runat="server" Text='<%# Bind("minuti") %>' Width="3em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtminuti" runat="server" Text='<%# Bind("minuti") %>' Width="3em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandName="Delete" ImageUrl="~/images/elimina_s.png"
ToolTip='<%# traduci("Delete") %>' Visible='<%# userCanApprove %>' />
<asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete">
</asp:ConfirmButtonExtender>
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate2" runat="server" CausesValidation="False" CommandName="Update" ImageUrl="~/images/apply_s.png"
ToolTip='<%# traduci("Update")%>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_s.png"
ToolTip='<%# traduci("Cancel") %>' />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgInsert2" runat="server" CausesValidation="False" CommandName="Insert" ImageUrl="~/images/new_s.png"
OnClick="lblIns_click" ToolTip='<%# traduci("Insert") %>' />
<asp:ImageButton ID="imgCancel2" runat="server" CausesValidation="False" CommandName="Cancel" ImageUrl="~/images/cancel_s.png"
ToolTip='<%# traduci("Cancel") %>' />
</FooterTemplate>
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' Visible='<%# userCanApprove %>' />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="odsGiust" runat="server" DeleteMethod="DeleteQuery" InsertMethod="InsertQuery" OldValuesParameterFormatString="original_{0}"
SelectMethod="getByDipDate" TypeName="GPW_data.DS_ApplicazioneTableAdapters.GiustificativiTableAdapter" UpdateMethod="updateQuery"
OnDeleted="odsGiust_Deleted" OnUpdated="odsGiust_Updated" OnInserting="odsGiust_Inserting">
<DeleteParameters>
<asp:Parameter Name="Original_dataLav" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_codGiust" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:SessionParameter Name="dataLav" SessionField="dataRif" Type="DateTime" />
<asp:SessionParameter SessionField="idxDip_det" Name="idxDipendente" Type="Int32" DefaultValue="0" />
<asp:Parameter Name="codGiust" Type="String" />
<asp:Parameter Name="minuti" Type="Int32" />
</InsertParameters>
<SelectParameters>
<asp:SessionParameter Name="dataLav" SessionField="dataRif" Type="DateTime" />
<asp:SessionParameter SessionField="idxDip_det" Name="idxDipendente" Type="Int32" DefaultValue="0" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_dataLav" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_codGiust" Type="String" />
<asp:Parameter Name="codGiust" Type="String" />
<asp:Parameter Name="minuti" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsCodGiust" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selCodGiustTableAdapter"></asp:ObjectDataSource>
</div>
</div>
<h3>Record Commesse</h3>
<div>
<div class="dataBlock blockSizeXXLarge divSx">
<uc4:mod_commAttivitaDesk ID="mod_commAttivitaDesk1" runat="server" enableFull="false" />
</div>
</div>
</div>
</asp:Panel>
</div>
</div>
@@ -1,510 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SteamWare;
using GPW_data;
using System.Globalization;
using System.Data;
using System.Drawing;
namespace GPW.WebUserControls
{
public partial class mod_reviewTimbrature : System.Web.UI.UserControl
{
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grViewExpl.PageSize = utils.pageSize;
if (!Page.IsPostBack)
{
filtroDip.ods = odsDip;
memLayer.ML.emptySessionVal("idxDip_sel");
memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin"));
memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus"));
filtroDip.reselFirst();
setDetailVisib(false);
}
filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
mod_elencoTimbr1.eh_nuovoValore += new EventHandler(mod_elencoTimbr1_eh_nuovoValore);
}
/// <summary>
/// valore selezionato x dettaglio giornaliero utente
/// </summary>
protected DateTime dataRif
{
get
{
DateTime answ = DateTime.Now;
try
{
answ = Convert.ToDateTime(memLayer.ML.objSessionObj("dataRif"));
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("dataRif", value);
}
}
void mod_elencoTimbr1_eh_nuovoValore(object sender, EventArgs e)
{
checkFixOds();
}
/// <summary>
/// seleziono
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void filtroDip_eh_selValore(object sender, EventArgs e)
{
// imposto ods
grViewExpl.SelectedIndex = -1;
setDetailVisib(false);
checkFixOds();
}
/// <summary>
/// imposto ODS
/// </summary>
private void checkFixOds()
{
memLayer.ML.setSessionVal("idxDip_sel", filtroDip.valoreInt);
grViewExpl.DataBind();
mod_elencoTimbr1.doUpdate();
}
/// <summary>
/// calcola cognome-nome da idx
/// </summary>
/// <param name="idxDip"></param>
/// <returns></returns>
public string cognomeNome(object idxDip)
{
string answ = "";
try
{
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0];
answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome);
}
catch
{ }
return answ;
}
/// <summary>
/// verifica se l'utente possa approvare la modifica oraria
/// </summary>
public bool userCanApprove
{
get
{
bool answ = false;
try
{
answ = user_std.UtSn.userHasRight("GPW_admin");
}
catch
{ }
return answ;
}
}
/// <summary>
/// idx dipendente loggato
/// </summary>
protected int IdxDipendente
{
get
{
int idx = 0;
try
{
idx = memLayer.ML.IntSessionObj("IdxDipendente");
}
catch
{ }
return idx;
}
}
/// <summary>
/// inverte valore booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool invBool(object valore)
{
bool answ = true;
try
{
answ = !Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// converte valore in booleano
/// </summary>
/// <param name="isEnt"></param>
/// <returns></returns>
public bool toBool(object valore)
{
bool answ = true;
try
{
answ = Convert.ToBoolean(valore);
}
catch
{ }
return answ;
}
/// <summary>
/// mostro visualizzazione dati di dettaglio!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grViewExpl_SelectedIndexChanged(object sender, EventArgs e)
{
dataRif = Convert.ToDateTime(grViewExpl.SelectedDataKey["dataLav"]).Date;
setDetailVisib(true);
// mostra timbrature
memLayer.ML.setSessionVal("inizioDet", dataRif);
memLayer.ML.setSessionVal("fineDet", dataRif.AddDays(1));
memLayer.ML.setSessionVal("idxDip_det", grViewExpl.SelectedDataKey["idxDipendente"]);
mod_elencoTimbr1.doUpdate();
// mostra commesse
memLayer.ML.setSessionVal("idxDipendente", grViewExpl.SelectedDataKey["idxDipendente"]);
CultureInfo ita = new CultureInfo("it-IT");
mod_commAttivitaDesk1.idxDipCurr = Convert.ToInt32(grViewExpl.SelectedDataKey["idxDipendente"]);
mod_commAttivitaDesk1.valoreDateTime = Convert.ToDateTime(dataRif, ita);
mod_commAttivitaDesk1.doUpdate();
grViewExpl.DataBind();
}
/// <summary>
/// set visibilità grView dettagli
/// </summary>
/// <param name="value"></param>
private void setDetailVisib(bool value)
{
pnlDettagli.Visible = value;
//mod_elencoTimbr1.Visible = value;
grViewGiust.Visible = value;
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grViewExpl.SelectedIndex = -1;
grViewExpl.DataBind();
setDetailVisib(false);
}
/// <summary>
/// evento update righe
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
grViewExpl.DataBind();
}
/// <summary>
/// evento cancellazione riga
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e)
{
grViewExpl.DataBind();
}
/// <summary>
///
/// </summary>
/// <param name="minutiNonLav"></param>
/// <returns></returns>
public string classByNL(object minutiNonLav)
{
string answ = "";
try
{
if (Convert.ToDouble(minutiNonLav) > 0)
{
answ = "lblWarning";
}
}
catch
{ }
return answ;
}
/// <summary>
/// prepara tooltip permessi/straordinarie
/// </summary>
/// <param name="minStra"></param>
/// <param name="minPerm"></param>
/// <param name="minPP"></param>
/// <returns></returns>
public string tooltipPermStra(object minStra, object minPerm, object minMpp)
{
string answ = "";
try
{
answ = string.Format("Straordinarie: {0:0.##} min, Permessi: {1:0.##} min", minStra, minPerm);
if (Convert.ToInt32(minMpp) > 0)
{
answ += string.Format(", Pranzo: {0:0.##} min", minMpp);
}
}
catch
{ }
return answ;
}
#region editing giustificativi
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezioneGiust()
{
grViewGiust.SelectedIndex = -1;
grViewGiust.DataBind();
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnResetGiust_Click(object sender, EventArgs e)
{
resetSelezioneGiust();
}
/// <summary>
/// gestione evento richiesta nuovo valore (mostra footer, ...)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
// reset selezione...
resetSelezioneGiust();
int idxDip = memLayer.ML.IntSessionObj("idxDip_det");
// calcola ed inserisce giustificativi
DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM");
updateVisual();
}
/// <summary>
/// inserisce nuovo valore da footer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lblIns_click(object sender, EventArgs e)
{
// click su inserimento, chiamo il metodo insert dell'ObjectDataSource
odsGiust.Insert();
}
/// <summary>
/// annulla inserimento nuovo valore da footer
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lblCanc_click(object sender, EventArgs e)
{
// annullo inserimento: nascondo footer, bind controlli...
grViewGiust.FooterRow.Visible = false;
}
/// <summary>
/// inserisce un giust nuovo x dipendente/data
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btNewGiust_Click(object sender, EventArgs e)
{
int idxDip = memLayer.ML.IntSessionObj("idxDip_det");
// calcola ed inserisce giustificativi
DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM");
updateVisual();
}
/// <summary>
/// aggiorna i 3 datagrid
/// </summary>
private void updateVisual()
{
// aggiorno visualizzazioni
grViewExpl.DataBind();
mod_elencoTimbr1.doUpdate();
grViewGiust.DataBind();
}
/// <summary>
/// aggiornamento x update
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void odsGiust_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
updateVisual();
}
/// <summary>
/// aggiornamento x delete
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void odsGiust_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
{
updateVisual();
}
/// <summary>
/// calcola se sia visibile con criterio GREATER THAN ZERO
/// </summary>
/// <param name="valore"></param>
/// <returns></returns>
public bool isGTZ(object valore)
{
bool answ = false;
try
{
if (Convert.ToDouble(valore) > 0)
{
answ = true;
}
}
catch
{ }
return answ;
}
#endregion
/// <summary>
/// cambia stato visibilità week-end...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void chkWE_CheckedChanged(object sender, EventArgs e)
{
// imposto ods
checkFixOds();
}
/// <summary>
/// ricalcola giornate periodo visualizzato per i dipendenti selezionati
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnRicalcPeriodo_Click(object sender, EventArgs e)
{
// eseguo la stored di update dato condizione di filtro x periodo e dipendente...
DataProxy.DP.taTimbExpl.stp_ricalcolaTimbExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")));
DataProxy.DP.taRA.stp_ricalcolaRegAttivitaExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine")));
// aggiorno
checkFixOds();
}
/// <summary>
/// restituisce il colore data valore ok commessa
/// </summary>
/// <param name="okLavCom"></param>
/// <returns></returns>
public Color coloreComm(object okLavCom)
{
Color answ = Color.Orange;
try
{
if (toBool(okLavCom))
{
answ = Color.Black;
}
}
catch
{ }
return answ;
}
/// <summary>
/// restituisce il colore dato minMpp (se > 0 è verde, altrimenti marrone)
/// </summary>
/// <param name="okLavCom"></param>
/// <returns></returns>
public Color coloreMPP(object minMpp)
{
Color answ = Color.FromName("#995511");
try
{
if (minMpp.ToString()!="0")
{
answ = Color.FromName("#66AA22");
}
}
catch
{ }
return answ;
}
/// <summary>
/// determina se si debba mostrare cognome nome (altrimenti IDX anonimo)
/// </summary>
public bool showCognomeNome
{
get
{
return memLayer.ML.confReadBool("reviewShowCN");
}
}
/// <summary>
/// formatta la durata in ore secondo web.config (centesimale/ore:min)
/// </summary>
/// <param name="oreCent"></param>
/// <returns></returns>
public string formatDurata(object oreCent)
{
decimal ore = 0;
try
{
ore = Convert.ToDecimal(oreCent);
}
catch
{ }
string answ = "";
if (memLayer.ML.confReadBool("reviewShowOreMin"))
{
//answ = string.Format("{0}:{1:00}", Math.Floor(ore), Math.Round((ore - Math.Floor(ore)) * 60));
answ = utils.formOreMin(ore);
}
else
{
answ = ore.ToString("0.00");
}
return answ;
}
protected void odsGiust_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
{
}
}
}
@@ -1,150 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.WebUserControls {
public partial class mod_reviewTimbrature {
/// <summary>
/// filtroDip control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_filtro filtroDip;
/// <summary>
/// odsDip 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 odsDip;
/// <summary>
/// mod_periodoAnalisi1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_periodoAnalisi mod_periodoAnalisi1;
/// <summary>
/// chkWE 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.CheckBox chkWE;
/// <summary>
/// btnRicalcPeriodo 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.Button btnRicalcPeriodo;
/// <summary>
/// hlExport 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.HyperLink hlExport;
/// <summary>
/// hlExportComm 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.HyperLink hlExportComm;
/// <summary>
/// grViewExpl 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 grViewExpl;
/// <summary>
/// odsExpl 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 odsExpl;
/// <summary>
/// pnlDettagli 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.Panel pnlDettagli;
/// <summary>
/// mod_elencoTimbr1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_elencoTimbr mod_elencoTimbr1;
/// <summary>
/// grViewGiust 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 grViewGiust;
/// <summary>
/// odsGiust 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 odsGiust;
/// <summary>
/// odsCodGiust 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 odsCodGiust;
/// <summary>
/// mod_commAttivitaDesk1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commAttivitaDesk mod_commAttivitaDesk1;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="attivitaIns.aspx.cs" Inherits="GPW.A3.attivitaIns" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="attivitaIns.aspx.cs" Inherits="GPW_Smart.attivitaIns" %>
<%@ Register src="~/WebUserControls/mod_attivitaIns.ascx" tagname="mod_attivitaIns" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class attivitaIns : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class attivitaIns {
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="mancataTimbr.aspx.cs" Inherits="GPW.A3.mancataTimbr" EnableEventValidation="false" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobile.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="mancataTimbr.aspx.cs" Inherits="GPW_Smart.mancataTimbr" EnableEventValidation="false" %>
<%@ Register Src="~/WebUserControls/mod_mancTimb.ascx" TagName="mod_mancTimb" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class mancataTimbr : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class mancataTimbr {
+1 -1
View File
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileNoCookie.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="regNewDevice.aspx.cs" Inherits="GPW.A3.regNewDevice" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileNoCookie.Master" Culture="it-IT" AutoEventWireup="true" CodeBehind="regNewDevice.aspx.cs" Inherits="GPW_Smart.regNewDevice" %>
<%@ Register Src="~/WebUserControls/mod_regNewDevice.ascx" TagName="mod_regNewDevice" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A3
namespace GPW_Smart
{
public partial class regNewDevice : System.Web.UI.Page
{
+1 -1
View File
@@ -7,7 +7,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace GPW.A3 {
namespace GPW_Smart {
public partial class regNewDevice {