Aggiunta area A4 + webUserCOntrols e WebMasterPages

This commit is contained in:
Samuele E. Locatelli
2016-11-09 15:51:05 +01:00
parent b7fe1e026f
commit be8aa07bb4
204 changed files with 20686 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GPW.PPArea.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>
Personal Panel</h1>
<p>
Default page</p>
</div>
</form>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
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.PPArea
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("preUrlString", "A4", true);
memLayer.ML.setSessionVal("nextPage", "commesseUtente.aspx");
Response.Redirect("login.aspx");
}
}
}
+26
View File
@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <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.PPArea
{
public partial class Default
{
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}
+10
View File
@@ -0,0 +1,10 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileBodyOnly.Master" AutoEventWireup="true" CodeBehind="attivita.aspx.cs"
Inherits="GPW.A4.attivita" %>
<%@ Register Src="../WebUserControls/mod_commAttivita.ascx" TagName="mod_commAttivita" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Attività Utente</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_commAttivita ID="mod_commAttivita1" runat="server" returnPage="attivita.aspx" />
</asp:Content>
+16
View File
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class attivita : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
public partial class attivita {
/// <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;
}
}
+8
View File
@@ -0,0 +1,8 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileBodyOnly.Master" AutoEventWireup="true" CodeBehind="attivitaIns.aspx.cs" Inherits="GPW.A4.attivitaIns" %>
<%@ Register Src="../WebUserControls/mod_attivitaIns.ascx" TagName="mod_attivitaIns" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Nuova attività
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_attivitaIns ID="mod_attivitaIns1" runat="server" />
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class attivitaIns : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
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;
}
}
+6
View File
@@ -0,0 +1,6 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="commesseUtente.aspx.cs" Inherits="GPW.A4.commesseUtente" EnableEventValidation="false" %>
<%@ Register src="../WebUserControls/mod_commUtLog.ascx" tagname="mod_commUtLog" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<uc1:mod_commUtLog ID="mod_commUtLog1" runat="server" />
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class commesseUtente : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
public partial class commesseUtente {
/// <summary>
/// mod_commUtLog1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commUtLog mod_commUtLog1;
}
}
+5
View File
@@ -0,0 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="gestMancTimb.aspx.cs" Inherits="GPW.A4.gestMancTimb" %>
<%@ Register src="../WebUserControls/mod_commUtMancTimbr.ascx" tagname="mod_commUtMancTimbr" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<uc1:mod_commUtMancTimbr ID="mod_commUtMancTimbr1" runat="server" />
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class gestMancTimb : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
public partial class gestMancTimb {
/// <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;
}
}
+5
View File
@@ -0,0 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimple.master" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="GPW.A4.login" %>
<%@ Register src="../WebUserControls/mod_login.ascx" tagname="mod_login" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<uc1:mod_login ID="mod_login1" runat="server" />
</asp:Content>
+53
View File
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class login : System.Web.UI.Page
{
protected string _nextPage
{
get
{
string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage");
if (pagina == "")
{
pagina = "commesseUtente.aspx";
}
return pagina;
}
}
protected void Page_Load(object sender, EventArgs e)
{
mod_login1.modoLogin = SteamWare.loginMode.normale;
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok);
mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error);
}
void Mod_login1_Login_Error(object sender, EventArgs e)
{
Response.Redirect("unauthorized.aspx");
}
void Mod_login1_Login_ok(object sender, EventArgs e)
{
Response.Redirect(_nextPage);
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok);
mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error);
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
public partial class login {
/// <summary>
/// mod_login1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_login mod_login1;
}
}
+10
View File
@@ -0,0 +1,10 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/jQueryMobileAjaxBodyOnly.Master" AutoEventWireup="true"
CodeBehind="panelUtente.aspx.cs" Inherits="GPW.A4.panelUtente" %>
<%@ Register Src="../WebUserControls/mod_commUtLog.ascx" TagName="mod_commUtLog" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Pannello Input utente
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<uc1:mod_commUtLog ID="mod_commUtLog1" runat="server" />
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A4
{
public partial class panelUtente : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A4 {
public partial class panelUtente {
/// <summary>
/// mod_commUtLog1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_commUtLog mod_commUtLog1;
}
}
+5
View File
@@ -0,0 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimple.master" AutoEventWireup="true" CodeBehind="unauthorized.aspx.cs" Inherits="GPW.A1.unauthorized" %>
<%@ Register src="../WebUserControls/mod_unauthorized.ascx" tagname="mod_unauthorized" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<uc1:mod_unauthorized ID="mod_unauthorized1" runat="server" />
</asp:Content>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.A1
{
public partial class unauthorized : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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.A1 {
public partial class unauthorized {
/// <summary>
/// mod_unauthorized1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_unauthorized mod_unauthorized1;
}
}
+545
View File
@@ -43,6 +43,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AjaxControlToolkit, Version=16.1.1.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL">
<HintPath>..\packages\AjaxControlToolkit.16.1.1.0\lib\net40\AjaxControlToolkit.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
<Private>True</Private>
@@ -55,6 +59,10 @@
<HintPath>..\packages\AspNet.ScriptManager.jQuery.3.1.1\lib\net45\AspNet.ScriptManager.jQuery.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Elmah, Version=1.2.14706.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\elmah.corelibrary.1.2.2\lib\Elmah.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.2\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
<Private>True</Private>
@@ -113,12 +121,69 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<Content Include="A4\attivita.aspx" />
<Content Include="A4\attivitaIns.aspx" />
<Content Include="A4\commesseUtente.aspx" />
<Content Include="A4\Default.aspx" />
<Content Include="A4\gestMancTimb.aspx" />
<Content Include="A4\login.aspx" />
<Content Include="A4\panelUtente.aspx" />
<Content Include="A4\unauthorized.aspx" />
<Content Include="About.aspx" />
<Content Include="App_Readme\Elmah.txt" />
<Content Include="Contact.aspx" />
<Content Include="Content\bootstrap-theme.css" />
<Content Include="Content\bootstrap-theme.min.css" />
<Content Include="Content\bootstrap.css" />
<Content Include="Content\bootstrap.min.css" />
<Content Include="WebUserControls\mod_adminClienti.ascx" />
<Content Include="WebUserControls\mod_adminDipendenti.ascx" />
<Content Include="WebUserControls\mod_adminFasi.ascx" />
<Content Include="WebUserControls\mod_adminOrario.ascx" />
<Content Include="WebUserControls\mod_adminProgetti.ascx" />
<Content Include="WebUserControls\mod_approvaTimbr.ascx" />
<Content Include="WebUserControls\mod_attivitaIns.ascx" />
<Content Include="WebUserControls\mod_autocomplete.ascx" />
<Content Include="WebUserControls\mod_barPlot.ascx" />
<Content Include="WebUserControls\mod_bCodeTimb.ascx" />
<Content Include="WebUserControls\mod_commAttivita.ascx" />
<Content Include="WebUserControls\mod_commAttivitaDesk.ascx" />
<Content Include="WebUserControls\mod_commUtLog.ascx" />
<Content Include="WebUserControls\mod_commUtMancTimbr.ascx" />
<Content Include="WebUserControls\mod_dateTime.ascx" />
<Content Include="WebUserControls\mod_dateTimeJQM.ascx" />
<Content Include="WebUserControls\mod_dettaglioProgetto.ascx" />
<Content Include="WebUserControls\mod_elencoTimbr.ascx" />
<Content Include="WebUserControls\mod_enrollByAuthKey.ascx" />
<Content Include="WebUserControls\mod_enrollByEmail.ascx" />
<Content Include="WebUserControls\mod_enrollByJumperAuthKey.ascx" />
<Content Include="WebUserControls\mod_filtro.ascx" />
<Content Include="WebUserControls\mod_footer.ascx" />
<Content Include="WebUserControls\mod_login.ascx" />
<Content Include="WebUserControls\mod_mancTimb.ascx" />
<Content Include="WebUserControls\mod_menuBottom.ascx" />
<Content Include="WebUserControls\mod_menuBottomFullBCode.ascx" />
<Content Include="WebUserControls\mod_menuBottomFullpage.ascx" />
<Content Include="WebUserControls\mod_menuSx.ascx" />
<Content Include="WebUserControls\mod_menuTop.ascx" />
<Content Include="WebUserControls\mod_menuTopFull.ascx" />
<Content Include="WebUserControls\mod_pageSize.ascx" />
<Content Include="WebUserControls\mod_pageTitleAndSearch.ascx" />
<Content Include="WebUserControls\mod_periodoAnalisi.ascx" />
<Content Include="WebUserControls\mod_progetti.ascx" />
<Content Include="WebUserControls\mod_regNewDevice.ascx" />
<Content Include="WebUserControls\mod_reportPrj.ascx" />
<Content Include="WebUserControls\mod_reportUtenteAD.ascx" />
<Content Include="WebUserControls\mod_resetUserAuthKey.ascx" />
<Content Include="WebUserControls\mod_reviewTimbrature.ascx" />
<Content Include="WebUserControls\mod_ricercaGenerica.ascx" />
<Content Include="WebUserControls\mod_sendAuthToEmail.ascx" />
<Content Include="WebUserControls\mod_spostaOre.ascx" />
<Content Include="WebUserControls\mod_TagCloudProgetti.ascx" />
<Content Include="WebUserControls\mod_timbrature.ascx" />
<Content Include="WebUserControls\mod_timbrMensili.ascx" />
<Content Include="WebUserControls\mod_title.ascx" />
<Content Include="WebUserControls\mod_unauthorized.ascx" />
<None Include="compilerconfig.json" />
<None Include="compilerconfig.json.defaults">
<DependentUpon>compilerconfig.json</DependentUpon>
@@ -291,11 +356,78 @@
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<Content Include="WebMasterPages\AjaxSearch.master" />
<Content Include="WebMasterPages\AjaxSimple.master" />
<Content Include="WebMasterPages\AjaxSimpleFull.Master" />
<Content Include="WebMasterPages\AjaxSimpleFullBCode.Master" />
<Content Include="WebMasterPages\AjaxTitle.master" />
<Content Include="WebMasterPages\JQMob.Master" />
<Content Include="WebMasterPages\jQueryMobile.Master" />
<Content Include="WebMasterPages\jQueryMobileAjaxBodyOnly.Master" />
<Content Include="WebMasterPages\jQueryMobileBodyOnly.Master" />
<Content Include="WebMasterPages\jQueryMobileNoCookie.Master" />
<Content Include="WebMasterPages\MasterAjax.master" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\VersGen\GPW.cs">
<Link>GPW.cs</Link>
</Compile>
<Compile Include="A4\attivita.aspx.cs">
<DependentUpon>attivita.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\attivita.aspx.designer.cs">
<DependentUpon>attivita.aspx</DependentUpon>
</Compile>
<Compile Include="A4\attivitaIns.aspx.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\attivitaIns.aspx.designer.cs">
<DependentUpon>attivitaIns.aspx</DependentUpon>
</Compile>
<Compile Include="A4\commesseUtente.aspx.cs">
<DependentUpon>commesseUtente.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\commesseUtente.aspx.designer.cs">
<DependentUpon>commesseUtente.aspx</DependentUpon>
</Compile>
<Compile Include="A4\Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\Default.aspx.designer.cs">
<DependentUpon>Default.aspx</DependentUpon>
</Compile>
<Compile Include="A4\gestMancTimb.aspx.cs">
<DependentUpon>gestMancTimb.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\gestMancTimb.aspx.designer.cs">
<DependentUpon>gestMancTimb.aspx</DependentUpon>
</Compile>
<Compile Include="A4\login.aspx.cs">
<DependentUpon>login.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\login.aspx.designer.cs">
<DependentUpon>login.aspx</DependentUpon>
</Compile>
<Compile Include="A4\panelUtente.aspx.cs">
<DependentUpon>panelUtente.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\panelUtente.aspx.designer.cs">
<DependentUpon>panelUtente.aspx</DependentUpon>
</Compile>
<Compile Include="A4\unauthorized.aspx.cs">
<DependentUpon>unauthorized.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="A4\unauthorized.aspx.designer.cs">
<DependentUpon>unauthorized.aspx</DependentUpon>
</Compile>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="About.aspx.cs">
<DependentUpon>About.aspx</DependentUpon>
@@ -349,6 +481,419 @@
<Compile Include="ViewSwitcher.ascx.designer.cs">
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\AjaxSearch.master.cs">
<DependentUpon>AjaxSearch.master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\AjaxSearch.master.designer.cs">
<DependentUpon>AjaxSearch.master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\AjaxSimple.master.cs">
<DependentUpon>AjaxSimple.master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\AjaxSimple.master.designer.cs">
<DependentUpon>AjaxSimple.master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\AjaxSimpleFull.Master.cs">
<DependentUpon>AjaxSimpleFull.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\AjaxSimpleFull.Master.designer.cs">
<DependentUpon>AjaxSimpleFull.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\AjaxSimpleFullBCode.Master.cs">
<DependentUpon>AjaxSimpleFullBCode.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\AjaxSimpleFullBCode.Master.designer.cs">
<DependentUpon>AjaxSimpleFullBCode.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\AjaxTitle.master.cs">
<DependentUpon>AjaxTitle.master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\AjaxTitle.master.designer.cs">
<DependentUpon>AjaxTitle.master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\JQMob.Master.cs">
<DependentUpon>JQMob.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\JQMob.Master.designer.cs">
<DependentUpon>JQMob.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\jQueryMobile.Master.cs">
<DependentUpon>jQueryMobile.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\jQueryMobile.Master.designer.cs">
<DependentUpon>jQueryMobile.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileAjaxBodyOnly.Master.cs">
<DependentUpon>jQueryMobileAjaxBodyOnly.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileAjaxBodyOnly.Master.designer.cs">
<DependentUpon>jQueryMobileAjaxBodyOnly.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileBodyOnly.Master.cs">
<DependentUpon>jQueryMobileBodyOnly.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileBodyOnly.Master.designer.cs">
<DependentUpon>jQueryMobileBodyOnly.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileNoCookie.Master.cs">
<DependentUpon>jQueryMobileNoCookie.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\jQueryMobileNoCookie.Master.designer.cs">
<DependentUpon>jQueryMobileNoCookie.Master</DependentUpon>
</Compile>
<Compile Include="WebMasterPages\MasterAjax.master.cs">
<DependentUpon>MasterAjax.master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebMasterPages\MasterAjax.master.designer.cs">
<DependentUpon>MasterAjax.master</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminClienti.ascx.cs">
<DependentUpon>mod_adminClienti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_adminClienti.ascx.designer.cs">
<DependentUpon>mod_adminClienti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminDipendenti.ascx.cs">
<DependentUpon>mod_adminDipendenti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_adminDipendenti.ascx.designer.cs">
<DependentUpon>mod_adminDipendenti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminFasi.ascx.cs">
<DependentUpon>mod_adminFasi.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_adminFasi.ascx.designer.cs">
<DependentUpon>mod_adminFasi.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminOrario.ascx.cs">
<DependentUpon>mod_adminOrario.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_adminOrario.ascx.designer.cs">
<DependentUpon>mod_adminOrario.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_adminProgetti.ascx.cs">
<DependentUpon>mod_adminProgetti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_adminProgetti.ascx.designer.cs">
<DependentUpon>mod_adminProgetti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_approvaTimbr.ascx.cs">
<DependentUpon>mod_approvaTimbr.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_approvaTimbr.ascx.designer.cs">
<DependentUpon>mod_approvaTimbr.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_attivitaIns.ascx.cs">
<DependentUpon>mod_attivitaIns.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_attivitaIns.ascx.designer.cs">
<DependentUpon>mod_attivitaIns.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_autocomplete.ascx.cs">
<DependentUpon>mod_autocomplete.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_autocomplete.ascx.designer.cs">
<DependentUpon>mod_autocomplete.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_barPlot.ascx.cs">
<DependentUpon>mod_barPlot.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_barPlot.ascx.designer.cs">
<DependentUpon>mod_barPlot.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_bCodeTimb.ascx.cs">
<DependentUpon>mod_bCodeTimb.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_bCodeTimb.ascx.designer.cs">
<DependentUpon>mod_bCodeTimb.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_commAttivita.ascx.cs">
<DependentUpon>mod_commAttivita.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_commAttivita.ascx.designer.cs">
<DependentUpon>mod_commAttivita.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_commAttivitaDesk.ascx.cs">
<DependentUpon>mod_commAttivitaDesk.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_commAttivitaDesk.ascx.designer.cs">
<DependentUpon>mod_commAttivitaDesk.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_commUtLog.ascx.cs">
<DependentUpon>mod_commUtLog.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_commUtLog.ascx.designer.cs">
<DependentUpon>mod_commUtLog.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_commUtMancTimbr.ascx.cs">
<DependentUpon>mod_commUtMancTimbr.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_commUtMancTimbr.ascx.designer.cs">
<DependentUpon>mod_commUtMancTimbr.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_dateTime.ascx.cs">
<DependentUpon>mod_dateTime.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_dateTime.ascx.designer.cs">
<DependentUpon>mod_dateTime.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_dateTimeJQM.ascx.cs">
<DependentUpon>mod_dateTimeJQM.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_dateTimeJQM.ascx.designer.cs">
<DependentUpon>mod_dateTimeJQM.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_dettaglioProgetto.ascx.cs">
<DependentUpon>mod_dettaglioProgetto.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_dettaglioProgetto.ascx.designer.cs">
<DependentUpon>mod_dettaglioProgetto.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_elencoTimbr.ascx.cs">
<DependentUpon>mod_elencoTimbr.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_elencoTimbr.ascx.designer.cs">
<DependentUpon>mod_elencoTimbr.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.cs">
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_enrollByAuthKey.ascx.designer.cs">
<DependentUpon>mod_enrollByAuthKey.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.cs">
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_enrollByEmail.ascx.designer.cs">
<DependentUpon>mod_enrollByEmail.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.cs">
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_enrollByJumperAuthKey.ascx.designer.cs">
<DependentUpon>mod_enrollByJumperAuthKey.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_filtro.ascx.cs">
<DependentUpon>mod_filtro.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_filtro.ascx.designer.cs">
<DependentUpon>mod_filtro.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_footer.ascx.cs">
<DependentUpon>mod_footer.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_footer.ascx.designer.cs">
<DependentUpon>mod_footer.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_login.ascx.cs">
<DependentUpon>mod_login.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_login.ascx.designer.cs">
<DependentUpon>mod_login.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_mancTimb.ascx.cs">
<DependentUpon>mod_mancTimb.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_mancTimb.ascx.designer.cs">
<DependentUpon>mod_mancTimb.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuBottom.ascx.cs">
<DependentUpon>mod_menuBottom.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuBottom.ascx.designer.cs">
<DependentUpon>mod_menuBottom.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuBottomFullBCode.ascx.cs">
<DependentUpon>mod_menuBottomFullBCode.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuBottomFullBCode.ascx.designer.cs">
<DependentUpon>mod_menuBottomFullBCode.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuBottomFullpage.ascx.cs">
<DependentUpon>mod_menuBottomFullpage.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuBottomFullpage.ascx.designer.cs">
<DependentUpon>mod_menuBottomFullpage.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuSx.ascx.cs">
<DependentUpon>mod_menuSx.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuSx.ascx.designer.cs">
<DependentUpon>mod_menuSx.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuTop.ascx.cs">
<DependentUpon>mod_menuTop.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuTop.ascx.designer.cs">
<DependentUpon>mod_menuTop.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_menuTopFull.ascx.cs">
<DependentUpon>mod_menuTopFull.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_menuTopFull.ascx.designer.cs">
<DependentUpon>mod_menuTopFull.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_pageSize.ascx.cs">
<DependentUpon>mod_pageSize.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_pageSize.ascx.designer.cs">
<DependentUpon>mod_pageSize.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_pageTitleAndSearch.ascx.cs">
<DependentUpon>mod_pageTitleAndSearch.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_pageTitleAndSearch.ascx.designer.cs">
<DependentUpon>mod_pageTitleAndSearch.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_periodoAnalisi.ascx.cs">
<DependentUpon>mod_periodoAnalisi.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_periodoAnalisi.ascx.designer.cs">
<DependentUpon>mod_periodoAnalisi.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_progetti.ascx.cs">
<DependentUpon>mod_progetti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_progetti.ascx.designer.cs">
<DependentUpon>mod_progetti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_regNewDevice.ascx.cs">
<DependentUpon>mod_regNewDevice.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_regNewDevice.ascx.designer.cs">
<DependentUpon>mod_regNewDevice.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_reportPrj.ascx.cs">
<DependentUpon>mod_reportPrj.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_reportPrj.ascx.designer.cs">
<DependentUpon>mod_reportPrj.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_reportUtenteAD.ascx.cs">
<DependentUpon>mod_reportUtenteAD.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_reportUtenteAD.ascx.designer.cs">
<DependentUpon>mod_reportUtenteAD.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_resetUserAuthKey.ascx.cs">
<DependentUpon>mod_resetUserAuthKey.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_resetUserAuthKey.ascx.designer.cs">
<DependentUpon>mod_resetUserAuthKey.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_reviewTimbrature.ascx.cs">
<DependentUpon>mod_reviewTimbrature.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_reviewTimbrature.ascx.designer.cs">
<DependentUpon>mod_reviewTimbrature.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_ricercaGenerica.ascx.cs">
<DependentUpon>mod_ricercaGenerica.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_ricercaGenerica.ascx.designer.cs">
<DependentUpon>mod_ricercaGenerica.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_sendAuthToEmail.ascx.cs">
<DependentUpon>mod_sendAuthToEmail.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_sendAuthToEmail.ascx.designer.cs">
<DependentUpon>mod_sendAuthToEmail.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_spostaOre.ascx.cs">
<DependentUpon>mod_spostaOre.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_spostaOre.ascx.designer.cs">
<DependentUpon>mod_spostaOre.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_TagCloudProgetti.ascx.cs">
<DependentUpon>mod_TagCloudProgetti.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_TagCloudProgetti.ascx.designer.cs">
<DependentUpon>mod_TagCloudProgetti.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_timbrature.ascx.cs">
<DependentUpon>mod_timbrature.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_timbrature.ascx.designer.cs">
<DependentUpon>mod_timbrature.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_timbrMensili.ascx.cs">
<DependentUpon>mod_timbrMensili.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_timbrMensili.ascx.designer.cs">
<DependentUpon>mod_timbrMensili.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_title.ascx.cs">
<DependentUpon>mod_title.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_title.ascx.designer.cs">
<DependentUpon>mod_title.ascx</DependentUpon>
</Compile>
<Compile Include="WebUserControls\mod_unauthorized.ascx.cs">
<DependentUpon>mod_unauthorized.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WebUserControls\mod_unauthorized.ascx.designer.cs">
<DependentUpon>mod_unauthorized.ascx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GPW_Data\GPW_Data.csproj">
+157 -1
View File
@@ -4,6 +4,14 @@
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.6.2" />
<httpRuntime targetFramework="4.6.2" />
@@ -13,9 +21,123 @@
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
</controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
</pages>
<customErrors mode="Off" />
<globalization culture="it-IT" enableClientBasedCulture="true" uiCulture="it" />
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
</system.web>
<appSettings>
<!--Conf generale-->
<add key="appName" value="GPW" />
<add key="titleApp" value="GPW" />
<add key="welcomeApp" value="GPW_welcome" />
<add key="SiteName" value="Steamware" />
<!--<add key="mainRev" value="1.8"/>
<add key="minRev" value="375"/>-->
<add key="copyRight" value="SteamWare" />
<add key="CodModulo" value="GPW" />
<add key="_safePages" value="unauthorized.aspx#forceUser.aspx#login#login.aspx#test.aspx#Test.aspx" />
<!--Ottimizzazioni liberie esterne-->
<add key="EnableCdnAjax" value="false" />
<add key="EnableCdnJQ" value="false" />
<!--Gestione forzatura priam timbratura ad entrata-->
<add key="firstIsIN" value="true" />
<!--Gestione notifiche anomalie-->
<add key="adminAnomalieEmail" value="samuele@steamware.net" />
<add key="adminContinuatoEmail" value="samuele@steamware.net" />
<add key="adminOreLavEmail" value="samuele@steamware.net" />
<add key="gg2Chk" value="60" />
<add key="gg2ChkCont" value="30" />
<add key="gg2ChkOreCaricate" value="30" />
<add key="checkAnomTimb" value="true" />
<add key="checkAnomAppr" value="true" />
<add key="checkAnomOreLav" value="true" />
<add key="checkAnomOreLavComm" value="true" />
<add key="checkAnomContinuato" value="true" />
<add key="sendEmailToUser" value="true" />
<add key="firstHour2Check" value="6" />
<add key="enableDailyCheck" value="true" />
<!--Timeout vari-->
<add key="intUpdatePagina_ms" value="120000" />
<add key="intUpdateFooter_ms" value="1000" />
<add key="maxRefreshToReload" value="30" />
<!--Gestione Barcode-->
<add key="secTimeoutBCode" value="8" />
<add key="prefComandi" value="CMD" />
<add key="prefIdx" value="idx" />
<add key="prefMatr" value="matr" />
<add key="prefCF" value="cf" />
<add key="entrata" value="CMDIN" />
<add key="uscita" value="CMDOUT" />
<add key="ipv4StazBCode" value="*" />
<add key="showNameAfterCmd" value="true" />
<!--ricerca autocomplete-->
<add key="maxNumSuggest" value="30" />
<!--Logging-->
<add key="_logDir" value="~/logs/" />
<add key="doShrinkFolder" value="true" />
<add key="_logLevel" value="6" />
<add key="_logMaxMb" value="30" />
<!--Definizione default x registrazione commesse-->
<add key="defRegAttMin" value="60" />
<add key="maxErr" value="30" />
<add key="maxErrMin" value="-30" />
<add key="maxErrPlus" value="91" />
<!--default visualizzazione timbrature-->
<add key="reviewShowCN" value="true" />
<add key="reviewShowOreMin" value="false" />
<add key="reviewShowStraord" value="true" />
<!--gestione warning x calcolo real/budget-->
<add key="warningRatioPerc" value="80" />
<!--Definizione URL e rete locale-->
<add key="localNet" value="10.74.82" />
<add key="dhcpLeaseTime" value="15" />
<!--Conf x grafici a barre-->
<add key="maxBarplotLargh" value="1000" />
<!--Conf attivazione funzionalità opzionali-->
<add key="barcodeAutoApprove" value="true" />
<add key="regAttEnabled" value="true" />
<!--Gestione selettore periodo-->
<add key="defDayFrom" value="-30" />
<add key="mostraSelOra" value="false" />
<!--Timbratrice x Zucchetti-->
<add key="codTimbra" value="90" />
<!--Gestione email-->
<add key="_fromEmail" value="GPW@steamware.net" />
<!--<add key="_smtpCli" value="keyhammer.ath.cx" />-->
<add key="_smtpCli" value="10.74.82.254" />
<add key="_emailUser" value="" />
<add key="_emailPwd" value="" />
<add key="_enableSSL" value="false" />
<!--gestione tac cloud-->
<add key="TagCloudMode" value="elenco" />
<!--Gestione auth dispositivi mobile-->
<add key="authKey" value="keyhammer" />
<add key="baseUrl" value="http://iis02/GPW/" />
<add key="baseWebUrl" value="http://keyhammer.ath.cx:8083/GPW/" />
<!--Gestione SSRS-->
<add key="reportBaseUrl" value="http://sql-steam/ReportServer?/Steamware/" />
<!--<add key="reportBaseUrl" value="http://sql-steam/Reports/Pages/Report.aspx?ItemPath=/Steamware/" />-->
<!--Conf db classi esterne-->
<!--<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=ETS_GPW;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
<add key="UtenteCdcConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=ETS_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
<add key="VocabolarioConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW_vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer"/>
<add key="GPWConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=ETS_GPW;Persist Security Info=True;User ID=sa;Password=keyhammer"/>-->
<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="UtenteCdcConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=Steamware_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="VocabolarioConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW_vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="GPWConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" />
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<connectionStrings>
<!--<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=ETS_GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>-->
<add name="GPW_data.Properties.Settings.GPWConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=GPW;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -38,4 +160,38 @@
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
</system.webServer><elmah>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on remote access and securing ELMAH.
-->
<security allowRemoteAccess="false" />
</elmah><location path="elmah.axd" inheritInChildApplications="false">
<system.web>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
<!--
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
more information on using ASP.NET authorization securing ELMAH.
<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
-->
</system.web>
<system.webServer>
<handlers>
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</handlers>
</system.webServer>
</location>
</configuration>
+114
View File
@@ -0,0 +1,114 @@
<%@ Master Language="C#" AutoEventWireup="True" Inherits="AjaxSearch" CodeBehind="AjaxSearch.master.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../WebUserControls/mod_menuTop.ascx" TagName="mod_menuTop" TagPrefix="uc1" %>
<%@ Register Src="../WebUserControls/mod_menuSx.ascx" TagName="mod_menuSx" TagPrefix="uc2" %>
<%@ Register Src="../WebUserControls/mod_pageTitleAndSearch.ascx" TagName="mod_pageTitleAndSearch" TagPrefix="uc3" %>
<%@ Register Src="../WebUserControls/mod_ricercaGenerica.ascx" TagName="mod_ricercaGenerica" TagPrefix="uc4" %>
<%@ Register Src="../WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom" TagPrefix="uc5" %>
<%@ Register Src="../WebUserControls/mod_pageSize.ascx" TagName="mod_pageSize" TagPrefix="uc6" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>GPWS</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<%--link CDN--%>
<%--<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/jquery-ui.min.js"></script>--%>
<%--link librerie locali--%>
<script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
<link href="../Content/themes/Steamware/css/steamware/jquery-ui-1.12.1.custom.min.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("span.radioBtn input").checkboxradio({ icon: false });
$("#accordion").accordion({
heightStyle: "content"
});
// oggetto da legare all'update parziale ajax x sistemare btns & co
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind your jQuery events here
$("span.radioBtn input").checkboxradio({ icon: false });
$("#accordion").accordion({
heightStyle: "content"
});
});
});
</script>
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true"
EnableScriptLocalization="true" EnableCdn="false">
</asp:ToolkitScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"
EnableCdn="false">
</asp:ScriptManager>
<div class="fullscreen">
<table class="formatTableGeneral" id="tblFormat" cellspacing="0" cellpadding="0">
<tr>
<td class="topMenu" colspan="2">
<div>
<asp:UpdatePanel ID="upTop" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<uc1:mod_menuTop ID="Mod_menuTop1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td class="menuSx">
<asp:UpdatePanel ID="upSx" runat="server" UpdateMode="Always" RenderMode="Inline">
<ContentTemplate>
<uc2:mod_menuSx ID="Mod_menuSx1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td class="bodyMain">
<div>
<asp:UpdatePanel ID="upPagina" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="boxShadowDark">
<table class="tableContenuto" cellpadding="0" cellspacing="0">
<tr class="topContrDx">
<td style="width: 25%;" valign="baseline">
<uc3:mod_pageTitleAndSearch ID="Mod_pageTitleAndSearch1" runat="server" />
</td>
<td style="width: 75%; text-align: left;">
<div class="divSx">
<uc4:mod_ricercaGenerica ID="Mod_ricercaGenerica1" runat="server" />
</div>
<div class="divDx">
<uc6:mod_pageSize ID="mod_pageSize1" runat="server" />
</div>
</td>
</tr>
<tr>
<td colspan="2" class="contrRiq">
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="bottomWrite">
<uc5:mod_menuBottom ID="Mod_menuBottom1" runat="server" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+60
View File
@@ -0,0 +1,60 @@
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;
public partial class AjaxSearch : System.Web.UI.MasterPage
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Mod_menuTop1.eh_toggleMenuSx += new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu += new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
mod_pageSize1.eh_nuovaSize += new EventHandler(mod_pageSize1_eh_nuovaSize);
}
void mod_pageSize1_eh_nuovaSize(object sender, EventArgs e)
{
Uri MyUrl = Request.Url;
string delimStr = "/";
char[] delimiter = delimStr.ToCharArray();
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
int n = finalUrl.Length;
string _paginaCorrente = finalUrl[n - 1].ToString();
Response.Redirect(_paginaCorrente);
}
void Mod_menuTop1_eh_reqUpdateMenu(object sender, EventArgs e)
{
// chiamo update del menu sx...
Mod_menuSx1.forzaUpdateMenu();
}
void Mod_menuTop1_eh_toggleMenuSx(object sender, EventArgs e)
{
// cambio stato visualizzaizone menù laterale...
Mod_menuSx1.Visible = !Mod_menuSx1.Visible;
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
// svuoto tutti gli event handler inseriti...
Mod_menuTop1.eh_toggleMenuSx -= new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu -= new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
}
}
+130
View File
@@ -0,0 +1,130 @@
//------------------------------------------------------------------------------
// <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 AjaxSearch {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// upTop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upTop;
/// <summary>
/// Mod_menuTop1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuTop Mod_menuTop1;
/// <summary>
/// upSx control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upSx;
/// <summary>
/// Mod_menuSx1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuSx Mod_menuSx1;
/// <summary>
/// upPagina control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upPagina;
/// <summary>
/// Mod_pageTitleAndSearch1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_pageTitleAndSearch Mod_pageTitleAndSearch1;
/// <summary>
/// Mod_ricercaGenerica1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_ricercaGenerica Mod_ricercaGenerica1;
/// <summary>
/// mod_pageSize1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_pageSize mod_pageSize1;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// Mod_menuBottom1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuBottom Mod_menuBottom1;
}
+39
View File
@@ -0,0 +1,39 @@
<%@ Master Language="C#" AutoEventWireup="True" Inherits="AjaxSimple" CodeBehind="AjaxSimple.master.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Simplepage</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ScriptManager>--%>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn="false">
</asp:ScriptManager>
<div class="fullscreen">
<table class="formatTableGeneral" id="tblFormat" cellspacing="0" cellpadding="0">
<tr>
<td class="bodyMain">
<div>
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</div>
</td>
</tr>
<tr>
<td class="bottomWrite">
<uc1:mod_menuBottom ID="Mod_menuBottom1" runat="server" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
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 AjaxSimple : System.Web.UI.MasterPage
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
}
+49
View File
@@ -0,0 +1,49 @@
//------------------------------------------------------------------------------
// <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 AjaxSimple {
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// Mod_menuBottom1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuBottom Mod_menuBottom1;
}
+73
View File
@@ -0,0 +1,73 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="AjaxSimpleFull.master.cs" Inherits="GPW.WebMasterPages.AjaxSimpleFull" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../WebUserControls/mod_menuBottomFullpage.ascx" TagName="mod_menuBottomFullpage" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head id="Head1" runat="server">
<title>GPW</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<%--link CDN--%>
<%--<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/jquery-ui.min.js"></script>--%>
<%--link librerie locali--%>
<script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
<link href="../Content/Style.min.css" rel="stylesheet" type="text/css" />
<!--<link href="../Content/themes/Steamware/css/steamware/jquery-ui-1.12.1.custom.min.css" rel="stylesheet" type="text/css" />-->
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
// oggetto da legare all'update parziale ajax x sistemare btns & co
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind your jQuery events here
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
});
});
</script>
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true"
EnableScriptLocalization="true" EnableCdn="false">
</asp:ToolkitScriptManager>--%>
<%--<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"
EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"
EnableCdn="false">
</asp:ScriptManager>
<div class="fullscreen">
<div class="clearDiv">
<asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="clearDiv bottomWrite">
<asp:UpdatePanel ID="upBott" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<uc1:mod_menuBottomFullpage ID="mod_menuBottomFullpage1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</form>
</body>
</html>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class AjaxSimpleFull : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
}
}
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class AjaxSimpleFull {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// upMain control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upMain;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// upBott control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upBott;
/// <summary>
/// mod_menuBottomFullpage1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_menuBottomFullpage mod_menuBottomFullpage1;
}
}
@@ -0,0 +1,97 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="AjaxSimpleFullBCode.master.cs" Inherits="GPW.WebMasterPages.AjaxSimpleFullBCode" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../WebUserControls/mod_menuBottomFullBCode.ascx" tagname="mod_menuBottomFullBCode" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head id="Head1" runat="server">
<title>GPW</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<%--link CDN--%>
<%--<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/jquery-ui.min.js"></script>--%>
<%--link librerie locali--%>
<script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
<link href="../Content/themes/Steamware/css/steamware/jquery-ui-1.12.1.custom.min.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
// oggetto da legare all'update parziale ajax x sistemare btns & co
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind your jQuery events here
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
});
});
</script>
<%--<script type="text/javascript">
$(document).ready(function () {
// Create two variable with the names of the months and days in an array
var monthNames = ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"];
var dayNames = ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
// Create a newDate() object
var newDate = new Date();
// Extract the current date from Date object
newDate.setDate(newDate.getDate());
// Output the day, date, month and year
$('#Date').html(dayNames[newDate.getDay()] + " " + newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear());
setInterval(function () {
// Create a newDate() object and extract the seconds of the current time on the visitor's
var currDate = new Date();
var seconds = currDate.getSeconds();
var minutes = currDate.getMinutes();
var hours = currDate.getHours();
// Add a leading zero to seconds value
$("#sec").html((seconds < 10 ? "0" : "") + seconds);
$("#min").html((minutes < 10 ? "0" : "") + minutes);
$("#hours").html((hours < 10 ? "0" : "") + hours);
$('#Date').html(dayNames[currDate.getDay()] + " " + currDate.getDate() + ' ' + monthNames[currDate.getMonth()] + ' ' + currDate.getFullYear());
}, 500);
});
</script>--%>
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true"
EnableScriptLocalization="true" EnableCdn="false">
</asp:ToolkitScriptManager>--%>
<%--<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"
EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableScriptLocalization="true"
EnableCdn="false">
</asp:ScriptManager>
<div class="fullscreen">
<asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
<div class="bottomWrite">
<asp:UpdatePanel ID="upBott" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<uc1:mod_menuBottomFullBCode ID="mod_menuBottomFullBCode1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</form>
</body>
</html>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class AjaxSimpleFullBCode : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
}
}
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class AjaxSimpleFullBCode {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// upMain control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upMain;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// upBott control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upBott;
/// <summary>
/// mod_menuBottomFullBCode1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_menuBottomFullBCode mod_menuBottomFullBCode1;
}
}
+112
View File
@@ -0,0 +1,112 @@
<%@ Master Language="C#" AutoEventWireup="True" Inherits="AjaxTitle" CodeBehind="AjaxTitle.master.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../WebUserControls/mod_menuTop.ascx" TagName="mod_menuTop" TagPrefix="uc1" %>
<%@ Register Src="../WebUserControls/mod_menuSx.ascx" TagName="mod_menuSx" TagPrefix="uc2" %>
<%@ Register Src="../WebUserControls/mod_pageTitleAndSearch.ascx" TagName="mod_pageTitleAndSearch" TagPrefix="uc3" %>
<%@ Register Src="../WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom" TagPrefix="uc5" %>
<%@ Register Src="../WebUserControls/mod_pageSize.ascx" TagName="mod_pageSize" TagPrefix="uc6" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>GPW</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<%--link CDN--%>
<%--<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.0/jquery-ui.min.js"></script>--%>
<%--link librerie locali--%>
<script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
<link href="../Content/themes/Steamware/css/steamware/jquery-ui-1.12.1.custom.min.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
// oggetto da legare all'update parziale ajax x sistemare btns & co
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
// re-bind your jQuery events here
$("span.radioBtn input").checkboxradio({ icon: false });
$(".JQbutton").button();
$("#accordion").accordion({
heightStyle: "content"
});
});
});
</script>
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ToolkitScriptManager>--%>
<%--<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn="false">
</asp:ScriptManager>
<div class="fullscreen">
<table class="formatTableGeneral" id="tblFormat" cellspacing="0" cellpadding="0">
<tr>
<td class="topMenu" colspan="2">
<div>
<asp:UpdatePanel ID="upTop" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<uc1:mod_menuTop ID="Mod_menuTop1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td class="menuSx">
<asp:UpdatePanel ID="upSx" runat="server" UpdateMode="Always" RenderMode="Inline">
<ContentTemplate>
<uc2:mod_menuSx ID="Mod_menuSx1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td class="bodyMain">
<div>
<asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="boxShadowDark">
<table class="tableContenuto" cellpadding="0" cellspacing="0">
<tr class="topContrDx">
<td style="width: 25%;" valign="baseline">
<uc3:mod_pageTitleAndSearch ID="Mod_pageTitleAndSearch1" runat="server" />
</td>
<td style="width: 75%; text-align: left;">
<div class="divDx">
<uc6:mod_pageSize ID="mod_pageSize1" runat="server" />
</div>
</td>
</tr>
<tr>
<td colspan="2" class="contrRiq">
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="bottomWrite">
<uc5:mod_menuBottom ID="Mod_menuBottom1" runat="server" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+49
View File
@@ -0,0 +1,49 @@
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 AjaxTitle : System.Web.UI.MasterPage
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Mod_menuTop1.eh_toggleMenuSx += new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu += new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
}
void Mod_menuTop1_eh_reqUpdateMenu(object sender, EventArgs e)
{
// chiamo update del menu sx...
Mod_menuSx1.forzaUpdateMenu();
}
void Mod_menuTop1_eh_toggleMenuSx(object sender, EventArgs e)
{
// cambio stato visualizzaizone menù laterale...
Mod_menuSx1.Visible = !Mod_menuSx1.Visible;
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
// svuoto tutti gli event handler inseriti...
Mod_menuTop1.eh_toggleMenuSx -= new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu -= new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
}
}
+121
View File
@@ -0,0 +1,121 @@
//------------------------------------------------------------------------------
// <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 AjaxTitle {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// upTop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upTop;
/// <summary>
/// Mod_menuTop1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuTop Mod_menuTop1;
/// <summary>
/// upSx control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upSx;
/// <summary>
/// Mod_menuSx1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuSx Mod_menuSx1;
/// <summary>
/// upMain control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upMain;
/// <summary>
/// Mod_pageTitleAndSearch1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_pageTitleAndSearch Mod_pageTitleAndSearch1;
/// <summary>
/// mod_pageSize1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_pageSize mod_pageSize1;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// Mod_menuBottom1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuBottom Mod_menuBottom1;
}
+70
View File
@@ -0,0 +1,70 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="JQMob.master.cs" Inherits="WebSCR.JQMob" %>
<%@ Register Src="~/WebUserControls/mod_footer.ascx" TagPrefix="uc1" TagName="mod_footer" %>
<%@ Register Src="~/WebUserControls/mod_header.ascx" TagPrefix="uc2" TagName="mod_header" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="WebSCR site" />
<meta name="author" content="Steamware" />
<link rel="shortcut icon" href="~/favicon.ico" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title><%: Page.Title %> - WebSCR</title>
<asp:PlaceHolder ID="PlaceHolder1" runat="server">
<%: Scripts.Render("~/bundles/jquery") %>
<%: Scripts.Render("~/bundles/jSteamware") %>
<%: Scripts.Render("~/bundles/jquerymobile") %>
</asp:PlaceHolder>
<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/themes/base/css" />
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<%--aggiunto 2014.10.15 x inserire report inline...--%>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<%--<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
</Scripts>
</asp:ScriptManager>--%>
<div id="textWrapper">
<div data-role="page" class="ui-responsive-panel" data-url="<%= Request.Url.PathAndQuery %>">
<div data-role="header" data-position="fixed" data-theme="a">
<uc2:mod_header runat="server" ID="mod_header" />
</div>
<div role="main" class="ui-content" style="padding: 0px;">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div data-role="footer" data-position="fixed" data-theme="a">
<uc1:mod_footer runat="server" ID="mod_footer" />
</div>
</div>
</div>
</form>
</body>
</html>
+39
View File
@@ -0,0 +1,39 @@
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.WebMasterPages
{
public partial class JQMob : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
#if false
// verifica auth utente...
if (Page.User.Identity.IsAuthenticated || user_std.UtSn.isAuth || (memLayer.ML.confReadBool("AutoAuth") && Request.Url.LocalPath.Split('/').Last() != "Unauth"))
{
mod_footer.Visible = true;
}
else
{
mod_footer.Visible = false;
}
#endif
}
/// <summary>
/// restituisce stato active se pagina corrente...
/// </summary>
/// <param name="nomeElem"></param>
/// <returns></returns>
public string liClass(object nomeElem)
{
string answ = "";
if (Request.Url.ToString().Contains(nomeElem.ToString())) answ = "ui-btn-active";
return answ;
}
}
}
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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 WebSCR {
public partial class JQMob {
/// <summary>
/// PlaceHolder1 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.PlaceHolder PlaceHolder1;
/// <summary>
/// head 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.ContentPlaceHolder head;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// mod_header control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UserControl mod_header;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
/// <summary>
/// mod_footer control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_footer mod_footer;
}
}
+69
View File
@@ -0,0 +1,69 @@
<%@ Master Language="C#" AutoEventWireup="True" Inherits="MasterAjax" CodeBehind="MasterAjax.master.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="../WebUserControls/mod_menuTop.ascx" TagName="mod_menuTop" TagPrefix="uc1" %>
<%@ Register Src="../WebUserControls/mod_menuSx.ascx" TagName="mod_menuSx" TagPrefix="uc2" %>
<%@ Register Src="../WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom"
TagPrefix="uc5" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<head id="Head1" runat="server">
<title></title>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="~/images/favicon.png" type="image/png" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<%--link librerie locali--%>
<script src="../Scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-1.12.1.min.js" type="text/javascript"></script>
<link href="../Content/themes/Steamware/css/steamware/jquery-ui-1.12.1.custom.min.css" rel="stylesheet" type="text/css" />
</head>
<body class="body">
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true"
EnableCdn="true">
</asp:ToolkitScriptManager>--%>
<%--<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn="true"></asp:ScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn="false"></asp:ScriptManager>
<div class="fullscreen">
<table class="formatTableGeneral" id="tblFormat" cellspacing="0" cellpadding="0">
<tr>
<td class="topMenu" colspan="2">
<div>
<asp:UpdatePanel ID="upTop" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<uc1:mod_menuTop ID="Mod_menuTop1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td class="menuSx">
<asp:UpdatePanel ID="upSx" runat="server" UpdateMode="Always" RenderMode="Inline">
<ContentTemplate>
<uc2:mod_menuSx ID="Mod_menuSx1" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td class="bodyMain">
<div>
<asp:UpdatePanel ID="updPanelPagina" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:ContentPlaceHolder ID="cph1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="bottomWrite">
<uc5:mod_menuBottom ID="Mod_menuBottom1" runat="server" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
+49
View File
@@ -0,0 +1,49 @@
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 MasterAjax : System.Web.UI.MasterPage
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Page.Title = SteamWare.memLayer.ML.confReadString("_titoloPagina");
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Mod_menuTop1.eh_toggleMenuSx += new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu += new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
}
void Mod_menuTop1_eh_reqUpdateMenu(object sender, EventArgs e)
{
// chiamo update del menu sx...
Mod_menuSx1.forzaUpdateMenu();
}
void Mod_menuTop1_eh_toggleMenuSx(object sender, EventArgs e)
{
// cambio stato visualizzaizone menù laterale...
Mod_menuSx1.Visible = !Mod_menuSx1.Visible;
}
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
// svuoto tutti gli event handler inseriti...
Mod_menuTop1.eh_toggleMenuSx -= new EventHandler(Mod_menuTop1_eh_toggleMenuSx);
Mod_menuTop1.eh_reqUpdateMenu -= new EventHandler(Mod_menuTop1_eh_reqUpdateMenu);
}
}
+103
View File
@@ -0,0 +1,103 @@
//------------------------------------------------------------------------------
// <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 MasterAjax {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// upTop control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upTop;
/// <summary>
/// Mod_menuTop1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuTop Mod_menuTop1;
/// <summary>
/// upSx control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel upSx;
/// <summary>
/// Mod_menuSx1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuSx Mod_menuSx1;
/// <summary>
/// updPanelPagina control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel updPanelPagina;
/// <summary>
/// cph1 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.ContentPlaceHolder cph1;
/// <summary>
/// Mod_menuBottom1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_menuBottom Mod_menuBottom1;
}
+57
View File
@@ -0,0 +1,57 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="jQueryMobile.master.cs" Inherits="GPW.WebMasterPages.jQueryMobile" %>
<%@ Register Src="~/WebUserControls/mod_title.ascx" TagName="mod_title" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_footer.ascx" TagName="mod_footer" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="it">
<head id="Head1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
<%
if (GPW.utility.EnableCdnJQ)
{
%>
<%--link CDN--%>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<% }
else
{%>
<%--link librerie locali--%>
<link rel="stylesheet" type="text/css" href="../Content/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="../Scripts/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery.mobile-1.4.5.min.js"></script>
<%} %>
<%--<script type="text/javascript">
navigator.geolocation.getCurrentPosition(getLocation, unknownLocation);
function getLocation(pos) {
var latitde = pos.coords.latitude;
var longitude = pos.coords.longitude;
alert('Your current coordinates (latitide,longitude) are : ' + latitde + ', ' + longitude);
}
function unknownLocation() {
alert('Could not find location');
}
</script>--%>
</head>
<body>
<form id="form1" runat="server">
<div data-role="page">
<div data-role="header" data-position="fixed">
<uc1:mod_title ID="mod_title1" runat="server" />
</div>
<div data-role="content" style="margin: -10px;">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div data-role="footer" data-position="fixed">
<uc2:mod_footer ID="mod_footer1" runat="server" />
</div>
</div>
</form>
</body>
</html>
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class jQueryMobile : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
+69
View File
@@ -0,0 +1,69 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class jQueryMobile {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// TitleContent 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.ContentPlaceHolder TitleContent;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// mod_title1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_title mod_title1;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
/// <summary>
/// mod_footer1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_footer mod_footer1;
}
}
@@ -0,0 +1,51 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="jQueryMobileAjaxBodyOnly.master.cs" Inherits="GPW.WebMasterPages.jQueryMobileAjaxBodyOnly" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
<%
if (GPW.utility.EnableCdnJQ)
{
%>
<%--link CDN--%>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<% }
else
{%>
<%--link librerie locali--%>
<link rel="stylesheet" type="text/css" href="../Content/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="../Scripts/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery.mobile-1.4.5.min.js"></script>
<%} %>
<%--<script type="text/javascript">
navigator.geolocation.getCurrentPosition(getLocation, unknownLocation);
function getLocation(pos) {
var latitde = pos.coords.latitude;
var longitude = pos.coords.longitude;
alert('Your current coordinates (latitide,longitude) are : ' + latitde + ', ' + longitude);
}
function unknownLocation() {
alert('Could not find location');
}
</script>--%>
</head>
<body>
<form id="form1" runat="server">
<%--<asp:ToolkitScriptManager ID="tsm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ToolkitScriptManager>--%>
<asp:ScriptManager ID="sm" runat="server" EnablePartialRendering="true" EnableScriptGlobalization="true" EnableCdn='<%# GPW.utility.EnableCdnAjax %>'>
</asp:ScriptManager>
<div class="fullscreen">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class jQueryMobileAjaxBodyOnly : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class jQueryMobileAjaxBodyOnly {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// TitleContent 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.ContentPlaceHolder TitleContent;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
}
}
@@ -0,0 +1,45 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="jQueryMobileBodyOnly.master.cs" Inherits="GPW.WebMasterPages.jQueryMobileBodyOnly" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
<%
if (GPW.utility.EnableCdnJQ)
{
%>
<%--link CDN--%>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<% }
else
{%>
<%--link librerie locali--%>
<link rel="stylesheet" type="text/css" href="../Content/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="../Scripts/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery.mobile-1.4.5.min.js"></script>
<%} %>
<%--<script type="text/javascript">
navigator.geolocation.getCurrentPosition(getLocation, unknownLocation);
function getLocation(pos) {
var latitde = pos.coords.latitude;
var longitude = pos.coords.longitude;
alert('Your current coordinates (latitide,longitude) are : ' + latitde + ', ' + longitude);
}
function unknownLocation() {
alert('Could not find location');
}
</script>--%>
</head>
<body>
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class jQueryMobileBodyOnly : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class jQueryMobileBodyOnly {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// TitleContent 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.ContentPlaceHolder TitleContent;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
}
}
@@ -0,0 +1,46 @@
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="jQueryMobileNoCookie.master.cs"
Inherits="GPW.WebMasterPages.jQueryMobileNoCookie" %>
<%@ Register Src="../WebUserControls/mod_footer.ascx" TagName="mod_footer" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
<%
if (GPW.utility.EnableCdnJQ)
{
%>
<%--link CDN--%>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link type="text/css" rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<% }
else
{%>
<%--link librerie locali--%>
<link rel="stylesheet" type="text/css" href="../Content/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="../Scripts/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery.mobile-1.4.5.min.js"></script>
<%} %>
</head>
<body>
<form id="form1" runat="server">
<div data-role="page">
<div data-role="header" data-position="fixed">
<h1>
Registrazione Device
</h1>
</div>
<div data-role="content">
<asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
</div>
<div data-role="footer" class="ui-bar" data-position="fixed">
<uc1:mod_footer ID="mod_footer1" runat="server" />
</div>
</div>
</form>
</body>
</html>
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebMasterPages
{
public partial class jQueryMobileNoCookie : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <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.WebMasterPages {
public partial class jQueryMobileNoCookie {
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// TitleContent 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.ContentPlaceHolder TitleContent;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// MainContent 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.ContentPlaceHolder MainContent;
/// <summary>
/// mod_footer1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_footer mod_footer1;
}
}
@@ -0,0 +1,74 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_TagCloudProgetti.ascx.cs" Inherits="GPW.WebUserControls.mod_TagCloudProgetti" %>
<div style="text-align: center; margin: auto; font-size: 9pt;">
<asp:RadioButtonList ID="rblOre" runat="server" CssClass="radioBtn" RepeatLayout="Flow" RepeatDirection="Horizontal"
RepeatColumns="8" AutoPostBack="true" OnSelectedIndexChanged="rblOre_SelectedIndexChanged">
<asp:ListItem Text="ult." Value="0"></asp:ListItem>
<asp:ListItem Text="15'" Value="15"></asp:ListItem>
<asp:ListItem Text="30'" Value="30"></asp:ListItem>
<asp:ListItem Text="1 h" Value="60" Selected="True"></asp:ListItem>
<asp:ListItem Text="2 h" Value="120"></asp:ListItem>
<asp:ListItem Text="3 h" Value="180"></asp:ListItem>
<asp:ListItem Text="4 h" Value="240"></asp:ListItem>
<asp:ListItem Text="8 h" Value="480"></asp:ListItem>
</asp:RadioButtonList>
</div>
<div id="tagCloud">
<asp:Repeater ID="repTagCloud" runat="server" DataSourceID="ods">
<ItemTemplate>
<%--Modo standard: tag cloud--%>
<span id="Standard" runat="server" visible='<%# modo == GPW.WebUserControls.TagCloudMode.standard %>'>
<asp:LinkButton runat="server" ID="lnkTag" CssClass='<%# tagClass(Eval("freq")) %>' ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") %>' OnClick="lnkTag_Click">
<%# Eval("nomeProj") %>
</asp:LinkButton>
</span>
<%--Modo piramide--%>
<span id="Piramide" runat="server" visible='<%# modo == GPW.WebUserControls.TagCloudMode.piramide %>'>
<asp:LinkButton runat="server" ID="LinkButton1" ToolTip='<%# Eval("nomeProj") %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" CssClass='<%# tagClassPiram(Eval("RowNum")) %>'>
<%# "[" + Eval("nomeComm") + "] " + Eval("nomeFase") %>
</asp:LinkButton>
</span>
<%--Modo elenco--%>
<div id="Elenco" runat="server" visible='<%# modo == GPW.WebUserControls.TagCloudMode.elenco %>'>
<asp:LinkButton runat="server" ID="LinkButton2" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") + " | " + Eval("freq","{0:P1}") %>'>
<%# Eval("RowNum","{0:00}") + ") " + Eval("nomeProj").ToString().ToUpper() + " | " + Eval("nomeComm") + " | " + Eval("nomeFase") %>
</asp:LinkButton>
</div>
<%--Modo elencoCPF--%>
<div id="ElencoCPF" runat="server" visible='<%# modo == GPW.WebUserControls.TagCloudMode.elencoCPF %>'>
<asp:LinkButton runat="server" ID="LinkButton3" CssClass='<%# tagClassElenco(Eval("RowNum")) %>' CommandArgument='<%# Eval("idxFase") %>' OnClick="lnkTag_Click" ToolTip='<%# Eval("nomeComm") + " | " + Eval("nomeFase") + " | " + Eval("Qty","{0:N1} h") %>'>
<%# Eval("RowNum","{0:00}") + ") " + Eval("nomeComm") + " | " + Eval("nomeProj") + " | " + Eval("nomeFase") %>
</asp:LinkButton>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
<div>
<div class="divSx" style="font-size: 0.7em;">
<asp:DropDownList runat="server" ID="ddlModoTag" AutoPostBack="true" OnSelectedIndexChanged="ddlModoTag_SelectedIndexChanged">
<asp:ListItem Selected="True">elenco</asp:ListItem>
<asp:ListItem>elencoCPF</asp:ListItem>
<asp:ListItem>piramide</asp:ListItem>
<asp:ListItem>standard</asp:ListItem>
</asp:DropDownList>
</div>
<div class="divDx" style="font-size: 0.7em;">
<asp:DropDownList runat="server" ID="ddlPageSize" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<asp:ListItem>5</asp:ListItem>
<asp:ListItem Selected="True">10</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
<asp:ListItem>20</asp:ListItem>
<asp:ListItem>25</asp:ListItem>
<asp:ListItem>30</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="clearDiv"></div>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.freqProgettiTableAdapter">
<SelectParameters>
<asp:SessionParameter Name="idxDipendente" SessionField="idxDipCurr" Type="Int32" />
<asp:SessionParameter DefaultValue="" Name="inizio" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter Name="fine" SessionField="_fine" Type="DateTime" />
<%--<asp:Parameter DefaultValue="20" Name="maxRes" Type="Int32" />--%>
<asp:ControlParameter ControlID="ddlPageSize" PropertyName="SelectedValue" Name="maxRes" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
@@ -0,0 +1,282 @@
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_TagCloudProgetti : System.Web.UI.UserControl
{
/// <summary>
/// evento selezione valore tag
/// </summary>
public event EventHandler eh_newVal;
/// <summary>
/// evento refresh numero items
/// </summary>
public event EventHandler eh_refresh;
/// <summary>
/// data di riferimento per controllo
/// </summary>
public DateTime dataRif {
get
{
return Convert.ToDateTime(memLayer.ML.StringSessionObj("dataRifTC"));
}
set
{
memLayer.ML.setSessionVal("dataRifTC",value);
}
}
/// <summary>
/// load pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
// se vuoto lo imposto...
if (!memLayer.ML.isInSessionObject("TagCloudMode"))
{
modo = TagCloudMode.standard;
}
}
}
/// <summary>
/// calcola calsse css data freq ripetizione
/// </summary>
/// <param name="freq"></param>
/// <returns></returns>
public string tagClass(object _freq)
{
string answ = "";
double freq = Convert.ToDouble(_freq);
if (freq > 0.25)
{
answ = "w1";
}
else if (freq > 0.16)
{
answ = "w2";
}
else if (freq > 0.1)
{
answ = "w3";
}
else if (freq > 0.05)
{
answ = "w4";
}
else
{
answ = "w5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in elenco
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassElenco(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz <= 1)
{
answ = "e1";
}
else if (posiz <= 3)
{
answ = "e2";
}
else if (posiz <= 6)
{
answ = "e3";
}
else if (posiz <= 10)
{
answ = "e4";
}
else
{
answ = "e5";
}
return answ;
}
/// <summary>
/// calcola calsse css data posizione in piramide
/// </summary>
/// <param name="posiz"></param>
/// <returns></returns>
public string tagClassPiram(object _posiz)
{
string answ = "";
int posiz = Convert.ToInt32(_posiz);
if (posiz == 1)
{
answ = "p1";
}
else if (posiz <= 3)
{
answ = "p2";
}
else if (posiz <= 6)
{
answ = "p3";
}
else if (posiz <= 10)
{
answ = "p4";
}
else if (posiz <= 15)
{
answ = "p5";
}
else if (posiz <= 21)
{
answ = "p6";
}
else
{
answ = "p7";
}
return answ;
}
/// <summary>
/// crea una nuova attività dal tag indicato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkTag_Click(object sender, EventArgs e)
{
// variabili!
int idxDipCurr = memLayer.ML.IntSessionObj("idxDipCurr");
// inizia con dataRif = 8 del mattino
DateTime inizio = dataRif.Date.AddHours(8);
int idxFase = 0;
// leggo valore fase
LinkButton lbtn = (LinkButton)sender;
try
{
idxFase = Convert.ToInt32(lbtn.CommandArgument);
}
catch
{ }
// chiamo clona!
int minuti = 0;
try
{
minuti = Convert.ToInt32(rblOre.SelectedValue);
}
catch
{ }
DataProxy.DP.taRA.clonaLastRA_byFaseUtente(idxDipCurr, inizio, idxFase, minuti);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// evento selezione nuovo valore durata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void rblOre_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo il valore scelto
memLayer.ML.setSessionVal("stdMinDurata", rblOre.SelectedValue);
repTagCloud.DataBind();
// riporto evento!
if (eh_newVal != null)
{
eh_newVal(this, new EventArgs());
}
}
/// <summary>
/// chiamata aggiornamento controllo
/// </summary>
public void doUpdate()
{
repTagCloud.DataBind();
}
public TagCloudMode modo
{
get
{
return (TagCloudMode)memLayer.ML.objSessionObj("TagCloudMode");
}
set
{
memLayer.ML.setSessionVal("TagCloudMode", value);
}
}
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
// riporto evento!
if (eh_refresh!= null)
{
eh_refresh(this, new EventArgs());
}
}
protected void ddlModoTag_SelectedIndexChanged(object sender, EventArgs e)
{
// cambio modo!
switch (ddlModoTag.SelectedValue)
{
case "elenco":
modo = TagCloudMode.elenco;
break;
case "elencoCPF":
modo = TagCloudMode.elencoCPF;
break;
case "piramide":
modo = TagCloudMode.piramide;
break;
case "standard":
modo = TagCloudMode.standard;
break;
default:
break;
}
repTagCloud.DataBind();
// riporto evento!
if (eh_refresh != null)
{
eh_refresh(this, new EventArgs());
}
}
}
public enum TagCloudMode
{
/// <summary>
/// modalità elenco (con codice colore) standard (Progetto-Fase-Sottofase)
/// </summary>
elenco,
/// <summary>
/// modalità elenco Commessa-Progetto-Fase (con codice colore)
/// </summary>
elencoCPF,
/// <summary>
/// modalità piramide 1 | 2-2 | 3-3-3 | 4-4-4-4 | ...
/// </summary>
piramide,
/// <summary>
/// modalità normale
/// </summary>
standard
}
}
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <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_TagCloudProgetti {
/// <summary>
/// rblOre 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 rblOre;
/// <summary>
/// repTagCloud 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 repTagCloud;
/// <summary>
/// ddlModoTag 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 ddlModoTag;
/// <summary>
/// ddlPageSize 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 ddlPageSize;
/// <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;
}
}
+227
View File
@@ -0,0 +1,227 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminClienti.ascx.cs" Inherits="GPW.WebUserControls.mod_adminClienti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="true" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxCliente" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="grView_DataBound">
<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" />
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>'
ImageUrl="../images/view_s.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="../images/edit_s.png" />
</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="btnReset_Click"
ImageUrl="../images/reload_l.png" Visible="true" ImageAlign="AbsBottom" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="RagSociale" SortExpression="RagSociale">
<ItemTemplate>
<asp:Label ID="lblRagSociale" runat="server" Text='<%# Eval("RagSociale") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtRagSociale" runat="server" Text='<%# Bind("RagSociale") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtRagSociale" runat="server" Text='<%# Bind("RagSociale") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="indirizzo" SortExpression="indirizzo">
<ItemTemplate>
<asp:Label ID="lblindirizzo" runat="server" Text='<%# Eval("indirizzo") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtindirizzo" runat="server" Text='<%# Bind("indirizzo") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtindirizzo" runat="server" Text='<%# Bind("indirizzo") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="CAP" SortExpression="CAP">
<ItemTemplate>
<asp:Label ID="lblCAP" runat="server" Text='<%# Eval("CAP") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCAP" runat="server" Text='<%# Bind("CAP") %>' Width="4em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCAP" runat="server" Text='<%# Bind("CAP") %>' Width="4em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="citta" SortExpression="citta">
<ItemTemplate>
<asp:Label ID="lblcitta" runat="server" Text='<%# Eval("citta") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtcitta" runat="server" Text='<%# Bind("citta") %>' Width="6em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtcitta" runat="server" Text='<%# Bind("citta") %>' Width="6em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="prov" SortExpression="prov">
<ItemTemplate>
<asp:Label ID="lblprov" runat="server" Text='<%# Eval("prov") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtprov" runat="server" Text='<%# Bind("prov") %>' Width="2em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtprov" runat="server" Text='<%# Bind("prov") %>' Width="2em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="tel" SortExpression="tel">
<ItemTemplate>
<asp:Label ID="lbltel" runat="server" Text='<%# Eval("tel") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txttel" runat="server" Text='<%# Bind("tel") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txttel" runat="server" Text='<%# Bind("tel") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="email" SortExpression="email">
<ItemTemplate>
<asp:Label ID="lblemail" runat="server" Text='<%# Eval("email") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="pIva" SortExpression="pIva">
<ItemTemplate>
<asp:Label ID="lblpIva" runat="server" Text='<%# Eval("pIva") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtpIva" runat="server" Text='<%# Bind("pIva") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtpIva" runat="server" Text='<%# Bind("pIva") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="CF" SortExpression="CF">
<ItemTemplate>
<asp:Label ID="lblCF" runat="server" Text='<%# Eval("CF") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="nota" SortExpression="nota">
<ItemTemplate>
<asp:Label ID="lblnota" runat="server" Text='<%# Eval("nota") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtnota" runat="server" Text='<%# Bind("nota") %>' />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtnota" runat="server" Text='<%# Bind("nota") %>' />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxCliente") %>' CommandName="Delete"
ImageUrl="../images/elimina_s.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("idxCliente")) %>' />
<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='<%# chkLicOk %>' CssClass="btnNew" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<SortedAscendingCellStyle BackColor="#F5F7FB"></SortedAscendingCellStyle>
<SortedAscendingHeaderStyle BackColor="#6D95E1"></SortedAscendingHeaderStyle>
<SortedDescendingCellStyle BackColor="#E9EBEF"></SortedDescendingCellStyle>
<SortedDescendingHeaderStyle BackColor="#4870BE"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery" InsertMethod="insertQuery"
OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagClientiTableAdapter"
UpdateMethod="updateQuery"
FilterExpression=" (RagSociale like '%{0}%') OR (indirizzo like '%{0}%') OR (citta like '%{0}%') OR (url like '%{0}%') OR (email like '%{0}%') OR (nota like '%{0}%') "
onupdating="ods_Updating">
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_idxCliente" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="RagSociale" Type="String" />
<asp:Parameter Name="indirizzo" Type="String" />
<asp:Parameter Name="CAP" Type="String" />
<asp:Parameter Name="citta" Type="String" />
<asp:Parameter Name="prov" Type="String" />
<asp:Parameter Name="tel" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="pIva" Type="String" />
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="nota" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Original_idxCliente" Type="Int32" />
<asp:Parameter Name="RagSociale" Type="String" />
<asp:Parameter Name="indirizzo" Type="String" />
<asp:Parameter Name="CAP" Type="String" />
<asp:Parameter Name="citta" Type="String" />
<asp:Parameter Name="prov" Type="String" />
<asp:Parameter Name="tel" Type="String" />
<asp:Parameter Name="url" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="pIva" Type="String" />
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="logoUrl" Type="String" />
<asp:Parameter Name="nota" Type="String" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
</div>
@@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using SteamWare;
using GPW_data;
namespace GPW.WebUserControls
{
public partial class mod_adminClienti : System.Web.UI.UserControl
{
#region area standard (non modificare)
#region gestione eventi
public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
#endregion
/// <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
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <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...
resetSelezione();
// mostro il footer oppure la riga dei dettagli x nuovo...
if (grView.FooterRow != null)
{
grView.FooterRow.Visible = true;
}
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <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
ods.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...
grView.FooterRow.Visible = false;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
#endregion
#region area CUSTOM (da modificare)
/// <summary>
/// elenco colonne del datagrid
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
{
DS_Applicazione.AnagClientiDataTable tabella = new DS_Applicazione.AnagClientiDataTable();
DataColumnCollection colonne = tabella.Columns;
return colonne;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = true;
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// !!!FARE!!!
#if false
// controllo se ci siano tipo celle associate
trovati = MagClass.magazzino.taTipoCella.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
// controllo se ci siano blocchi associati
trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
#endif
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
}
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.checkLicenze);
}
}
/// <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 recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
{
if (chkLicOk)
{
//recupero la riga footer...
DataColumnCollection colonne = colonneObj();
string nomeCol;
string tipoColonna = "";
foreach (DataColumn colonna in colonne)
{
nomeCol = colonna.ColumnName;
// cerco un textbox o quello che sia...
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
{
tipoColonna = "textBox";
}
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
{
tipoColonna = "dropDownList";
}
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
{
tipoColonna = "checkBox";
}
// in base al tipo salvo negli inputparameters dell'ODS
switch (tipoColonna)
{
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
default:
break;
}
tipoColonna = "";
}
}
else
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.DataBind();
}
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (!licenzeGPW.checkLicenze)
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.EditIndex = -1;
grView.DataBind();
}
}
#endregion
}
}
+42
View File
@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <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_adminClienti {
/// <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;
/// <summary>
/// lblNumRec 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 lblNumRec;
}
}
@@ -0,0 +1,269 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminDipendenti.ascx.cs" Inherits="GPW.WebUserControls.mod_adminDipendenti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxDipendente" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="grView_DataBound">
<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 ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>'
ImageUrl="../images/view_s.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="../images/edit_s.png" />
</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="btnReset_Click"
ImageUrl="../images/reload_l.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Cognome" SortExpression="Cognome">
<ItemTemplate>
<asp:Label ID="lblCognome" runat="server" Text='<%# Eval("Cognome") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCognome" runat="server" Text='<%# Bind("Cognome") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCognome" runat="server" Text='<%# Bind("Cognome") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Nome" SortExpression="Nome">
<ItemTemplate>
<asp:Label ID="lblNome" runat="server" Text='<%# Eval("Nome") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtNome" runat="server" Text='<%# Bind("Nome") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtNome" runat="server" Text='<%# Bind("Nome") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="matricola" SortExpression="matricola">
<ItemTemplate>
<asp:Label ID="lblmatricola" runat="server" Text='<%# Eval("matricola") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtmatricola" runat="server" Text='<%# Bind("matricola") %>' Width="3em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtmatricola" runat="server" Text='<%# Bind("matricola") %>' Width="3em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="codOrario" SortExpression="codOrario">
<ItemTemplate>
<asp:Label ID="lblcodOrario" runat="server" Text='<%# Eval("codOrario") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" ID="dlCodOrario" SelectedValue='<%# Bind("codOrario") %>' DataSourceID="odsOrario" DataTextField="label"
DataValueField="value" />
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList runat="server" ID="dlCodOrario" SelectedValue='<%# Bind("codOrario") %>' DataSourceID="odsOrario" DataTextField="label"
DataValueField="value" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="dominio" SortExpression="dominio">
<ItemTemplate>
<asp:Label ID="lbldominio" runat="server" Text='<%# Eval("dominio") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdominio" runat="server" Text='<%# Bind("dominio") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtdominio" runat="server" Text='<%# Bind("dominio") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="utente" SortExpression="utente">
<ItemTemplate>
<asp:Label ID="lblutente" runat="server" Text='<%# Eval("utente") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtutente" runat="server" Text='<%# Bind("utente") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtutente" runat="server" Text='<%# Bind("utente") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="email" SortExpression="email">
<ItemTemplate>
<asp:Label ID="lblemail" runat="server" Text='<%# Eval("email") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="12em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtemail" runat="server" Text='<%# Bind("email") %>' Width="12em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="CF" SortExpression="CF">
<ItemTemplate>
<asp:Label ID="lblCF" runat="server" Text='<%# Eval("CF") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtCF" runat="server" Text='<%# Bind("CF") %>' Width="10em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="dataNascita" SortExpression="dataNascita">
<ItemTemplate>
<asp:Label ID="lbldataNascita" runat="server" Text='<%# Eval("dataNascita","{0:dd/MM/yy}") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdataNascita" runat="server" Text='<%# Bind("dataNascita","{0:yyyy/MM/dd}") %>' Width="6em" />
<asp:CalendarExtender runat="server" FirstDayOfWeek="Monday" ID="ceDataNascita" TargetControlID="txtdataNascita" Format="yyyy/MM/dd" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtdataNascita" runat="server" Text='<%# Bind("dataNascita","{0:yyyy/MM/dd}") %>' Width="6em" />
<asp:CalendarExtender runat="server" FirstDayOfWeek="Monday" ID="ceDataNascita" TargetControlID="txtdataNascita" Format="yyyy/MM/dd" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="luogoNascita" SortExpression="luogoNascita">
<ItemTemplate>
<asp:Label ID="lblluogoNascita" runat="server" Text='<%# Eval("luogoNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtluogoNascita" runat="server" Text='<%# Bind("luogoNascita") %>' Width="8em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtluogoNascita" runat="server" Text='<%# Bind("luogoNascita") %>' Width="8em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="provNascita" SortExpression="provNascita">
<ItemTemplate>
<asp:Label ID="lblprovNascita" runat="server" Text='<%# Eval("provNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtprovNascita" runat="server" Text='<%# Bind("provNascita") %>' Width="2em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtprovNascita" runat="server" Text='<%# Bind("provNascita") %>' Width="2em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="nazNascita" SortExpression="nazNascita">
<ItemTemplate>
<asp:Label ID="lblnazNascita" runat="server" Text='<%# Eval("nazNascita") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtnazNascita" runat="server" Text='<%# Bind("nazNascita") %>' Width="2em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtnazNascita" runat="server" Text='<%# Bind("nazNascita") %>' Width="2em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="attivo" SortExpression="attivo">
<ItemTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Eval("attivo") %>' Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Bind("attivo") %>' />
</EditItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="chkattivo" runat="server" Checked='<%# Bind("attivo") %>' />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxDipendente") %>' CommandName="Delete"
ImageUrl="../images/elimina_s.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("idxDipendente")) %>' />
<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='<%# chkLicOk %>' CssClass="btnNew" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<SortedAscendingCellStyle BackColor="#F5F7FB"></SortedAscendingCellStyle>
<SortedAscendingHeaderStyle BackColor="#6D95E1"></SortedAscendingHeaderStyle>
<SortedDescendingCellStyle BackColor="#E9EBEF"></SortedDescendingCellStyle>
<SortedDescendingHeaderStyle BackColor="#4870BE"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery" InsertMethod="insertQuery"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.DipendentiTableAdapter"
UpdateMethod="updateQuery" FilterExpression=" (Cognome like '%{0}%') OR (Nome like '%{0}%') OR (CF like '%{0}%') OR (matricola like '%{0}%') OR (email like '%{0}%') "
OnUpdating="ods_Updating">
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="matricola" Type="String" />
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="Cognome" Type="String" />
<asp:Parameter Name="Nome" Type="String" />
<asp:Parameter Name="dataNascita" Type="DateTime" />
<asp:Parameter Name="luogoNascita" Type="String" />
<asp:Parameter Name="provNascita" Type="String" />
<asp:Parameter Name="nazNascita" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="dominio" Type="String" />
<asp:Parameter Name="utente" Type="String" />
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="attivo" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="matricola" Type="String"></asp:Parameter>
<asp:Parameter Name="CF" Type="String" />
<asp:Parameter Name="Cognome" Type="String" />
<asp:Parameter Name="Nome" Type="String" />
<asp:Parameter Name="dataNascita" Type="DateTime" />
<asp:Parameter Name="luogoNascita" Type="String" />
<asp:Parameter Name="provNascita" Type="String" />
<asp:Parameter Name="nazNascita" Type="String" />
<asp:Parameter Name="email" Type="String" />
<asp:Parameter Name="dominio" Type="String" />
<asp:Parameter Name="utente" Type="String" />
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="attivo" Type="Boolean" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
</div>
<asp:ObjectDataSource ID="odsOrario" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selCodOrarioTableAdapter"></asp:ObjectDataSource>
@@ -0,0 +1,261 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using SteamWare;
using GPW_data;
namespace GPW.WebUserControls
{
public partial class mod_adminDipendenti : System.Web.UI.UserControl
{
#region area standard (non modificare)
#region gestione eventi
public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
#endregion
/// <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
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <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...
resetSelezione();
// mostro il footer oppure la riga dei dettagli x nuovo...
if (grView.FooterRow != null)
{
grView.FooterRow.Visible = true;
}
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <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
ods.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...
grView.FooterRow.Visible = false;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
#endregion
#region area CUSTOM (da modificare)
/// <summary>
/// elenco colonne del datagrid
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
{
DS_Applicazione.DipendentiDataTable tabella = new DS_Applicazione.DipendentiDataTable();
DataColumnCollection colonne = tabella.Columns;
return colonne;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = true;
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// !!!FARE!!!
#if false
// controllo se ci siano tipo celle associate
trovati = MagClass.magazzino.taTipoCella.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
// controllo se ci siano blocchi associati
trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
#endif
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
}
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.utentiAttivi < licenzeGPW.licenzeAttive);
}
}
/// <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 recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
{
if (chkLicOk)
{
//recupero la riga footer...
DataColumnCollection colonne = colonneObj();
string nomeCol;
string tipoColonna = "";
foreach (DataColumn colonna in colonne)
{
nomeCol = colonna.ColumnName;
// cerco un textbox o quello che sia...
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
{
tipoColonna = "textBox";
}
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
{
tipoColonna = "dropDownList";
}
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
{
tipoColonna = "checkBox";
}
// in base al tipo salvo negli inputparameters dell'ODS
switch (tipoColonna)
{
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
default:
break;
}
tipoColonna = "";
}
// attivo imposto a true!
e.InputParameters["attivo"] = "true";
// sistemo calendario!
}
else
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.DataBind();
}
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (!licenzeGPW.checkLicenze)
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.EditIndex = -1;
grView.DataBind();
}
}
#endregion
}
}
+51
View File
@@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <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_adminDipendenti {
/// <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;
/// <summary>
/// lblNumRec 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 lblNumRec;
/// <summary>
/// odsOrario 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 odsOrario;
}
}
+250
View File
@@ -0,0 +1,250 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminFasi.ascx.cs" Inherits="GPW.WebUserControls.mod_adminFasi" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="filtro_1 fontPiccolo" style="white-space: nowrap; height: 30px;">
<div class="divSx">
<uc1:mod_filtro ID="filtroCli" runat="server" filterChekText="filtroCliente" comboWidth="150" changeCheckVisible="false"
isChecked="true" />
<asp:ObjectDataSource ID="odsClienti" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selClientiTableAdapter"></asp:ObjectDataSource>
</div>
<div class="divSx">
<uc1:mod_filtro ID="filtroPrj" runat="server" filterChekText="filtroProgetto" comboWidth="200" changeCheckEnabled="false"
changeCheckVisible="false" isChecked="true" />
<asp:ObjectDataSource ID="odsProj" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selProgettiTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="filtroCli" DefaultValue="0" PropertyName="valore" Name="conditio" Type="String" />
<asp:Parameter DefaultValue="false" Name="soloAttivi" Type="Boolean" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</div>
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxFase" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="grView_DataBound"
OnSelectedIndexChanged="grView_SelectedIndexChanged">
<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>
<asp:Button ID="btnNewEmpty" runat="server" OnClick="btnNewEmpty_Click" Text='<%# traduci("NewFase") %>' CssClass="btnNew"
ToolTip='<%# traduci("NewFaseExpl") %>' Visible='<%# isWritable() %>' />
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>'
ImageUrl="../images/view_m.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="../images/edit_m.png" Visible='<%# isWritable() %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:ImageButton ID="imgUpdate" runat="server" CausesValidation="False" CommandName="Update" ToolTip='<%# traduci("Update")%>'
ImageUrl="../images/apply_m.png" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="../images/cancel_m.png" />
</EditItemTemplate>
<FooterTemplate>
<asp:ImageButton ID="imgInsert" runat="server" CausesValidation="False" CommandName="Insert" ToolTip='<%# traduci("Insert") %>'
ImageUrl="../images/new_m.png" OnClick="lblIns_click" />
<asp:ImageButton ID="imgCancel" runat="server" CausesValidation="False" CommandName="Cancel" ToolTip='<%# traduci("Cancel") %>'
ImageUrl="../images/cancel_m.png" />
</FooterTemplate>
<HeaderTemplate>
<asp:ImageButton ID="imgBtnReset" runat="server" ToolTip='<%# traduci("Reset") %>' CausesValidation="False" OnClick="btnReset_Click"
ImageUrl="../images/reload_l.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="nomeFase" SortExpression="nomeFase">
<ItemTemplate>
<div class="divSx">
<asp:Image runat="server" ID="imgSpaz" Width='<%# widthByCod(Eval("codFase")) %>' ImageUrl="~/images/EmptyImg.png" />
</div>
<div class="divSx">
<div style="text-align: left; padding: 2px 3px 2px 3px;" class='<%# classByCod(Eval("codFase")) %>'>
<asp:Label ID="nomeFaseLabel" runat="server" Text='<%# Eval("nomeFase") %>' Font-Strikeout='<%# invBool(Eval("Attivo")) %>'
Font-Bold="true" />
</div>
<%--<asp:Label ID="codFaseLabel" runat="server" Text='<%# Eval("codFase") %>' />--%>
<div class="fontPiccolo textGrigio" style="text-align: left; padding: 2px 3px 2px 3px;">
<asp:Label ID="descrizioneFaseLabel" runat="server" Text='<%# Eval("descrizioneFase") %>' />
</div>
</div>
</ItemTemplate>
<EditItemTemplate>
<div class="divSx">
<asp:Image runat="server" ID="imgSpaz" Width='<%# widthByCod(Eval("codFase")) %>' ImageUrl="~/images/EmptyImg.png" />
</div>
<div class="divSx">
<asp:TextBox ID="txtnomeFase" runat="server" Text='<%# Bind("nomeFase") %>' Width="20em" />
&nbsp;
<asp:TextBox ID="txtdescrizioneFase" runat="server" Text='<%# Bind("descrizioneFase") %>' Width="20em" />
</div>
</EditItemTemplate>
<FooterTemplate>
<div class="divSx">
<asp:Image runat="server" ID="imgSpaz" Width='<%# widthByCod(Eval("codFase")) %>' ImageUrl="~/images/EmptyImg.png" />
</div>
<div class="divSx">
<asp:TextBox ID="txtnomeFase" runat="server" Text='<%# Bind("nomeFase") %>' Width="20em" />
&nbsp;
<asp:TextBox ID="txtdescrizioneFase" runat="server" Text='<%# Bind("descrizioneFase") %>' Width="20em" />
</div>
</FooterTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="timeTrack" SortExpression="enableTime">
<ItemTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglTime" runat="server" TargetControlID="chkenableTime" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Time track ATTIVO" UncheckedImageAlternateText="Time track NON attivo" UncheckedImageUrl="~/images/timeDis_m.png"
CheckedImageUrl="~/images/time_m.png" />
<asp:CheckBox ID="chkenableTime" runat="server" Checked='<%# Eval("enableTime") %>' Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglTime" runat="server" TargetControlID="chkenableTime" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Time track ATTIVO" UncheckedImageAlternateText="Time track NON attivo" UncheckedImageUrl="~/images/timeDis_m.png"
CheckedImageUrl="~/images/time_m.png" />
<asp:CheckBox ID="chkenableTime" runat="server" Checked='<%# Bind("enableTime") %>' Enabled="true" />
</EditItemTemplate>
<FooterTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglTime" runat="server" TargetControlID="chkenableTime" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Time track ATTIVO" UncheckedImageAlternateText="Time track NON attivo" UncheckedImageUrl="~/images/timeDis_m.png"
CheckedImageUrl="~/images/time_m.png" />
<asp:CheckBox ID="chkenableTime" runat="server" Checked='<%# Bind("enableTime") %>' Enabled="true" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="moneyTrack" SortExpression="enableMoney">
<ItemTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglMoney" runat="server" TargetControlID="chkenableMoney" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Money track ATTIVO" UncheckedImageAlternateText="Money track NON attivo" UncheckedImageUrl="~/images/moneyDis_m.png"
CheckedImageUrl="~/images/money_m.png" />
<asp:CheckBox ID="chkenableMoney" runat="server" Checked='<%# Eval("enableMoney") %>' Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglMoney" runat="server" TargetControlID="chkenableMoney" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Money track ATTIVO" UncheckedImageAlternateText="Money track NON attivo" UncheckedImageUrl="~/images/moneyDis_m.png"
CheckedImageUrl="~/images/money_m.png" />
<asp:CheckBox ID="chkenableMoney" runat="server" Checked='<%# Bind("enableMoney") %>' Enabled="true" />
</EditItemTemplate>
<FooterTemplate>
<ajaxToolkit:ToggleButtonExtender ID="tglMoney" runat="server" TargetControlID="chkenableMoney" ImageWidth="22" ImageHeight="22"
CheckedImageAlternateText="Money track ATTIVO" UncheckedImageAlternateText="Money track NON attivo" UncheckedImageUrl="~/images/moneyDis_m.png"
CheckedImageUrl="~/images/money_m.png" />
<asp:CheckBox ID="chkenableMoney" runat="server" Checked='<%# Bind("enableMoney") %>' Enabled="true" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RealVsBudgetTime" SortExpression="budgetTime" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Panel runat="server" ID="pnlTime" CssClass='<%# colorByVal(Eval("totOre"),Eval("budgetTime"))%>' Style="font-size: 8pt;
padding: .3em;" Width="8em" Visible='<%# Bind("enableTime") %>'>
<asp:Label ID="lblRealTime" runat="server" Text='<%# Eval("totOre","{0:#,###.##}") %>' ToolTip='<%# traduci("OreErogate") %>' />
/
<asp:Label ID="lblbudgetTime" runat="server" Text='<%# Eval("budgetTime","{0:#,###.##}") %>' ToolTip='<%# traduci("OreBudget") %>' />
</div>
</asp:Panel>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtbudgetTime" runat="server" Text='<%# Bind("budgetTime") %>' Width="3em" />
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtbudgetTime" runat="server" Text='<%# Bind("budgetTime") %>' Width="3em" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Attivo" SortExpression="Attivo" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkAttivo" runat="server" Checked='<%# Eval("Attivo") %>' Enabled="false" />
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="chkAttivo" runat="server" Checked='<%# Bind("Attivo") %>' Enabled="true" />
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<div class="divDx">
<asp:ImageButton ID="imgAddNew" runat="server" CausesValidation="False" CommandName="Select" ImageUrl="../images/new_m.png"
CommandArgument='<%# Eval("idxFase") %>' OnClick="btnNew_Click" ToolTip='<%# traduci("AddNewSubFase") %>' Visible='<%# isAncestor(Eval("idxFaseAncest")) %>' />
&nbsp;
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxFase") %>' CommandName="Delete"
ImageUrl="../images/elimina_m.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("idxFase")) %>' />
<asp:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText='<%# traduci("confermaDel")%>' TargetControlID="imgDelete">
</asp:ConfirmButtonExtender>
</div>
</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("NewFase") %>' CssClass="btnNew" ToolTip='<%# traduci("NewFaseExpl") %>' Visible='<%# isWritable() %>' />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<SortedAscendingCellStyle BackColor="#F8FAFA"></SortedAscendingCellStyle>
<SortedAscendingHeaderStyle BackColor="#246B61"></SortedAscendingHeaderStyle>
<SortedDescendingCellStyle BackColor="#D4DFE1"></SortedDescendingCellStyle>
<SortedDescendingHeaderStyle BackColor="#15524A"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getByIdxProgetto" TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagFasiTableAdapter" FilterExpression=" (nomeFase like '%{0}%') OR (descrizioneFase like '%{0}%') "
DeleteMethod="deleteQuery" InsertMethod="insertQuery" UpdateMethod="updateQuery" onupdating="ods_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxFase" Type="Int32" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<InsertParameters>
<asp:ControlParameter ControlID="filtroPrj" DefaultValue="0" PropertyName="valoreInt" Name="idxProgetto" Type="Int32" />
<asp:SessionParameter SessionField="idxFaseAncest" Name="idxFaseAncest" Type="Int32" />
<asp:Parameter Name="nomeFase" Type="String" />
<asp:Parameter Name="descrizioneFase" Type="String" />
<asp:Parameter Name="enableTime" Type="Boolean" />
<asp:Parameter Name="enableMoney" Type="Boolean" />
<asp:Parameter Name="budgetTime" Type="Decimal" />
<asp:Parameter Name="budgetMoney" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Attivo" Type="Boolean" DefaultValue="true" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="filtroPrj" DefaultValue="0" PropertyName="valoreInt" Name="idxProgetto" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="nomeFase" Type="String" />
<asp:Parameter Name="descrizioneFase" Type="String" />
<asp:Parameter Name="enableTime" Type="Boolean" />
<asp:Parameter Name="enableMoney" Type="Boolean" />
<asp:Parameter Name="Attivo" Type="Int32" />
<asp:Parameter Name="budgetTime" Type="Decimal" />
<asp:Parameter Name="budgetMoney" Type="Decimal" DefaultValue="0" />
<asp:Parameter Name="Original_idxFase" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
<asp:Panel runat="server" ID="pnlDetRA">
<asp:Label runat="server" ID="lblDet" Text="---" />
</asp:Panel>
</div>
+610
View File
@@ -0,0 +1,610 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using SteamWare;
using GPW_data;
namespace GPW.WebUserControls
{
public partial class mod_adminFasi : System.Web.UI.UserControl
{
#region area standard (non modificare)
#region gestione eventi
public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
#endregion
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// aggiorno visualizzazione fasi!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void filtroPrj_eh_selValore(object sender, EventArgs e)
{
salveFilterPrj();
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <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
ods.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...
grView.FooterRow.Visible = false;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
#endregion
#region area CUSTOM (da modificare)
#region gestione eventi
public event EventHandler eh_faseSel;
#endregion
/// <summary>
/// uid base
/// </summary>
protected string sessionUid
{
get
{
return this.UniqueID.Replace("$", "-");
}
}
/// <summary>
/// idx del cliente selezionato
/// </summary>
public int idxCliente
{
get
{
return memLayer.ML.IntSessionObj(string.Format("idxCli_{0}", sessionUid));
}
set
{
memLayer.ML.setSessionVal(string.Format("idxCli_{0}", sessionUid), value);
}
}
/// <summary>
/// idx del progetto selezionato
/// </summary>
public int idxProgetto
{
get
{
return memLayer.ML.IntSessionObj(string.Format("idxProj_{0}", sessionUid));
}
set
{
memLayer.ML.setSessionVal(string.Format("idxProj_{0}", sessionUid), value);
}
}
/// <summary>
/// valore della fase selezionata
/// </summary>
public int idxFase
{
get
{
int answ = 0;
if (grView.SelectedIndex >= 0)
{
try
{
answ = Convert.ToInt32(grView.SelectedValue);
}
catch
{ }
}
return answ;
}
}
/// <summary>
/// pagina corrente (URL finale)
/// </summary>
public string _paginaCorrente { get; set; }
/// <summary>
/// caricamento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
filtroCli.ods = odsClienti;
filtroCli.valore = idxCliente.ToString();// memLayer.ML.StringSessionObj("idxCli_sel");
filtroPrj.ods = odsProj;
filtroPrj.valore = idxProgetto.ToString();// memLayer.ML.StringSessionObj("idxProgetto_sel");
PagCorrente();
}
filtroCli.eh_selValore += new EventHandler(filtroCli_eh_selValore);
filtroPrj.eh_selValore += new EventHandler(filtroPrj_eh_selValore);
grView.PageSize = utils.pageSize;
setDetVisibility();
}
/// <summary>
/// salva in variabile pagina il nome della pagina corrente
/// </summary>
protected void PagCorrente()
{
Uri MyUrl = Request.Url;
string delimStr = "/";
char[] delimiter = delimStr.ToCharArray();
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
int n = finalUrl.Length;
_paginaCorrente = finalUrl[n - 1].ToString();
}
/// <summary>
/// sistema visibilità area dettaglio RA
/// </summary>
private void setDetVisibility()
{
pnlDetRA.Visible = enableShowRA;
lblDet.Visible = (grView.SelectedIndex >= 0);
}
/// <summary>
/// salva filtro cliente
/// </summary>
private void saveFilterCli()
{
// salvo filtro cliente
//memLayer.ML.setSessionVal("idxCli_sel", filtroCli.valore);
idxCliente = filtroCli.valoreInt;
filtroPrj.ods = odsProj;
filtroPrj.reselFirst();
}
/// <summary>
/// salva filtro prj
/// </summary>
private void salveFilterPrj()
{
//memLayer.ML.setSessionVal("idxProgetto_sel", filtroPrj.valore);
idxProgetto = filtroPrj.valoreInt;
grView.DataBind();
}
/// <summary>
/// cambio sel cliente --> aggiorno progetti
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void filtroCli_eh_selValore(object sender, EventArgs e)
{
saveFilterCli();
salveFilterPrj();
}
/// <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 recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
{
if (chkLicOk)
{
//recupero la riga footer...
DataColumnCollection colonne = colonneObj();
string nomeCol;
string tipoColonna = "";
foreach (DataColumn colonna in colonne)
{
nomeCol = colonna.ColumnName;
// cerco un textbox o quello che sia...
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
{
tipoColonna = "textBox";
}
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
{
tipoColonna = "dropDownList";
}
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
{
tipoColonna = "checkBox";
}
// in base al tipo salvo negli inputparameters dell'ODS
switch (tipoColonna)
{
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
default:
break;
}
tipoColonna = "";
}
//// aggiungo fase ancestor!
//e.InputParameters["idxFaseAncest"] = memLayer.ML.IntSessionObj("idxFaseAncest");
// aggiungo progetto!
e.InputParameters["idxProgetto"] = idxProgetto;
}
else
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.DataBind();
}
}
/// <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)
{
// controllo se c'è un argument x la fase...
string idxFaseAncest = "0";
try
{
idxFaseAncest = ((ImageButton)sender).CommandArgument;
}
catch
{ }
memLayer.ML.setSessionVal("idxFaseAncest", idxFaseAncest);
if (idxFaseAncest == "0")
{
// reset selezione...
resetSelezione();
}
// mostro il footer oppure la riga dei dettagli x nuovo...
if (grView.FooterRow != null)
{
grView.FooterRow.Visible = true;
}
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// gestione evento richiesta nuovo valore QUANDO NON CI SIANO RECORDS!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnNewEmpty_Click(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("idxFaseAncest", "0");
DataProxy.DP.taAF.insertQuery(idxProgetto, 0, "NuovaFase", "DescrizioneFase", false, false, 0, 0, true);
grView.DataBind();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// elenco colonne del datagrid
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
{
DS_Applicazione.AnagFasiDataTable tabella = new DS_Applicazione.AnagFasiDataTable();
DataColumnCollection colonne = tabella.Columns;
return colonne;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = isWritable();
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// !!!FARE!!!
#if false
// controllo se ci siano tipo celle associate
trovati = MagClass.magazzino.taTipoCella.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
// controllo se ci siano blocchi associati
trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
#endif
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
}
/// <summary>
/// calcola classe css dato codice fase
/// </summary>
/// <param name="codFase"></param>
/// <returns></returns>
public string classByCod(object codFase)
{
string answ = "";
int livello = 0;
// calcolo livello come num punti "." -1...
try
{
string[] array = codFase.ToString().Split('.');
livello = array.Length;
}
catch
{ }
if (livello < 4)
{
answ = "fontNormale textNero";
}
else
{
answ = "fontPiccolo textAzzurro";
}
return answ;
}
/// <summary>
/// determina dimensioni dell'oggetto spaziatore data la fase
/// </summary>
/// <param name="codFase"></param>
/// <returns></returns>
public Unit widthByCod(object codFase)
{
Unit answ = new Unit(0, UnitType.Pixel);
int livello = 0;
// calcolo livello come num punti "." -1...
try
{
string[] array = codFase.ToString().Split('.');
livello = array.Length;
}
catch
{ }
if (livello >= 4)
{
answ = new Unit((livello - 3) * 10, UnitType.Pixel);
}
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>
/// abilitazione/disabilitazione gestione cambio cliente
/// </summary>
public bool changeSelCliEnabled
{
get
{
return filtroCli.changeSelEnabled;
}
set
{
filtroCli.changeSelEnabled = value;
}
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
setDetVisibility();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// indico cambio selezione valore...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
setDetVisibility();
if (eh_faseSel != null)
{
eh_faseSel(this, new EventArgs());
}
}
/// <summary>
/// restituisce una classe css a seconda dei valori passati:
/// green: bdgt > real
/// orange: real > bdgt*warning
/// red: real > bdgt
/// std: errore...
/// </summary>
/// <param name="real"></param>
/// <param name="bdgt"></param>
/// <returns></returns>
public string colorByVal(object real, object bdgt)
{
string answ = "badgeStd";
try
{
double valoreReal = Convert.ToDouble(real);
double valoreBdget = Convert.ToDouble(bdgt);
double valoreWarn = Convert.ToDouble(bdgt) * Convert.ToDouble(memLayer.ML.confReadString("warningRatioPerc")) / 100;
if (valoreReal >= valoreBdget)
{
answ = "badgeRosso";
}
else if (valoreReal >= valoreWarn)
{
answ = "badgeArancio";
}
else
{
answ = "badgeVerde";
}
}
catch
{
}
return "ui-corner-all " + answ;
}
/// <summary>
/// determina se sia visibile pnl dettaglio RA della fase selezionata
/// </summary>
public bool enableShowRA
{
get
{
return pnlDetRA.Visible;
}
set
{
pnlDetRA.Visible = value;
}
}
/// <summary>
/// calcola se sia ancestore la fase
/// </summary>
/// <param name="idxFaseAncest"></param>
/// <returns></returns>
public bool isAncestor(object idxFaseAncest)
{
bool answ = isWritable();
if (answ)
{
int idxFase = -1;
try
{
idxFase = Convert.ToInt32(idxFaseAncest);
}
catch
{ }
answ = (idxFase == 0);
}
return answ;
}
/// <summary>
/// risponde alla domanda se l'utente abbia permesso tipo writable (S) nel permessi2funzione
/// </summary>
/// <returns></returns>
public bool isWritable()
{
bool answ = false;
if (_paginaCorrente == null)
{
PagCorrente();
}
answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente) && chkLicOk;
return answ;
}
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.utentiAttivi < licenzeGPW.licenzeAttive);
}
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (!licenzeGPW.checkLicenze)
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.EditIndex = -1;
grView.DataBind();
}
}
#endregion
}
}
+96
View File
@@ -0,0 +1,96 @@
//------------------------------------------------------------------------------
// <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_adminFasi {
/// <summary>
/// filtroCli control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_filtro filtroCli;
/// <summary>
/// odsClienti 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 odsClienti;
/// <summary>
/// filtroPrj control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_filtro filtroPrj;
/// <summary>
/// odsProj 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 odsProj;
/// <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;
/// <summary>
/// lblNumRec 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 lblNumRec;
/// <summary>
/// pnlDetRA 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 pnlDetRA;
/// <summary>
/// lblDet 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 lblDet;
}
}
+128
View File
@@ -0,0 +1,128 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminOrario.ascx.cs" Inherits="GPW.WebUserControls.mod_adminOrario" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="codOrario" DataSourceID="ods" ForeColor="#333333" GridLines="None" Width="100%" OnDataBound="grView_DataBound">
<SortedAscendingCellStyle CssClass="sortAscCell" />
<SortedAscendingHeaderStyle CssClass="sortAscHead" />
<SortedDescendingCellStyle CssClass="sortDescCell" />
<SortedDescendingHeaderStyle CssClass="sortDescHead" />
<AlternatingRowStyle CssClass="alternatingRowStyle" />
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' ImageUrl="../images/view_s.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>' ImageUrl="../images/edit_s.png" />
</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>
<HeaderTemplate>
<asp:ImageButton ID="imgBtnReset" runat="server" ToolTip='<%# traduci("Reset") %>' CausesValidation="False" OnClick="btnReset_Click" ImageUrl="../images/reload_m.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="codOrario" HeaderText="cod" SortExpression="codOrario" ControlStyle-Width="7em" />
<asp:BoundField DataField="descOrario" HeaderText="descrizione" SortExpression="descOrario" ControlStyle-Width="21em" />
<asp:BoundField DataField="oreLun" HeaderText="Lun" SortExpression="oreLun" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreMar" HeaderText="Mar" SortExpression="oreMar" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreMer" HeaderText="Mer" SortExpression="oreMer" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreGio" HeaderText="Gio" SortExpression="oreGio" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreVen" HeaderText="Ven" SortExpression="oreVen" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreSab" HeaderText="Sab" SortExpression="oreSab" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreDom" HeaderText="Dom" SortExpression="oreDom" DataFormatString="{0:0.##}" ControlStyle-Width="1em" />
<asp:BoundField DataField="oreOrdSett" HeaderText="Ordinarie" SortExpression="oreOrdSett" DataFormatString="{0:0.##}" ControlStyle-Width="2em" />
<asp:BoundField DataField="oreStraordAss" HeaderText="Straordinarie" SortExpression="oreStraordAss" DataFormatString="{0:0.##}" ControlStyle-Width="2em" />
<asp:CheckBoxField DataField="autoCompOreOrd" HeaderText="autoCompOreOrd" SortExpression="autoCompOreOrd" ControlStyle-Width="1em" />
<asp:BoundField DataField="oraInizio_1" HeaderText="Inizio_1" SortExpression="oraInizio_1" ControlStyle-Width="4em" />
<asp:BoundField DataField="oraFine_1" HeaderText="Fine_1" SortExpression="oraFine_1" ControlStyle-Width="4em" />
<asp:BoundField DataField="oraInizio_2" HeaderText="Inizio_2" SortExpression="oraInizio_2" ControlStyle-Width="4em" />
<asp:BoundField DataField="oraFine_2" HeaderText="Fine_2" SortExpression="oraFine_2" ControlStyle-Width="4em" />
<asp:BoundField DataField="oraInizio_3" HeaderText="Inizio_3" SortExpression="oraInizio_3" ControlStyle-Width="4em" />
<asp:BoundField DataField="oraFine_3" HeaderText="Fine_3" SortExpression="oraFine_3" ControlStyle-Width="4em" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("codOrario") %>' CommandName="Delete" ImageUrl="../images/elimina_s.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("codOrario")) %>' />
<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>
<HeaderTemplate>
<asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text='<%# traduci("New") %>' Visible='<%# chkLicOk %>' CssClass="btnNew" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
<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"></SortedAscendingCellStyle>
<SortedAscendingHeaderStyle CssClass="sortAscHead"></SortedAscendingHeaderStyle>
<SortedDescendingCellStyle CssClass="sortDescCell"></SortedDescendingCellStyle>
<SortedDescendingHeaderStyle CssClass="sortDescHead"></SortedDescendingHeaderStyle>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagOrariTableAdapter" UpdateMethod="updateQuery"
FilterExpression=" (RagSociale like '%{0}%') OR (indirizzo like '%{0}%') OR (citta like '%{0}%') OR (url like '%{0}%') OR (email like '%{0}%') OR (nota like '%{0}%') "
onupdating="ods_Updating">
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<DeleteParameters>
<asp:Parameter Name="Original_codOrario" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="descOrario" Type="String" />
<asp:Parameter Name="oreOrdSett" Type="Double" />
<asp:Parameter Name="oreStraordAss" Type="Double" />
<asp:Parameter Name="autoCompOreOrd" Type="Boolean" />
<asp:Parameter Name="oreLun" Type="Double" />
<asp:Parameter Name="oreMar" Type="Double" />
<asp:Parameter Name="oreMer" Type="Double" />
<asp:Parameter Name="oreGio" Type="Double" />
<asp:Parameter Name="oreVen" Type="Double" />
<asp:Parameter Name="oreSab" Type="Double" />
<asp:Parameter Name="oreDom" Type="Double" />
<asp:Parameter DbType="Time" Name="oraInizio_1" />
<asp:Parameter DbType="Time" Name="oraFine_1" />
<asp:Parameter DbType="Time" Name="oraInizio_2" />
<asp:Parameter DbType="Time" Name="oraFine_2" />
<asp:Parameter DbType="Time" Name="oraInizio_3" />
<asp:Parameter DbType="Time" Name="oraFine_3" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="codOrario" Type="String" />
<asp:Parameter Name="descOrario" Type="String" />
<asp:Parameter Name="oreOrdSett" Type="Double" />
<asp:Parameter Name="oreStraordAss" Type="Double" />
<asp:Parameter Name="autoCompOreOrd" Type="Boolean" />
<asp:Parameter Name="oreLun" Type="Double" />
<asp:Parameter Name="oreMar" Type="Double" />
<asp:Parameter Name="oreMer" Type="Double" />
<asp:Parameter Name="oreGio" Type="Double" />
<asp:Parameter Name="oreVen" Type="Double" />
<asp:Parameter Name="oreSab" Type="Double" />
<asp:Parameter Name="oreDom" Type="Double" />
<asp:Parameter Name="oraInizio_1" DbType="Time" />
<asp:Parameter DbType="Time" Name="oraFine_1" />
<asp:Parameter DbType="Time" Name="oraInizio_2" />
<asp:Parameter DbType="Time" Name="oraFine_2" />
<asp:Parameter DbType="Time" Name="oraInizio_3" />
<asp:Parameter DbType="Time" Name="oraFine_3" />
<asp:Parameter Name="Original_codOrario" Type="String" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
</div>
+251
View File
@@ -0,0 +1,251 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using SteamWare;
using GPW_data;
namespace GPW.WebUserControls
{
public partial class mod_adminOrario : System.Web.UI.UserControl
{
#region area standard (non modificare)
#region gestione eventi
public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
#endregion
/// <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
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <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
ods.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...
grView.FooterRow.Visible = false;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
#endregion
#region area CUSTOM (da modificare)
/// <summary>
/// elenco colonne del datagrid
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
{
DS_Applicazione.AnagOrariDataTable tabella = new DS_Applicazione.AnagOrariDataTable();
DataColumnCollection colonne = tabella.Columns;
return colonne;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = true;
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// controllo se ci siano tipo celle associate
trovati = DataProxy.DP.taDipendenti.getByCodOrario(idxObj.ToString()).Rows.Count;
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
}
/// <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...
resetSelezione();
// inserisco record
DataProxy.DP.taAO.Insert("0000 (new)", "descrizione", 0, 0, false, 0, 0, 0, 0, 0, 0, 0, DateTime.Today.TimeOfDay, DateTime.Today.TimeOfDay, null, null, null, null);
//update!
grView.DataBind();
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.checkLicenze);
}
}
/// <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 recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
{
if (chkLicOk)
{
//recupero la riga footer...
DataColumnCollection colonne = colonneObj();
string nomeCol;
string tipoColonna = "";
foreach (DataColumn colonna in colonne)
{
nomeCol = colonna.ColumnName;
// cerco un textbox o quello che sia...
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
{
tipoColonna = "textBox";
}
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
{
tipoColonna = "dropDownList";
}
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
{
tipoColonna = "checkBox";
}
// in base al tipo salvo negli inputparameters dell'ODS
switch (tipoColonna)
{
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
default:
break;
}
tipoColonna = "";
}
}
else
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.DataBind();
}
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (!licenzeGPW.checkLicenze)
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.EditIndex = -1;
grView.DataBind();
}
}
#endregion
}
}
+42
View File
@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <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_adminOrario {
/// <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;
/// <summary>
/// lblNumRec 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 lblNumRec;
}
}
+219
View File
@@ -0,0 +1,219 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_adminProgetti.ascx.cs" Inherits="GPW.WebUserControls.mod_adminProgetti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %>
<%@ Register Src="mod_dettaglioProgetto.ascx" TagName="mod_dettaglioProgetto" TagPrefix="uc3" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<div class="filtro_1 fontPiccolo" style="white-space: nowrap; height: 30px;">
<div class="divSx">
<uc2:mod_periodoAnalisi ID="mod_periodoAnalisi1" runat="server" realtimeUpdate="true" />
</div>
<div class="divSx">
<asp:CheckBox ID="chkShowChiusi" runat="server" Text="Mostra Archiviati" OnCheckedChanged="chkShowChiusi_CheckedChanged"
AutoPostBack="True" />
</div>
<div class="divSx">
<uc1:mod_filtro ID="filtroCli" runat="server" filterChekText="filtroCliente" comboWidth="180" />
</div>
<%--<div class="divSx">
<uc1:mod_filtro ID="filtroDip" runat="server" filterChekText="filtroDipendenti" comboWidth="180" />
</div>--%>
<div class="divSx">
<asp:CheckBox ID="chkShowVuoti" runat="server" Text="Mostra Vuoti" AutoPostBack="True"
OnCheckedChanged="chkShowVuoti_CheckedChanged" Checked="true" />
</div>
<div class="divSx">
<asp:CheckBox ID="chkShowOnlyStarred" runat="server" Text="Mostra SOLO Starred" AutoPostBack="True"
OnCheckedChanged="chkShowOnlyStarred_CheckedChanged" Checked="false" />
</div>
</div>
<div class="divSx" style="min-width: 600px;">
<div class="fontPiccolo">
<asp:GridView ID="grView" runat="server" AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="idxProgetto" DataSourceID="ods" ForeColor="#333333" GridLines="None" OnDataBound="grView_DataBound" OnSelectedIndexChanged="grView_SelectedIndexChanged"
OnRowUpdating="grView_RowUpdating">
<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" />
<Columns>
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false" ItemStyle-Width="72px" ItemStyle-VerticalAlign="Middle"
ItemStyle-Height="26px">
<ItemTemplate>
<asp:ImageButton ID="imgSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>'
ImageUrl="../images/view_m.png" />
<asp:ImageButton ID="imgEdit" runat="server" CausesValidation="False" CommandName="Edit" ToolTip='<%# traduci("Edit") %>'
ImageUrl="../images/edit_m.png" Visible='<%# isWritable() %>' />
<asp:ImageButton ID="imgDettFasi" runat="server" CausesValidation="False" CommandArgument="dettFasi" CommandName="Update"
ToolTip='<%# traduci("go2dettFasi") %>' ImageUrl="../images/naviga_m.png" OnClick="imgDettFasi_Click" />
</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="btnReset_Click"
ImageUrl="../images/reload_l.png" Visible="true" />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="RagSociale" SortExpression="RagSociale"
ItemStyle-Wrap="false">
<ItemTemplate>
<b>
<asp:Label ID="lblRagSociale" runat="server" Text='<%# Eval("RagSociale") %>' /></b>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList runat="server" ID="dlidxCliente" SelectedValue='<%# Bind("idxCliente") %>' DataSourceID="odsClienti" DataTextField="label"
DataValueField="value" />
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList runat="server" ID="dlidxCliente" SelectedValue='<%# Bind("idxCliente") %>' DataSourceID="odsClienti" DataTextField="label"
DataValueField="value" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="nomeProj" SortExpression="nomeProj"
ItemStyle-Width="500px">
<ItemTemplate>
<div class="fontNormale">
<asp:Label ID="lblnomeProj" runat="server" Text='<%# Eval("nomeProj") %>' Font-Strikeout='<%# invBool(Eval("Attivo")) %>' />
</div>
<div class="labelInput">
<asp:Label ID="lbldescrProj" runat="server" Text='<%# Eval("descrProj") %>' Font-Size="7pt" />
</div>
</ItemTemplate>
<EditItemTemplate>
<div class="fontNormale">
<asp:TextBox ID="txtnomeProj" runat="server" Text='<%# Bind("nomeProj") %>' Width="30em" />
</div>
<div class="labelInput">
<asp:TextBox ID="txtdescrProj" runat="server" Text='<%# Bind("descrProj") %>' Width="30em" TextMode="MultiLine" Height="8em" />
</div>
</EditItemTemplate>
<FooterTemplate>
<div class="fontNormale">
<asp:TextBox ID="txtnomeProj" runat="server" Text='<%# Bind("nomeProj") %>' Width="30em" />
</div>
<div class="labelInput">
<asp:TextBox ID="txtdescrProj" runat="server" Text='<%# Bind("descrProj") %>' Width="30em" TextMode="MultiLine" Height="8em" />
</div>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RealVsBudgetTime" SortExpression="budgetTime" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Panel runat="server" ID="pnlTime" CssClass='<%# colorByVal(Eval("totOre"),Eval("budgetTime"))%>' Style="font-size: 9pt;
padding: .3em;" Width="100px">
<b>
<asp:Label ID="lblRealTime" runat="server" Text='<%# Eval("totOre","{0:#,###.##}") %>' ToolTip='<%# traduci("OreErogate") %>' /></b>
/
<asp:Label ID="lblbudgetTime" runat="server" Text='<%# Eval("budgetTime","{0:#,###.##}") %>' ToolTip='<%# traduci("OreBudget") %>' />
</div>
</asp:Panel>
</ItemTemplate>
<EditItemTemplate>
<asp:Panel runat="server" ID="pnlTime" CssClass='<%# colorByVal(Eval("totOre"),Eval("budgetTime"))%>' Style="font-size: 9pt;
padding: .3em;" Width="100px">
<b>
<asp:Label ID="lblRealTime" runat="server" Text='<%# Eval("totOre","{0:#,###.##}") %>' ToolTip='<%# traduci("OreErogate") %>' /></b>
/
<asp:Label ID="lblbudgetTime" runat="server" Text='<%# Eval("budgetTime","{0:#,###.##}") %>' ToolTip='<%# traduci("OreBudget") %>' />
</div>
</asp:Panel>
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="budgetMoney" SortExpression="budgetMoney">
<ItemTemplate>
<asp:Label ID="lblbudgetMoney" runat="server" Text='<%# Eval("budgetMoney","{0:#,###.##}€") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblbudgetMoney" runat="server" Text='<%# Eval("budgetMoney","{0:#,###.##}€") %>' />
</EditItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<asp:ImageButton ID="imgDelete" runat="server" CausesValidation="False" CommandArgument='<%# Eval("idxProgetto") %>' CommandName="Delete"
ImageUrl="../images/elimina_s.png" ToolTip='<%# traduci("Delete") %>' Visible='<%# delEnabled(Eval("idxProgetto")) %>' />
<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:ImageButton ID="imgBtnNew" runat="server" ToolTip='<%# traduci("New") %>' CausesValidation="False" OnClick="btnNew_Click"
ImageUrl="~/images/new_m.png" Visible='<%# isWritable() %>' />
</HeaderTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OnInserting="recuperaFooter" DeleteMethod="deleteQuery" InsertMethod="insertQuery"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_ApplicazioneTableAdapters.AnagProgettiTableAdapter"
UpdateMethod="updateQuery" FilterExpression=" (nomeProj like '%{0}%') OR (descrProj like '%{0}%')"
onupdating="ods_Updating">
<DeleteParameters>
<asp:Parameter Name="Original_idxProgetto" Type="Int32" />
</DeleteParameters>
<FilterParameters>
<asp:SessionParameter SessionField="valoreCercato" Type="String" />
</FilterParameters>
<InsertParameters>
<asp:Parameter Name="idxCliente" Type="Int32" />
<asp:Parameter Name="nomeProj" Type="String" />
<asp:Parameter Name="descrProj" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="0" Name="idxDipendente" Type="Int32" />
<asp:SessionParameter Name="dataFrom" SessionField="_inizio" Type="DateTime" />
<asp:SessionParameter Name="dataTo" SessionField="_fine" Type="DateTime" />
<asp:SessionParameter DefaultValue="0" Name="idxCliente" SessionField="idxCli_sel" Type="Int32" />
<asp:SessionParameter DefaultValue="False" Name="showPrjArch" SessionField="showPrjArch" Type="Boolean" />
<asp:SessionParameter DefaultValue="True" Name="showPrjZeroH" SessionField="showPrjZeroH" Type="Boolean" />
<asp:SessionParameter DefaultValue="False" Name="showPrjStar" SessionField="showPrjStar" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="idxCliente" Type="Int32" />
<asp:Parameter Name="nomeProj" Type="String" />
<asp:Parameter Name="descrProj" Type="String" />
<asp:Parameter Name="Original_idxProgetto" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="odsClienti" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selClientiTableAdapter"></asp:ObjectDataSource>
<asp:Label ID="lblNumRec" runat="server" CssClass="txtMini" />
</div>
</div>
<div class="divSx" style="min-width: 175px;">
<uc3:mod_dettaglioProgetto ID="mod_dettaglioProgetto1" runat="server" />
</div>
@@ -0,0 +1,523 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using SteamWare;
using GPW_data;
namespace GPW.WebUserControls
{
public partial class mod_adminProgetti : System.Web.UI.UserControl
{
#region area standard (non modificare)
#region gestione eventi
public event EventHandler eh_resetSelezione;
public event EventHandler eh_nuovoValore;
public event EventHandler eh_selValore;
#endregion
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
/// </summary>
public void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
mod_dettaglioProgetto1.Visible = false;
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <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...
resetSelezione();
// mostro il footer oppure la riga dei dettagli x nuovo...
if (grView.FooterRow != null)
{
grView.FooterRow.Visible = true;
}
// sollevo evento nuovo valore...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
}
/// <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
ods.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...
grView.FooterRow.Visible = false;
}
/// <summary>
/// traduce gli header delle colonne
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_DataBound(object sender, EventArgs e)
{
if (grView.Rows.Count > 0)
{
LinkButton lb;
// aggiorno gli headers
foreach (TableCell cella in grView.HeaderRow.Cells)
{
try
{
lb = (LinkButton)cella.Controls[0];
lb.Text = traduci(lb.Text);
}
catch
{ }
}
int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1);
lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord);
}
else
{
lblNumRec.Text = "";
}
}
#endregion
#region area CUSTOM (da modificare)
/// <summary>
/// pagina corrente (URL finale)
/// </summary>
public string _paginaCorrente { get; set; }
/// <summary>
/// determina se siano da visualizzare i progetti già chiusi
/// </summary>
public bool showChiusi
{
get
{
return memLayer.ML.BoolSessionObj("showPrjArch");
}
set
{
memLayer.ML.setSessionVal("showPrjArch", value);
}
}
/// <summary>
/// determina se siano visibili progetti "vuoti" con zero ore caricate quindi
/// </summary>
public bool showVuoti
{
get
{
return memLayer.ML.BoolSessionObj("showPrjZeroH");
}
set
{
memLayer.ML.setSessionVal("showPrjZeroH", value);
}
}
/// <summary>
/// determina se siano visibili SOLO progetti "Starred"
/// </summary>
public bool showOnlyStarred
{
get
{
return memLayer.ML.BoolSessionObj("showPrjStar");
}
set
{
memLayer.ML.setSessionVal("showPrjStar", value);
}
}
/// <summary>
/// caricamento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
if (!Page.IsPostBack)
{
// imposto intervallo date...10 anni...
intervalloDate date = new intervalloDate();
date.fine = DateTime.Now.Date.AddDays(1);
date.inizio = date.fine.AddYears(-10);
mod_periodoAnalisi1.intervalloAnalisi = date;
// svuoto variabili sessione
memLayer.ML.emptySessionVal("idxProgetto_sel");
memLayer.ML.emptySessionVal("idxCli_sel");
filtroCli.ods = odsClienti;
filtroCli.reselFirst();
filtroCli.isChecked = false;
showChiusi = false;
showVuoti = true;
mod_dettaglioProgetto1.Visible = false;
}
filtroCli.eh_selValore += new EventHandler(filtroCli_eh_selValore);
mod_dettaglioProgetto1.eh_nuovoValore += new EventHandler(mod_dettaglioProgetto1_eh_nuovoValore);
}
/// <summary>
/// salva in variabile pagina il nome della pagina corrente
/// </summary>
protected void PagCorrente()
{
Uri MyUrl = Request.Url;
string delimStr = "/";
char[] delimiter = delimStr.ToCharArray();
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
int n = finalUrl.Length;
_paginaCorrente = finalUrl[n - 1].ToString();
}
/// <summary>
/// cambiati dati dettaglio (attivo/inattivo)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mod_dettaglioProgetto1_eh_nuovoValore(object sender, EventArgs e)
{
doUpdate();
}
/// <summary>
/// selezionato valore, filtro!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void filtroCli_eh_selValore(object sender, EventArgs e)
{
if (filtroCli.isChecked)
{
memLayer.ML.setSessionVal("idxCli_sel", filtroCli.valoreInt);
}
else
{
memLayer.ML.setSessionVal("idxCli_sel", 0);
}
grView.DataBind();
}
/// <summary>
/// elenco colonne del datagrid
/// </summary>
/// <returns></returns>
protected DataColumnCollection colonneObj()
{
DS_Applicazione.AnagProgettiDataTable tabella = new DS_Applicazione.AnagProgettiDataTable();
DataColumnCollection colonne = tabella.Columns;
return colonne;
}
/// <summary>
/// determina se sia eliminabile il record (=non usato)
/// </summary>
/// <param name="idxMaker"></param>
/// <returns></returns>
public bool delEnabled(object idxObj)
{
bool answ = isWritable();
// solo se ha diritti scrittura controllo
if (answ)
{
int trovati = 0;
// !!!FARE!!!
#if false
// controllo se ci siano tipo celle associate
trovati = MagClass.magazzino.taTipoCella.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
// controllo se ci siano blocchi associati
trovati = trovati + MagClass.magazzino.taBlocchi.getByCodMag(memLayer.ML.StringSessionObj("CodCS"), idxObj.ToString()).Rows.Count;
#endif
// controllo se ci sono record correlati...
if (trovati > 0)
{
answ = false;
}
}
return answ;
}
/// <summary>
/// evento selezione!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
memLayer.ML.setSessionVal("idxProgetto_sel", grView.SelectedDataKey["idxProgetto"]);
mod_dettaglioProgetto1.Visible = true;
if (eh_selValore != null)
{
eh_selValore(this, new EventArgs());
}
}
/// <summary>
/// determina se mostrare i progetti archiviati
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void chkShowChiusi_CheckedChanged(object sender, EventArgs e)
{
showChiusi = chkShowChiusi.Checked;
grView.DataBind();
}
/// <summary>
/// salvo in session che il prox comando è clonare...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void imgDettFasi_Click(object sender, ImageClickEventArgs e)
{
SteamWare.memLayer.ML.setSessionVal("nextObjCommand", "dettFasi");
}
/// <summary>
/// intercetto eventuale update fittizio x rimandare a pagina dett fasi
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// salvo progetto sel
memLayer.ML.setSessionVal("idxProgetto_sel", e.Keys["idxProgetto"]);
// quale comando?
string _comando = "";
if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand"))
{
_comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand");
SteamWare.memLayer.ML.emptySessionVal("nextObjCommand");
}
// verifico il tipo di richiesta (clona o update normale)
switch (_comando)
{
case "dettFasi":
// salvo idxCli...
int idxCli = 0;
try
{
idxCli = DataProxy.DP.taAP.getByIdxPrj(memLayer.ML.IntSessionObj("idxProgetto_sel"))[0].idxCliente;
}
catch
{ }
memLayer.ML.setSessionVal("idxCli_sel", idxCli);
Response.Redirect("fasi.aspx");
// blocco update!
e.Cancel = true;
break;
default:
// faccio update!
break;
}
}
/// <summary>
/// effettua update controllo
/// </summary>
public void doUpdate()
{
resetSelezione();
}
/// <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>
/// restituisce una classe css a seconda dei valori passati:
/// green: bdgt > real
/// orange: real > bdgt*warning
/// red: real > bdgt
/// std: errore...
/// </summary>
/// <param name="real"></param>
/// <param name="bdgt"></param>
/// <returns></returns>
public string colorByVal(object real, object bdgt)
{
string answ = "badgeStd";
try
{
double valoreReal = Convert.ToDouble(real);
double valoreBdget = Convert.ToDouble(bdgt);
double valoreWarn = Convert.ToDouble(bdgt) * Convert.ToDouble(memLayer.ML.confReadString("warningRatioPerc")) / 100;
if (valoreReal >= valoreBdget)
{
answ = "badgeRosso";
}
else if (valoreReal >= valoreWarn)
{
answ = "badgeArancio";
}
else
{
answ = "badgeVerde";
}
}
catch
{
}
return "ui-corner-all " + answ;
}
/// <summary>
/// cambia impsotazione show/hide progetti con ore a zero...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void chkShowVuoti_CheckedChanged(object sender, EventArgs e)
{
showVuoti = chkShowVuoti.Checked;
grView.DataBind();
}
protected void chkShowOnlyStarred_CheckedChanged(object sender, EventArgs e)
{
showOnlyStarred = chkShowOnlyStarred.Checked;
grView.DataBind();
}
/// <summary>
/// risponde alla domanda se l'utente abbia permesso tipo writable (S) nel permessi2funzione
/// </summary>
/// <returns></returns>
public bool isWritable()
{
bool answ = false;
if (_paginaCorrente == null)
{
PagCorrente();
}
answ = user_std.UtSn.isPageWriteEnabled(_paginaCorrente) && chkLicOk;
return answ;
}
/// <summary>
/// controllo stato licenze!
/// </summary>
public bool chkLicOk
{
get
{
return (licenzeGPW.utentiAttivi < licenzeGPW.licenzeAttive);
}
}
/// <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 recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e)
{
if (chkLicOk)
{
//recupero la riga footer...
DataColumnCollection colonne = colonneObj();
string nomeCol;
string tipoColonna = "";
foreach (DataColumn colonna in colonne)
{
nomeCol = colonna.ColumnName;
// cerco un textbox o quello che sia...
if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null)
{
tipoColonna = "textBox";
}
else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null)
{
tipoColonna = "dropDownList";
}
else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null)
{
tipoColonna = "checkBox";
}
// in base al tipo salvo negli inputparameters dell'ODS
switch (tipoColonna)
{
case "textBox":
e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text;
break;
case "dropDownList":
e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue;
break;
case "checkBox":
e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked;
break;
default:
break;
}
tipoColonna = "";
}
}
else
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.DataBind();
}
}
/// <summary>
/// check licenze in fase di update...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
if (!licenzeGPW.checkLicenze)
{
// annullo insert se licenze sforate...
e.Cancel = true;
grView.EditIndex = -1;
grView.DataBind();
}
}
#endregion
}
}
+105
View File
@@ -0,0 +1,105 @@
//------------------------------------------------------------------------------
// <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_adminProgetti {
/// <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>
/// chkShowChiusi 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 chkShowChiusi;
/// <summary>
/// filtroCli control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::mod_filtro filtroCli;
/// <summary>
/// chkShowVuoti 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 chkShowVuoti;
/// <summary>
/// chkShowOnlyStarred 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 chkShowOnlyStarred;
/// <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;
/// <summary>
/// odsClienti 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 odsClienti;
/// <summary>
/// lblNumRec 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 lblNumRec;
/// <summary>
/// mod_dettaglioProgetto1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::GPW.WebUserControls.mod_dettaglioProgetto mod_dettaglioProgetto1;
}
}
+111
View File
@@ -0,0 +1,111 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_approvaTimbr.ascx.cs" Inherits="GPW.WebUserControls.mod_approvaTimbr" %>
<%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<% 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" />
<asp:ObjectDataSource ID="odsDip" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TypeName="GPW_data.DS_UtilityTableAdapters.v_selDipendentiTableAdapter"></asp:ObjectDataSource>
</div>
</div>
<div class="divDx">
<label for="arrot">
Min. arrot.
</label>
<asp:TextBox runat="server" ID="txtArrot" name="arrot" Text="5" Width="2em" />
</div>
</div>
<div class="clearDiv">
<asp:GridView ID="grView" nome="grView" runat="server" AllowPaging="True" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataOra,idxDipendente" CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="Smaller" Width="640px" OnSelectedIndexChanged="grView_SelectedIndexChanged">
<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>
Nessun record da approvare
</EmptyDataTemplate>
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblDip" runat="server" Text='<%# cognomeNome(Eval("idxDipendente")) %>' Visible='<%# userCanApprove %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="dataOra" SortExpression="dataOra" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblData" runat="server" Text='<%# Eval("dataOra", "{0:yyyy-MM-dd, ddd - HH:mm}") %>' />
</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" />
<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" />
<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>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton runat="server" ID="lbApprova" Visible='<%# userCanApprove %>' Text="Approva" CommandArgument="approva" CommandName="Select" CssClass="btnNew btnVerde" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="Original_{0}" SelectMethod="getNonAppr" TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureTableAdapter" DeleteMethod="DeleteNonAppr" UpdateMethod="updateSwapInOut" ondeleted="ods_Deleted" onupdated="ods_Updated" >
<DeleteParameters>
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
</DeleteParameters>
<SelectParameters>
<asp:SessionParameter SessionField="idxDip_sel" Name="idxDipendente" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Original_dataOra" Type="DateTime" />
<asp:Parameter Name="Original_idxDipendente" Type="Int32" />
</UpdateParameters>
</asp:ObjectDataSource>
</div>
@@ -0,0 +1,186 @@
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;
namespace GPW.WebUserControls
{
public partial class mod_approvaTimbr : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
grView.PageSize = utils.pageSize;
if (!Page.IsPostBack)
{
filtroDip.ods = odsDip;
filtroDip.reset();
}
filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore);
}
/// <summary>
/// seleziono
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void filtroDip_eh_selValore(object sender, EventArgs e)
{
// imposto ods
checkFixOds();
}
/// <summary>
/// imposto ODS
/// </summary>
private void checkFixOds()
{
if (filtroDip.valoreInt != -1)
{
IdxDipSel = filtroDip.valoreInt;
ods.SelectMethod = "getNonApprByDip";
}
else
{
//memLayer.ML.emptySessionVal("idxDip_sel");
IdxDipSel = -1;
ods.SelectMethod = "getNonAppr";
}
grView.DataBind();
}
/// <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 IdxDipSel
{
get
{
int idx = -1;
try
{
idx = memLayer.ML.IntSessionObj("idxDip_sel");
}
catch
{ }
return idx;
}
set
{
memLayer.ML.setSessionVal("idxDip_sel", value);
}
}
/// <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>
/// wrapper x salvare approvazioni
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
{
// salvo approvazione
DateTime dataOra = DateTime.Now;
int idxDip = 0;
try
{
dataOra = Convert.ToDateTime(grView.SelectedDataKey["dataOra"].ToString());
idxDip = Convert.ToInt32(grView.SelectedDataKey["idxDipendente"].ToString());
logger.lg.scriviLog(string.Format("Approvazione per dip {0} in data/ora {1}", idxDip, dataOra), tipoLog.INFO);
// recupero tab timbr non approvate x dip
DS_Applicazione.TimbratureRow rigaTimb = DataProxy.DP.taTimb.getByDipDataOra(idxDip, dataOra)[0];
// effettua arrotondamento (aggiunge/toglie)
int minOrig = dataOra.Minute;
int secOrig = dataOra.Second;
int minArr = 0;
int step = Convert.ToInt32(txtArrot.Text);
if (rigaTimb.entrata)
{
minArr = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(minOrig / step))) * step;
}
else
{
minArr = Convert.ToInt32(Math.Floor(Convert.ToDouble(minOrig / step))) * step;
}
// modifico data del record
DataProxy.DP.taTimb.stp_Timbr_modifica(idxDip, dataOra, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
// approvo con data modificata
DataProxy.DP.taTimb.stp_Timbr_Approva(idxDip, dataOra.AddMinutes(minArr - minOrig).AddSeconds(-secOrig));
}
catch
{ }
// update!
grView.SelectedIndex = -1;
checkFixOds();
}
/// <summary>
/// post update resetto filtro...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
checkFixOds();
}
/// <summary>
/// post delete resetto filtro...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
{
checkFixOds();
}
}
}
+60
View File
@@ -0,0 +1,60 @@
//------------------------------------------------------------------------------
// <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_approvaTimbr {
/// <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>
/// txtArrot 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 txtArrot;
/// <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;
}
}
+158
View File
@@ -0,0 +1,158 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_attivitaIns.ascx.cs" Inherits="GPW.WebUserControls.mod_attivitaIns" %>
<%@ Register Src="mod_dateTimeJQM.ascx" TagName="mod_dateTimeJQM" TagPrefix="uc1" %>
<div data-role="header" data-position="fixed">
<h3>
Edit / Nuova Attività</h3>
</div>
<div data-role="content" style="margin: -10px;">
<asp:FormView ID="frViewRA" runat="server" DataKeyNames="idxRA" DataSourceID="odsRA" OnItemCommand="frViewRA_ItemCommand"
Width="100%">
<EditItemTemplate>
<label for="ddlProgetto" style="font-size: xx-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
</asp:DropDownList>
<%--<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>--%>
<label for="ddlFase" style="font-size: xx-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
data-mini="true" OnDataBound="ddlFase_DataBound">
</asp:DropDownList>
<%--<asp:ObjectDataSource ID="odsFase" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByConditio"
TypeName="GPW_data.DS_UtilityTableAdapters.v_selFasiTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="ddlProgetto" DefaultValue="0" Name="conditio" PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>--%>
<uc1:mod_dateTimeJQM ID="mod_dateTimeJQM1" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
<uc1:mod_dateTimeJQM ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
<br />
descrizione:
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
<div class="ui-grid-b">
<div class="ui-block-a">
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" data-icon="check"
data-role="button" data-theme="b" data-mini="true" />
</div>
<div class="ui-block-b">
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" data-icon="refresh"
data-role="button" data-theme="c" data-mini="true" />
</div>
<div class="ui-block-c">
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" data-icon="minus"
data-role="button" data-theme="e" data-mini="true" />
</div>
</div>
</EditItemTemplate>
<InsertItemTemplate>
<label for="ddlProgetto" style="font-size: xx-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
</asp:DropDownList>
<label for="ddlFase" style="font-size: xx-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
data-mini="true" OnDataBound="ddlFase_DataBound">
</asp:DropDownList>
<uc1:mod_dateTimeJQM ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
<uc1:mod_dateTimeJQM ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
<br />
descrizione:
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
<div class="ui-grid-a">
<div class="ui-block-a">
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" data-icon="plus"
data-role="button" data-theme="b" />
</div>
<div class="ui-block-b">
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" data-icon="refresh"
data-role="button" data-theme="c" />
</div>
</div>
</InsertItemTemplate>
<ItemTemplate>
<label for="ddlProgetto" style="font-size: xx-small;">
Progetto
</label>
<asp:DropDownList ID="ddlProgetto" name="ddlProgetto" runat="server" DataSourceID="odsProgetto" DataTextField="label" DataValueField="value"
AutoPostBack="True" OnSelectedIndexChanged="ddlProgetto_SelectedIndexChanged" data-mini="true">
</asp:DropDownList>
<label for="ddlFase" style="font-size: xx-small;">
Fase
</label>
<asp:DropDownList ID="ddlFase" name="ddlFase" runat="server" DataSourceID="odsFase" DataTextField="label" DataValueField="value"
data-mini="true" OnDataBound="ddlFase_DataBound">
</asp:DropDownList>
<uc1:mod_dateTimeJQM ID="dtjInizio" runat="server" valoreDateTime='<%# Bind("inizio") %>' labelData="Inizio" labelOra="Ora" />
<uc1:mod_dateTimeJQM ID="dtjFine" runat="server" valoreDateTime='<%# Bind("fine") %>' labelData="Fine" labelOra="Ora" />
<br />
descrizione:
<asp:TextBox ID="descrizioneTextBox" runat="server" Text='<%# Bind("descrizione") %>' TextMode="MultiLine" Height="3em" />
<div class="ui-grid-a">
<div class="ui-block-a">
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" />
</div>
<div class="ui-block-b">
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
</div>
</div>
</ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="odsRA" runat="server" DeleteMethod="deleteQuery" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getByKey" TypeName="GPW_data.DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter" UpdateMethod="updateQuery"
OnUpdating="odsRA_Updating" OnInserted="odsRA_Inserted" OnInserting="odsRA_Inserting" OnUpdated="odsRA_Updated" OnDeleted="odsRA_Deleted">
<DeleteParameters>
<asp:Parameter Name="Original_idxRA" Type="Int32" />
</DeleteParameters>
<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>
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="idxRA" SessionField="idxRASel" Type="Int32" />
</SelectParameters>
<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"
OldValuesParameterFormatString="original_{0}">
<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_selFasiTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="conditio" SessionField="idxProjSel" Type="Int32" />
<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>
+235
View File
@@ -0,0 +1,235 @@
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;
namespace GPW.WebUserControls
{
public partial class mod_attivitaIns : System.Web.UI.UserControl
{
/// <summary>
/// pagina di return a fine editing
/// </summary>
protected string returnPage
{
get
{
string answ = memLayer.ML.confReadString("baseUrl");
try
{
answ = memLayer.ML.StringSessionObj("returnPage");
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("returnPage", value);
}
}
/// <summary>
/// RA selezionata
/// </summary>
protected int idxRASel
{
get
{
return memLayer.ML.IntSessionObj("idxRASel");
}
set
{
memLayer.ML.setSessionVal("idxRASel", value);
}
}
/// <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>
/// 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>
/// al primo load ricarico i dati correnti (se ci sono)
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
DropDownList ddlFase_int;
if (!Page.IsPostBack)
{
// verifico se ci sia una richiesta di editing...
if (idxRASel > 0)
{
frViewRA.ChangeMode(FormViewMode.Edit);
// pre-seleziono idx progetto x ods fase...
idxFaseSel = DataProxy.DP.taRA.getByKey(idxRASel)[0].idxFase;
idxProjSel = idxPrjByFase(idxFaseSel);
// imposto valori selezionati
DropDownList ddlProj_int = (DropDownList)frViewRA.FindControl("ddlProgetto");
ddlProj_int.SelectedValue = idxProjSel.ToString();
ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
ddlFase_int.SelectedValue = idxFaseSel.ToString();
}
else // è insert nuova!!!
{
frViewRA.ChangeMode(FormViewMode.Insert);
mod_dateTimeJQM dtjInizio = (mod_dateTimeJQM)frViewRA.FindControl("dtjInizio");
mod_dateTimeJQM dtjFine = (mod_dateTimeJQM)frViewRA.FindControl("dtjFine");
dtjInizio.valoreDateTime = dataRif.AddHours(DateTime.Now.Hour).AddMinutes(DateTime.Now.Minute);
dtjFine.valoreDateTime = dtjInizio.valoreDateTime.AddMinutes(memLayer.ML.confReadInt("defRegAttMin"));
}
}
}
/// <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>
/// 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();
}
/// <summary>
/// evento richiesta update
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void odsRA_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
// recupero valore fase selezionato...
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
}
protected void frViewRA_ItemCommand(object sender, FormViewCommandEventArgs e)
{
// se è cancel ritorno ad altra pagina!
if (e.CommandName == "Cancel")
{
Response.Redirect(returnPage);
}
}
protected void odsRA_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
{
// recupero valori non direttamente linkati...
DropDownList ddlFase_int = (DropDownList)frViewRA.FindControl("ddlFase");
e.InputParameters["idxFase"] = ddlFase_int.SelectedValue;
e.InputParameters["idxDipendente"] = DataProxy.idxDipendente;
}
protected void odsRA_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
Response.Redirect(returnPage);
}
protected void odsRA_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
Response.Redirect(returnPage);
}
protected void odsRA_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
{
Response.Redirect(returnPage);
}
/// <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
{ }
}
}
}
+51
View File
@@ -0,0 +1,51 @@
//------------------------------------------------------------------------------
// <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_attivitaIns {
/// <summary>
/// frViewRA 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.FormView frViewRA;
/// <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;
}
}
+115
View File
@@ -0,0 +1,115 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_autocomplete.ascx.cs" Inherits="GPW.WebUserControls.mod_autocomplete" %>
<%if (false)
{ %>
<%--<webopt:BundleReference ID="BundleReference1" runat="server" Path="~/Content/css" />
<webopt:BundleReference ID="BundleReference2" runat="server" Path="~/Content/themes/base/css" />--%>
<%} %>
<style>
.ui-autocomplete {
max-height: 36em;
min-width: 20em;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
/* IE 6 doesn't support max-height
* we use height instead, but this forces the menu to always be this tall
*/
* html .ui-autocomplete {
height: 36em;
}
</style>
<script>
// funzione autocomplete
function set<%=txtSel.ClientID %>()
{
$("#<%=txtSel.ClientID %>").autocomplete({
source: function (request, response) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "<%=txtServiceUrl.Text %>",
data: "{'prefixText':'" + request.term + "'}",
dataType: "json",
async: true,
success: function (data) {
//response(data.d);
response($.map(data.d, function (item) {
return {
label: item.split('#')[0],
val: item.split('#')[1]
}
}))
},
error: function (result) {
alert("Impossibile caricare i dati!");
}
});
},
select: function (e, i) {
$("#<%=hiddenFieldID.ClientID %>").val(i.item.val);
$("#<%=txtSel.ClientID %>").val(i.item.label);
document.getElementById('<%=btnSearch.ClientID%>').click();
//$("#<%=btnSearch.ClientID %>").click();
},
minLength: <%=txtMinCharAutoCom.Text %>
});
}
// funzione x intercettare focusout...
function fcsOut<%=txtSel.ClientID %>()
{
$("#<%=txtSel.ClientID %>").focusout(function() {
// controllo se hidden diverso da txtsel...
var str =$("#<%=txtSel.ClientID %>").val()
if(str.search($("#<%=hiddenFieldID.ClientID %>").val())<0)
{
$("#<%=hiddenFieldID.ClientID %>").val($("#<%=txtSel.ClientID %>").val());
}
// chiamo search...
document.getElementById('<%=btnSearch.ClientID%>').click();
// alert...
//alert('Valore hidden: ' +$("#<%=hiddenFieldID.ClientID %>").val());
});
}
// aggancio evento doc pronto con jQuery...
$(function () {
set<%=txtSel.ClientID %>();
fcsOut<%=txtSel.ClientID %>();
});
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(function () {
$(function () {
// chiamate jquery da rieseguire post ajax update x partial page render
$(function () {
set<%=txtSel.ClientID %>();
fcsOut<%=txtSel.ClientID %>();
});
});
});
</script>
<%--controlli "principali"--%>
<div class="input-group input-group-sm">
<span class="input-group-btn" style="text-align: left;">
<asp:LinkButton runat="server" ID="btnSearch" CssClass="btn btn-primary btn-sm" OnClick="btnSearch_Click">
<i class="fa fa-search"></i>&nbsp;
<asp:Label runat="server" ID="lblField"><%: traduci("Search") %></asp:Label>
</asp:LinkButton>
</span>
<asp:TextBox runat="server" ID="txtSel" CssClass="searchinput form-control" OnTextChanged="txtSel_TextChanged" AutoPostBack="True" TextMode="SingleLine" AutoCompleteType="Search" />
<%--controlli "accessori"--%>
<asp:TextBox runat="server" ID="txtMinCharAutoCom" Text="2" Visible="false" Width="1em" />
<asp:TextBox runat="server" ID="txtServiceUrl" Text="Services/WS_data.asmx/Test" Visible="false" Width="1em" />
<span class="input-group-btn">
<asp:LinkButton runat="server" ID="lnkReset" class="btn btn-primary btn-sm" OnClick="lnkReset_Click"><i class="fa fa-undo"></i></asp:LinkButton>
</span>
</div>
<asp:TextBox runat="server" ID="hiddenFieldID" AutoPostBack="true" OnTextChanged="hiddenFieldID_TextChanged" ViewStateMode="Enabled" Width="0px" Font-Size="6pt" BackColor="Transparent" BorderStyle="None" Height="0px" />
<style>
.ui-autocomplete-category {
font-weight: bold;
padding: .2em .4em;
margin: .8em 0 .2em;
line-height: 1.5;
}
</style>
@@ -0,0 +1,329 @@
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;
namespace GPW.WebUserControls
{
public partial class mod_autocomplete : System.Web.UI.UserControl
{
/// <summary>
/// evento valore selezionato
/// </summary>
public event EventHandler eh_valSelezionato;
/// <summary>
/// evento valore selezionato
/// </summary>
public event EventHandler eh_reset;
/// <summary>
/// segnaposto x casella testuale autocomplete
/// </summary>
public string placeholder { get; set; }
/// <summary>
/// UID formattato con "_"
/// </summary>
public string uid
{
get
{
// fix brutale: nelle pagine master c'è un ctl00_ iniziale di troppo...
return this.UniqueID.Replace("$", "_").Replace("ctl00_", "").Replace("ctl01_", "");
}
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
defaultVal = "";
txtSel.Attributes["placeholder"] = placeholder;
}
}
/// <summary>
/// wrapper traduzione
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(object lemma)
{
return user_std.UtSn.Traduci(lemma.ToString());
}
protected void txtSel_TextChanged(object sender, EventArgs e)
{
if (txtSel.Text.Trim() == "")
{
hiddenFieldID.Text = defaultVal;
_valore = defaultVal;
}
if (eh_valSelezionato != null)
{
eh_valSelezionato(this, new EventArgs());
}
}
/// <summary>
/// salvo valore selezionato!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void hiddenFieldID_TextChanged(object sender, EventArgs e)
{
salvaSelezione();
}
/// <summary>
/// valore selezionato dal controllo (RW local)
/// </summary>
protected string _valore
{
get
{
return memLayer.ML.StringSessionObj(uid + "_sel");
}
set
{
memLayer.ML.setSessionVal(uid + "_sel", value);
}
}
/// <summary>
/// salva evento selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPost_Click(object sender, EventArgs e)
{
salvaSelezione();
}
private void salvaSelezione()
{
_valore = hiddenFieldID.Text;
if (eh_valSelezionato != null)
{
eh_valSelezionato(this, new EventArgs());
}
}
/// <summary>
/// valore (chiave) selezionato dal controllo (R public)
/// </summary>
public string valore
{
get
{
string answ = "";
try
{
answ = hiddenFieldID.Text;
}
catch
{
answ = txtSel.Text.Trim();
}
if (answ == "")
{
answ = txtSel.Text.Trim();
}
return answ;
}
set
{
hiddenFieldID.Text = value;
}
}
/// <summary>
/// label selezionato dal controllo (R public)
/// </summary>
public string selezione
{
get
{
return txtSel.Text;
}
set
{
txtSel.Text = value;
}
}
/// <summary>
/// label dell'etichetta di ricerca
/// </summary>
public string labelRicerca
{
set
{
lblField.Text = value;
}
}
/// <summary>
/// label dell'etichetta di ricerca CON TRADUZIONE
/// </summary>
public string labelRicercaTrad
{
set
{
lblField.Text = traduci(value);
}
}
/// <summary>
/// num minimo caratteri x autocomplete
/// </summary>
public Int32 minCharAutocomplete
{
get
{
return Convert.ToInt32(txtMinCharAutoCom.Text);
}
set
{
txtMinCharAutoCom.Text = value.ToString();
}
}
/// <summary>
/// path del webservice (compreso metodo)
/// nb: DI NORMA fornisce risultati nel formato label#valore
/// </summary>
public string ServicePath
{
get
{
return txtServiceUrl.Text;
}
set
{
txtServiceUrl.Text = value;
}
}
/// <summary>
/// imposta visibilità della textBox delle chiavi
/// </summary>
public bool showKey
{
set
{
if (!value)
{
hiddenFieldID.Width = Unit.Pixel(0);
}
}
}
/// <summary>
/// imposta la stringa tooltip
/// </summary>
public string toolTip
{
set
{
txtSel.ToolTip = value;
}
}
/// <summary>
/// larghezza textbox in unità EM
/// </summary>
public int textEmWidht
{
set
{
txtSel.Width = Unit.Parse(string.Format("{0}em", value));
}
}
/// <summary>
/// larghezza textbox in unità %
/// </summary>
public int textEmPerc
{
set
{
txtSel.Width = Unit.Parse(string.Format("{0}%", value));
}
}
/// <summary>
/// imposta il focus sulla textBox
/// </summary>
public void setFocus()
{
txtSel.Focus();
}
/// <summary>
/// permette di passare altri parametri di contesto al metodo invocato x autocomplete
/// </summary>
public string contextKey
{
get
{
return txtSel.AccessKey;
}
set
{
txtSel.AccessKey = value;
}
}
/// <summary>
/// tabIndex del controllo
/// </summary>
public short TabIndex
{
set
{
txtSel.TabIndex = value;
}
}
/// <summary>
/// valore di default (x reset)
/// </summary>
public string defaultVal { get; set; }
/// <summary>
/// resetta controllo
/// </summary>
public void doReset()
{
// resetto selezione e ricerca!
txtSel.Text = "";
hiddenFieldID.Text = defaultVal;
_valore = defaultVal;
}
/// <summary>
/// effettuato reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkReset_Click(object sender, EventArgs e)
{
doReset();
if (eh_reset != null)
{
eh_reset(this, new EventArgs());
}
}
/// <summary>
/// stile x la label
/// </summary>
public Unit labelWidth
{
set
{
lblField.Width = value;
}
}
/// <summary>
/// dummy call x indicare selezione...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
salvaSelezione();
}
}
}
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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_autocomplete {
/// <summary>
/// btnSearch 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.LinkButton btnSearch;
/// <summary>
/// lblField 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 lblField;
/// <summary>
/// txtSel 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 txtSel;
/// <summary>
/// txtMinCharAutoCom 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 txtMinCharAutoCom;
/// <summary>
/// txtServiceUrl 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 txtServiceUrl;
/// <summary>
/// lnkReset 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.LinkButton lnkReset;
/// <summary>
/// hiddenFieldID 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 hiddenFieldID;
}
}
+168
View File
@@ -0,0 +1,168 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_bCodeTimb.ascx.cs" Inherits="GPW.WebUserControls.mod_bCodeTimb" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<asp:Panel runat="server" ID="pnlAll" CssClass="stileAttesa" Height="100%">
<div style="height: 100%;">
<div style="float: none; text-align: center; margin: auto;">
<div class="fullPageHeader">
<div style="float: left; text-align: left;">
<asp:Label runat="server" ID="lblPostazione" />
</div>
<div style="float: right;">
<asp:Label runat="server" ID="lblPrinter" />
<br />
&nbsp;
</div>
<div>
<asp:Label runat="server" ID="lblCurrentPage" Text="Postazione Timbrature Barcode" Font-Size="16pt" ForeColor="White" />
<br />
<asp:HyperLink runat="server" ID="hlMenu" NavigateUrl="~/Default.aspx" Text="Main Menu" />
</div>
</div>
</div>
<div style="float: none; text-align: center; margin: auto;">
<div class="clearDiv">
<asp:Label runat="server" ID="lblDipendenteAttivo" Font-Size="36pt" Text="..." />
</div>
<div class="msgBoxBarcode">
<asp:Label runat="server" ID="lblMessaggi" Text="attesa input utente" Font-Size="18pt" />
</div>
</div>
<div>
<div class="divSx" style="padding: 4px; text-align: left; min-height: 400px; min-width: 200px; width: 19%;">
<asp:Panel runat="server" ID="pnlBtnIn">
<asp:Button runat="server" ID="btnEntrata" Text="Entrata" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnEntrata_Click" />
</asp:Panel>
</div>
<div class="divDx" style="padding: 4px; text-align: right; min-height: 400px; min-width: 200px; width: 19%;">
<asp:Panel runat="server" ID="PaneOut">
<asp:Button runat="server" ID="btnUscita" Text="Uscita" Width="200px" Height="300px" CssClass="fontTitolo" OnClick="btnUscita_Click" />
</asp:Panel>
</div>
<div class="divCenter" style="min-height: 400px; width: 50%;">
<div>
<asp:Label runat="server" ID="lblBarcode" Text="Barcode" />
<br />
<asp:TextBox runat="server" ID="txtBarcode" Height="60px" Width="400px" Font-Size="32pt" AutoPostBack="true" Style="text-align: center"
OnTextChanged="txtBarcode_TextChanged" TextMode="Password" />
</div>
<br />
<div class="divCenter">
<asp:GridView ID="grView" runat="server" AllowPaging="True" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="dataLav,idxDipendente"
CellPadding="4" ForeColor="#333333" GridLines="None" Font-Size="9pt" Width="100%">
<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" />
<Columns>
<asp:TemplateField HeaderText="data" SortExpression="dataLav" ItemStyle-Wrap="false" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("dataLav", "{0:dd-MM}") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_1" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("entrata_1","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_1" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("uscita_1","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_2" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("entrata_2","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_2" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Bind("uscita_2","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ent" SortExpression="entrata_3" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# Bind("entrata_3","{0:HH:mm}") %>' ForeColor="#226622" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Usc" SortExpression="uscita_3" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="Label8" runat="server" Text='<%# Bind("uscita_3","{0:HH:mm}") %>' ForeColor="#222266" Font-Size="X-Small" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="H lav" SortExpression="h_lav" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
<ItemTemplate>
<b>
<asp:Label ID="Label11" runat="server" Text='<%# Bind("h_lav","{0:0.00}") %>' />
</b>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right">
<ItemTemplate>
<b>
<asp:Label ID="lblIsOk" runat="server" Text="*" ForeColor="Red" Visible='<%# invBool(Eval("isOk")) %>' />
</b>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}"
SelectMethod="getLastByUser" TypeName="GPW_data.DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter" UpdateMethod="Update">
<SelectParameters>
<asp:SessionParameter SessionField="idxDipendente" Name="idxDipendente" Type="Int32" />
<asp:Parameter Name="num2show" DefaultValue="10" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:Panel ID="pnlTimer" runat="server" ScrollBars="None">
<asp:Label runat="server" ID="lblNextTimbr" />
<%--<asp:Image ID="imgRun" runat="server" ImageUrl="~/images/ajax-loader.gif" />--%>
<b>
<asp:Label runat="server" ID="lblCountDown" CssClass="fontMedio" /></b>
<asp:Timer ID="timerConf" runat="server" Interval="500" Enabled="false">
</asp:Timer>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<%--<div class="clearDiv clockBar" style="height: 72px;">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="divSx">
<asp:Label runat="server" ID="lblData" Font-Size="48pt" Text="..." />
</div>
<div class="divDx">
<asp:Label runat="server" ID="lblRTC" Font-Size="48pt" Text="..." Font-Bold="true" />
</div>
<asp:Timer ID="timerClock" runat="server" Interval="5000" Enabled="true">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</div>--%>
<%--<div class="clearDiv clockBar">
<div class="clock">
<div id="Date">
</div>
<ul>
<li id="hours"></li>
<li id="point">:</li>
<li id="min"></li>
<li id="point">:</li>
<li id="sec"></li>
</ul>
</div>
</div>--%>
</div>
</asp:Panel>
+488
View File
@@ -0,0 +1,488 @@
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;
namespace GPW.WebUserControls
{
public partial class mod_bCodeTimb : System.Web.UI.UserControl
{
/// <summary>
/// salva il dato se il prox sia entrata...
/// </summary>
protected bool nextIsEntrata
{
get
{
return memLayer.ML.BoolSessionObj("nextIsEntrata");
}
set
{
memLayer.ML.setSessionVal("nextIsEntrata", value);
}
}
/// <summary>
/// dataora associata all'evento scansioen BCode
/// </summary>
protected DateTime orarioBCode
{
get
{
return (DateTime)memLayer.ML.objSessionObj("dataOraBCode");
}
set
{
memLayer.ML.setSessionVal("dataOraBCode", value);
}
}
/// <summary>
/// indica i secondi di countdown rimasti x auto-commit
/// </summary>
protected int countDown
{
get
{
return memLayer.ML.IntSessionObj("countDownBCode");
}
set
{
memLayer.ML.setSessionVal("countDownBCode", value);
}
}
/// <summary>
/// pagina corrente
/// </summary>
protected string paginaCorrente
{
get
{
string answ = "";
Uri MyUrl = Request.Url;
string delimStr = "/";
char[] delimiter = delimStr.ToCharArray();
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
int n = finalUrl.Length;
answ = finalUrl[n - 1].ToString();
return answ;
}
}
/// <summary>
/// prox messaggio utente (da mostrare)
/// </summary>
protected string nextUsrMsg
{
get
{
string answ = "";
try
{
answ = memLayer.ML.StringSessionObj("nextUsrMsg");
}
catch
{ }
if (answ == "")
{
answ = "...waiting...";
}
return answ;
}
set
{
memLayer.ML.setSessionVal("nextUsrMsg", value);
}
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
chekIpPostazione();
if (!Page.IsPostBack)
{
DataProxy.idxDipendente = -1;
bool visibile = false;
setCtrlState(visibile);
checkBarcode();
}
timerConf.Tick += new EventHandler<EventArgs>(timerConf_Tick);
#if false
timerClock.Tick += new EventHandler<EventArgs>(timerClock_Tick);
#endif
lblDipendenteAttivo.Text = nextUsrMsg;
txtBarcode.Focus();
}
#if false
/// <summary>
/// timer x update orario indicato
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void timerClock_Tick(object sender, EventArgs e)
{
DateTime adesso = DateTime.Now;
lblData.Text = string.Format("{0:ddd} {0:dd/MM/yyyy}", adesso);
lblRTC.Text = string.Format("{0:HH:mm}", adesso);
}
#endif
/// <summary>
/// verifica IP della postazione chiamante, se non è tra quelli permessi (o non è indicato "*") rimanda a pagina precedente...
/// </summary>
private void chekIpPostazione()
{
// recupero IP
string IPv4 = Request.UserHostName;
// controllo se IP locale = approvata...
if (!memLayer.ML.confReadString("ipv4StazBCode").Contains(IPv4) && memLayer.ML.confReadString("ipv4StazBCode") != "*")
{
Response.Redirect("../Default.aspx");
}
}
/// <summary>
/// allo scadere del timer controllo countdown!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void timerConf_Tick(object sender, EventArgs e)
{
contatorePag = 0;
if (countDown > 1)
{
countDown = countDown - 1;
lblCountDown.Text = countDown.ToString();
txtBarcode.Focus();
}
else
{
// salvo operazione di default!
registraTimbratura(nextIsEntrata);
// reset visualizzazione
setCtrlState(false);
timerConf.Enabled = false;
// reset valori
Response.Redirect(paginaCorrente);
}
}
/// <summary>
/// imposta lo stato visibile dei controlli
/// </summary>
/// <param name="visibile"></param>
private void setCtrlState(bool visibile)
{
pnlTimer.Visible = visibile;
//imgRun.Visible = visibile;
if (DataProxy.idxDipendente > 0)
{
grView.Visible = true;
}
else
{
grView.Visible = visibile;
}
}
/// <summary>
/// verifica in che stato debbano essere i buttons (se barcode utente valido)
/// </summary>
private void checkButtons()
{
// controllo se il prox comando DOVREBBE essere entrata o uscita
nextIsEntrata = true;
// controllo dipendente
if (DataProxy.idxDipendente > 0)
{
// ricavo ultima timbratura..
nextIsEntrata = timbratrice.nextIsEntrata(DataProxy.idxDipendente);
string tipoTimb = "uscita";
// di conseguenza cambio abilitazione ad un buttons
if (nextIsEntrata)
{
btnEntrata.CssClass = "btnPreferred";
btnUscita.CssClass = "btnStd";
tipoTimb = "ENTRATA";
}
else
{
btnEntrata.CssClass = "btnStd";
btnUscita.CssClass = "btnPreferred";
tipoTimb = "USCITA";
}
lblNextTimbr.Text = string.Format("Allo scadere del timer verrà registrata una timbratura di <b>{0}</b>", tipoTimb);
}
else
{
btnEntrata.CssClass = "btnStd";
btnUscita.CssClass = "btnStd";
lblNextTimbr.Text = "";
}
}
/// <summary>
/// controlla se ci sia un barcode valido, tra:
/// - idxDipendente (INT, eventuale padding di zero...)
/// - matr dipendente
/// - cf dipendente
/// </summary>
private void checkBarcode()
{
if (barcodeIn != "")
{
// mostro i buttons enabled
btnEntrata.Enabled = true;
btnUscita.Enabled = true;
lblMessaggi.Text = "Barcode";
switch (tipoBCode)
{
case tipoCodiceBarcode.idxDipendente:
// calcolo idxOperatore...
int idxOper = 0;
try
{
idxOper = Convert.ToInt32(barcodeIn.ToLowerInvariant().Replace("idx", ""));
}
catch
{ }
// controllo esista il codice idxDipendente scansionato
if (DataProxy.DP.taDipendenti.getByIdx(idxOper).Rows.Count == 0)
{
setCtrlState(false);
DataProxy.idxDipendente = 0;
orarioBCode = DateTime.Now;
timerConf.Enabled = false;
nextUsrMsg = "...waiting...";
lblMessaggi.Text += " - codice non valido / non trovato.";
pnlAll.CssClass = "stileComandoKo";
}
else
{
setCtrlState(true);
DataProxy.idxDipendente = idxOper;
orarioBCode = DateTime.Now;
DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(idxOper)[0];
nextUsrMsg = string.Format("{0} {1} - {2: HH:mm:ss}", rigaDip.Cognome, rigaDip.Nome, orarioBCode);
lblMessaggi.Text += " - impostato dipendente!";
pnlAll.CssClass = "stileComandoOk";
// faccio partire countdown
countDown = SteamWare.memLayer.ML.confReadInt("secTimeoutBCode");
lblCountDown.Text = countDown.ToString();
timerConf.Enabled = true;
}
txtBarcode.Focus();
break;
case tipoCodiceBarcode.matrDipendente:
// fare!!!
txtBarcode.Focus();
break;
case tipoCodiceBarcode.cfDipendente:
// fare!!!
txtBarcode.Focus();
break;
case tipoCodiceBarcode.Comando:
// procedo SOLO se ho cod dipendente
if (DataProxy.DP.taDipendenti.getByIdx(DataProxy.idxDipendente).Rows.Count > 0)
{
timerConf.Enabled = false;
setCtrlState(false);
}
nextUsrMsg = "...waiting...";
// controlla se sia entra/esci (IN/OUT)
if (barcodeIn.ToUpperInvariant() == "CMDIN")
{
// registro ingresso!
registraTimbratura(true);
Response.Redirect(paginaCorrente);
}
else if (barcodeIn.ToUpperInvariant() == "CMDOUT")
{
// registro uscita!
registraTimbratura(false);
Response.Redirect(paginaCorrente);
}
//else if (barcodeIn.ToUpperInvariant() == "CMD")
//{
// Response.Redirect(paginaCorrente);
//}
//DataProxy.idxDipendente = -1;
txtBarcode.Focus();
break;
default:
txtBarcode.Focus();
break;
}
barcodeIn = "";
}
else
{
lblMessaggi.Text = "...attesa barcode...";
}
grView.DataBind();
checkButtons();
txtBarcode.Focus();
}
/// <summary>
/// valore barcode
/// </summary>
public string barcodeIn
{
get
{
return txtBarcode.Text.Trim();
}
set
{
txtBarcode.Text = value;
}
}
/// <summary>
/// salvo entrata
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnEntrata_Click(object sender, EventArgs e)
{
// salvo entrata...
registraTimbratura(true);
Response.Redirect(paginaCorrente);
}
/// <summary>
/// salvo uscita
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUscita_Click(object sender, EventArgs e)
{
// salvo uscita
registraTimbratura(false);
Response.Redirect(paginaCorrente);
}
/// <summary>
/// registro timbratura
/// </summary>
/// <param name="isEntrata"></param>
/// <returns></returns>
private void registraTimbratura(bool isEntrata)
{
// salvo evento entrata...
string IPv4 = Request.UserHostName;
// auto-approvazione da web.config
bool approvata = memLayer.ML.confReadBool("barcodeAutoApprove");
if (DataProxy.idxDipendente > 0)
{
string CognomeNome = "";
if (memLayer.ML.confReadBool("showNameAfterCmd"))
{
CognomeNome = DataProxy.DP.CognomeNomeByIdx(DataProxy.idxDipendente);
}
if (nextIsEntrata)
{
nextUsrMsg = string.Format("{1} ENTRATA {0:HH:mm:ss}", orarioBCode, CognomeNome);
}
else
{
nextUsrMsg = string.Format("{1} USCITA {0:HH:mm:ss}", orarioBCode, CognomeNome);
}
timbratrice.registraTimbratura(DataProxy.idxDipendente, orarioBCode, isEntrata, IPv4, "Web", approvata);
//aggiorno timbrature visualizzate
setButtons();
grView.DataBind();
}
else
{
lblMessaggi.Text = "IdxDipendente non trovato! timbratura impossibile";
pnlAll.CssClass = "stileComandoND";
}
}
/// <summary>
/// imposta i buttons secondo i valori in sessione...
/// </summary>
private void setButtons()
{
// mostrare e abilitare secondo condizioni al contorno
}
/// <summary>
/// decodifica il tipo barcode acquisito
/// </summary>
public tipoCodiceBarcode tipoBCode
{
get
{
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
// controllo non si tratti di un comando...
string preCmd = memLayer.ML.confReadString("prefComandi");
if (barcodeIn.StartsWith(preCmd, StringComparison.InvariantCultureIgnoreCase))
{
answ = tipoCodiceBarcode.Comando;
}
// controllo se sia un codice "idx"
else if (barcodeIn.StartsWith("idx", StringComparison.InvariantCultureIgnoreCase))
{
answ = tipoCodiceBarcode.idxDipendente;
}
// controllo se sia un codice "matr"
else if (barcodeIn.StartsWith("matr", StringComparison.InvariantCultureIgnoreCase))
{
answ = tipoCodiceBarcode.matrDipendente;
}
// controllo se sia un codice "cf"
else if (barcodeIn.StartsWith("cf", StringComparison.InvariantCultureIgnoreCase))
{
answ = tipoCodiceBarcode.cfDipendente;
}
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>
/// evento cambio testo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtBarcode_TextChanged(object sender, EventArgs e)
{
// solo se ho ALMENO 3 char...
if (barcodeIn.Length >= 3)
{
contatorePag = 0;
checkBarcode();
}
}
/// <summary>
/// variabile che conta numero di refresh parziali prima di fare reload completo
/// </summary>
protected int contatorePag
{
get
{
return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
}
set
{
memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
}
}
}
}
+195
View File
@@ -0,0 +1,195 @@
//------------------------------------------------------------------------------
// <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_bCodeTimb {
/// <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>
/// lblPostazione 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 lblPostazione;
/// <summary>
/// lblPrinter 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 lblPrinter;
/// <summary>
/// lblCurrentPage 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 lblCurrentPage;
/// <summary>
/// hlMenu 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 hlMenu;
/// <summary>
/// lblDipendenteAttivo 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 lblDipendenteAttivo;
/// <summary>
/// lblMessaggi 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 lblMessaggi;
/// <summary>
/// pnlBtnIn 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 pnlBtnIn;
/// <summary>
/// btnEntrata 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 btnEntrata;
/// <summary>
/// PaneOut 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 PaneOut;
/// <summary>
/// btnUscita 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 btnUscita;
/// <summary>
/// lblBarcode 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 lblBarcode;
/// <summary>
/// txtBarcode 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 txtBarcode;
/// <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;
/// <summary>
/// UpdatePanel1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.UpdatePanel UpdatePanel1;
/// <summary>
/// pnlTimer 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 pnlTimer;
/// <summary>
/// lblNextTimbr 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 lblNextTimbr;
/// <summary>
/// lblCountDown 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 lblCountDown;
/// <summary>
/// timerConf control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer timerConf;
}
}
+3
View File
@@ -0,0 +1,3 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_barPlot.ascx.cs" Inherits="GPW.WebUserControls.mod_barPlot" %>
<asp:Table runat="server" ID ="tblData" CellPadding="0" CellSpacing="0">
</asp:Table>
+64
View File
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW.WebUserControls
{
public partial class mod_barPlot : System.Web.UI.UserControl
{
protected SteamWare.DataType.DatoBarPlot[] _elencoValori;
public double resolution { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
//doPlot();
}
public SteamWare.DataType.DatoBarPlot[] elencoValori
{
get
{
return _elencoValori;
}
set
{
_elencoValori = value;
doPlot();
}
}
/// <summary>
/// esegue plotting, creando tante celle quanti i valori dell'array passato
/// </summary>
private void doPlot()
{
try
{
TableRow riga = new TableRow();
TableCell cell;
for (int i = 0; i < _elencoValori.Length; i++)
{
// solo se >0 aggiungo cella...
if (_elencoValori[i].valore > 0)
{
cell = new TableCell();
cell.CssClass = _elencoValori[i].css;
// se il valore è sotto 10px NON metto il testo...
if ((_elencoValori[i].valore / resolution) > 20)
{
cell.Text = _elencoValori[i].label;
}
cell.Width = Convert.ToInt32(Math.Ceiling((double)_elencoValori[i].valore / resolution));
cell.ToolTip = _elencoValori[i].tooltip;
riga.Cells.Add(cell);
}
}
tblData.Rows.Add(riga);
}
catch
{ }
}
}
}
+24
View File
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <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_barPlot {
/// <summary>
/// tblData 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.Table tblData;
}
}
+83
View File
@@ -0,0 +1,83 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commAttivita.ascx.cs" Inherits="GPW.WebUserControls.mod_commAttivita" %>
<% if (false)
{ %>
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<% } %>
<ul data-role="listview" data-inset="false" data-theme="d" data-divider-theme="b">
<li data-role="list-divider">
<asp:Panel runat="server" data-role="popup" ID="popupBasic" ClientIDMode="Static">
<p>
<asp:Calendar runat="server" ID="calDataRif" OnSelectionChanged="calDataRif_SelectionChanged" />
<p>
</asp:Panel>
<div class="ui-grid-b">
<div class="ui-block-a">
<a href="#popupBasic" data-rel="popup" data-role="button" data-mini="true">
<asp:Label runat="server" ID="lblDataRif" /></a>
</div>
<div class="ui-block-b">
<asp:LinkButton runat="server" ID="lnkCreateNew" Text="Aggiungi" OnClick="lnkCreateNew_Click" data-icon="plus" data-mini="true" data-iconpos="right" data-role="button" />
</div>
<div class="ui-block-c">
<asp:Label runat="server" ID="lblTotOreRA" Style="font-weight: normal; font-size: 12pt;" Text="..." CssClass="ui-li-count"
ToolTip="Ore caricate a commessa / ore lavorate da timbrature" />
</div>
</li>
<asp:Repeater ID="repRegAtt" runat="server" DataSourceID="odsRegAtt">
<ItemTemplate>
<li data-theme="c">
<asp:LinkButton runat="server" ID="lnkEdit" OnClick="lnkEdit_Click" CommandArgument='<%# Eval("idxRA") %>'>
<p>
<b>
<asp:Label ID="lblCli" runat="server" Style="font-size: 10pt;" Text='<%# cliByIdxFase(Eval("idxFase")) %>' ForeColor="#6988AA" />&nbsp;-&nbsp;
<asp:Label ID="lblPrj" runat="server" Style="font-size: 10pt;" Text='<%# prjByIdxFase(Eval("idxFase")) %>' /></b>
</p>
<div class="ui-li-count" style="font-weight: normal; font-size: 10pt;">
<asp:Label ID="inizioLabel" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' />
&nbsp;-&nbsp;
<asp:Label ID="fineLabel" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' />
</div>
<p>
<asp:Label ID="lblFase" runat="server" Text='<%# faseByIdx(Eval("idxFase")) %>' ForeColor="#696969" />
</p>
<p>
<asp:Label ID="descrizioneLabel" runat="server" Text='<%# Eval("descrizione") %>' />
</p>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="lnkClona" OnClick="lnkClona_Click" CommandArgument='<%# Eval("idxRA") %>' data-icon="plus"
data-theme="e" Text="Duplica" />
</li>
</ItemTemplate>
<%-- <AlternatingItemTemplate>
<li data-theme="e" style="margin-top: -5px;">
<asp:LinkButton runat="server" ID="lnkEdit" OnClick="lnkEdit_Click" CommandArgument='<%# Eval("idxRA") %>'>
<p>
<b>
<asp:Label ID="lblCli" runat="server" Style="font-size: 10pt;" Text='<%# cliByIdxFase(Eval("idxFase")) %>' ForeColor="#6988AA" />&nbsp;-&nbsp;
<asp:Label ID="lblPrj" runat="server" Style="font-size: 10pt;" Text='<%# prjByIdxFase(Eval("idxFase")) %>' /></b>
</p>
<div class="ui-li-count" style="font-weight: normal; font-size: 10pt;">
<asp:Label ID="inizioLabel" runat="server" Text='<%# Eval("inizio","{0:HH:mm}") %>' />
&nbsp;-&nbsp;
<asp:Label ID="fineLabel" runat="server" Text='<%# Eval("fine","{0:HH:mm}") %>' />
</div>
<p>
<asp:Label ID="lblFase" runat="server" Text='<%# faseByIdx(Eval("idxFase")) %>' ForeColor="#696969" />
</p>
<p>
<asp:Label ID="descrizioneLabel" runat="server" Text='<%# Eval("descrizione") %>' />
</p>
</asp:LinkButton>
<asp:LinkButton runat="server" ID="lnkCLona" OnClick="lnkEdit_Click" CommandArgument='<%# Eval("idxRA") %>' data-icon="star" data-theme="e" Text="Duplica" />
</li>
</AlternatingItemTemplate>--%>
</asp:Repeater>
<asp:ObjectDataSource ID="odsRegAtt" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByDipData"
TypeName="GPW_data.DS_ApplicazioneTableAdapters.RegAttivitaTableAdapter">
<SelectParameters>
<asp:SessionParameter DefaultValue="1" Name="idxDipendente" SessionField="idxDipendente" Type="Int32" />
<asp:SessionParameter Name="dataFrom" SessionField="dataFromRA" Type="DateTime" />
<asp:SessionParameter Name="dataTo" SessionField="dataToRA" Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
</ul>
@@ -0,0 +1,197 @@
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;
namespace GPW.WebUserControls
{
public partial class mod_commAttivita : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
setupPage();
}
}
/// <summary>
/// pagina di return a fine editing
/// </summary>
public string returnPage
{
get
{
string answ = memLayer.ML.confReadString("baseUrl");
try
{
answ = memLayer.ML.StringSessionObj("returnPage");
}
catch
{ }
return answ;
}
set
{
memLayer.ML.setSessionVal("returnPage", value);
}
}
/// <summary>
/// data riferimento (selezionata) da session
/// </summary>
public 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>
/// imposta la pagina
/// </summary>
private void setupPage()
{
// salvo dataFrom/To x visualizzazione attivita
lblDataRif.Text = dataRif.ToString("dd.MM.yy");
// recupero dati della commessa utente giornaliera...
try
{
int maxErrMinus = memLayer.ML.confReadInt("maxErrMinus");
int maxErrPlus = memLayer.ML.confReadInt("maxErrPlus");
DS_Applicazione.v_logCommUtRow rigaLog = DataProxy.DP.taLCU.getByIdxDipDate(memLayer.ML.IntSessionObj("idxDipendente"), dataRif, dataRif.AddDays(1), maxErrMinus, maxErrPlus)[0];
lblTotOreRA.Text = string.Format("{0:0.##} h / {1:0.##} h", rigaLog.h_com, rigaLog.h_lav);
}
catch
{
lblTotOreRA.Text = "...";
}
memLayer.ML.setSessionVal("dataFromRA", dataRif.Date);
memLayer.ML.setSessionVal("dataToRA", dataRif.AddDays(1).Date);
}
/// <summary>
/// recupera cliente da idxFase
/// </summary>
/// <param name="idxFase"></param>
/// <returns></returns>
public string cliByIdxFase(object _idxFase)
{
string answ = "";
try
{
int idxFase = Convert.ToInt32(_idxFase);
DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
int idxPrj = Convert.ToInt32(fase.idxProgetto);
DS_Applicazione.AnagProgettiRow progetto = DataProxy.DP.taAP.getByIdxPrj(idxPrj)[0];
answ = DataProxy.DP.taAnCli.getByIdx(progetto.idxCliente)[0].RagSociale;
}
catch
{ }
return answ;
}
/// <summary>
/// recupera progetto da idxFase
/// </summary>
/// <param name="idxFase"></param>
/// <returns></returns>
public string prjByIdxFase(object _idxFase)
{
string answ = "";
try
{
int idxFase = Convert.ToInt32(_idxFase);
DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
int idxPrj = Convert.ToInt32(fase.idxProgetto);
DS_Applicazione.AnagProgettiRow progetto = DataProxy.DP.taAP.getByIdxPrj(idxPrj)[0];
answ = progetto.nomeProj;
}
catch
{ }
return answ;
}
/// <summary>
/// recupera descrizione e nome fase da idxFase
/// </summary>
/// <param name="idxFase"></param>
/// <returns></returns>
public string faseByIdx(object _idxFase)
{
string answ = "";
try
{
int idxFase = Convert.ToInt32(_idxFase);
DS_Applicazione.AnagFasiRow fase = DataProxy.DP.taAF.getByIdx(idxFase)[0];
answ = string.Format("{0} <i>({1})</i>", fase.nomeFase, fase.descrizioneFase);
}
catch
{ }
return answ;
}
/// <summary>
/// rimanda ad edit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkEdit_Click(object sender, EventArgs e)
{
// salvo
LinkButton lbtn = (LinkButton)sender;
memLayer.ML.setSessionVal("idxRASel", lbtn.CommandArgument);
// redirect!
Response.Redirect("attivitaIns.aspx");
}
/// <summary>
/// rimanda ad edit
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lnkClona_Click(object sender, EventArgs e)
{
// salvo
LinkButton lbtn = (LinkButton)sender;
int idxRa=0;
try
{
idxRa = Convert.ToInt32(lbtn.CommandArgument);
}
catch
{ }
// chiamo clona!
DataProxy.DP.taRA.clonaRecord(idxRa);
//update!
setupPage();
repRegAtt.DataBind();
}
protected void lnkCreateNew_Click(object sender, EventArgs e)
{
memLayer.ML.emptySessionVal("idxRASel");
// redirect!
Response.Redirect("attivitaIns.aspx");
}
/// <summary>
/// aggiorno data selezionata!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void calDataRif_SelectionChanged(object sender, EventArgs e)
{
dataRif = calDataRif.SelectedDate;
setupPage();
repRegAtt.DataBind();
}
}
}
+78
View File
@@ -0,0 +1,78 @@
//------------------------------------------------------------------------------
// <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_commAttivita {
/// <summary>
/// popupBasic 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 popupBasic;
/// <summary>
/// calDataRif 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.Calendar calDataRif;
/// <summary>
/// lblDataRif 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 lblDataRif;
/// <summary>
/// lnkCreateNew 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.LinkButton lnkCreateNew;
/// <summary>
/// lblTotOreRA 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 lblTotOreRA;
/// <summary>
/// repRegAtt 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 repRegAtt;
/// <summary>
/// odsRegAtt 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 odsRegAtt;
}
}
@@ -0,0 +1,225 @@
<%@ 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>
@@ -0,0 +1,635 @@
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
}
}
@@ -0,0 +1,87 @@
//------------------------------------------------------------------------------
// <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;
}
}
+178
View File
@@ -0,0 +1,178 @@
<%@ 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>
+397
View File
@@ -0,0 +1,397 @@
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;
}
}
}

Some files were not shown because too many files have changed in this diff Show More