From 03919920a9ef4f5d1bb18efdc68b4b95a08abf7d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 4 Sep 2020 08:25:36 +0200 Subject: [PATCH] completamento visualizzaizone chartjs in smart/commesse --- GPW_Commesse/WebUserControls/cmp_chart.ascx | 165 ++++++++++++++++++ .../WebUserControls/cmp_chart.ascx.cs | 26 ++- .../cmp_chart.ascx.designer.cs | 33 +++- .../WebUserControls/mod_commUtLog.ascx | 20 ++- .../WebUserControls/mod_commUtLog.ascx.cs | 2 +- .../mod_commUtLog.ascx.designer.cs | 9 + GPW_Smart/WebUserControls/cmp_chart.ascx | 16 +- 7 files changed, 257 insertions(+), 14 deletions(-) diff --git a/GPW_Commesse/WebUserControls/cmp_chart.ascx b/GPW_Commesse/WebUserControls/cmp_chart.ascx index 39c4480..4b15f96 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx @@ -1 +1,166 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_chart.ascx.cs" Inherits="GPW_Commesse.WebUserControls.cmp_chart" %> +<%--https://www.chartjs.org/--%> + + + + +
+
Periodo
+
+ + + + + + + + +
+
+ + + diff --git a/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs b/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs index 0ed0176..6e6f9ea 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs @@ -1,4 +1,6 @@ -using System; +using GPW_data; +using SteamWare; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -7,11 +9,29 @@ using System.Web.UI.WebControls; namespace GPW_Commesse.WebUserControls { - public partial class cmp_chart : System.Web.UI.UserControl + public partial class cmp_chart : BaseUserControl { + + public DateTime dtRif + { + get + { + + DateTime answ = DateTime.Today; + DateTime.TryParse(hfData.Value, out answ); + return answ; + } + set + { + hfData.Value = value.ToString("yyyy-MM-dd"); + ddlMaxNum.DataBind(); + } + } + protected void Page_Load(object sender, EventArgs e) { - + // imposto valori... + hfIdxDip.Value = $"{DataProxy.idxDipendente}"; } } } \ No newline at end of file diff --git a/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs b/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs index e7e4d30..4d36c53 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// +// // Codice generato da uno strumento. // // Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ namespace GPW_Commesse.WebUserControls @@ -13,5 +13,32 @@ namespace GPW_Commesse.WebUserControls public partial class cmp_chart { + + /// + /// Controllo hfIdxDip. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxDip; + + /// + /// Controllo hfData. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HiddenField hfData; + + /// + /// Controllo ddlMaxNum. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlMaxNum; } } diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx index 9cec132..3d324fb 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx @@ -1,12 +1,14 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_commUtLog.ascx.cs" Inherits="GPW_Commesse.WebUserControls.mod_commUtLog" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> -<%@ 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" %> +<%@ Register Src="~/WebUserControls/mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %> +<%@ Register Src="~/WebUserControls/mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc3" %> +<%@ Register Src="~/WebUserControls/mod_commUtMancTimbr.ascx" TagName="mod_commUtMancTimbr" TagPrefix="uc4" %> +<%@ Register Src="~/WebUserControls/mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc5" %> +<%@ Register Src="~/WebUserControls/mod_TagCloudProgetti.ascx" TagName="mod_TagCloudProgetti" TagPrefix="uc6" %> <%@ Register Src="~/WebUserControls/cmp_toggle.ascx" TagPrefix="uc2" TagName="cmp_toggle" %> <%@ Register Src="~/WebUserControls/cmp_rilTemp.ascx" TagPrefix="uc2" TagName="cmp_rilTemp" %> +<%@ Register Src="~/WebUserControls/cmp_chart.ascx" TagPrefix="uc2" TagName="cmp_chart" %> + @@ -30,6 +32,7 @@
+
@@ -81,9 +84,16 @@
+                                        + + +                                        + + +                                       
diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs index adc56b1..9722e2b 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs @@ -191,9 +191,9 @@ namespace GPW_Commesse.WebUserControls private void editTemp(string dataRif) { - DateTime adesso = DateTime.Today; CultureInfo ita = new CultureInfo("it-IT"); cmp_rilTemp.dtRif = Convert.ToDateTime(dataRif, ita); + cmp_chart.dtRif = Convert.ToDateTime(dataRif, ita); //salvo in sessione dati x detail timbrature memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); // imposto modalità diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs index 63c8ade..b6d1be2 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs @@ -86,6 +86,15 @@ namespace GPW_Commesse.WebUserControls /// protected global::GPW_Commesse.WebUserControls.cmp_rilTemp cmp_rilTemp; + /// + /// Controllo cmp_chart. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::GPW_Commesse.WebUserControls.cmp_chart cmp_chart; + /// /// Controllo pnlEditOre. /// diff --git a/GPW_Smart/WebUserControls/cmp_chart.ascx b/GPW_Smart/WebUserControls/cmp_chart.ascx index cbfcbfb..2e4591e 100644 --- a/GPW_Smart/WebUserControls/cmp_chart.ascx +++ b/GPW_Smart/WebUserControls/cmp_chart.ascx @@ -20,8 +20,18 @@
+ + + \ No newline at end of file