diff --git a/GPW_Commesse/Web.config b/GPW_Commesse/Web.config index f1e1509..60208a1 100644 --- a/GPW_Commesse/Web.config +++ b/GPW_Commesse/Web.config @@ -77,7 +77,7 @@ - + diff --git a/GPW_Commesse/WebUserControls/cmp_chart.ascx b/GPW_Commesse/WebUserControls/cmp_chart.ascx index cb11a28..9204dc8 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx @@ -3,10 +3,12 @@ @@ -176,7 +173,7 @@ -
+
diff --git a/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs b/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs index 1783b62..2815883 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx.cs @@ -11,12 +11,12 @@ namespace GPW_Commesse.WebUserControls { public partial class cmp_chart : BaseUserControl { + #region Public Properties public DateTime dtRif { get { - DateTime answ = DateTime.Today.AddYears(-10); DateTime.TryParse(hfData.Value, out answ); return answ; @@ -28,11 +28,15 @@ namespace GPW_Commesse.WebUserControls } } + #endregion Public Properties + + #region Protected Methods + protected void Page_Load(object sender, EventArgs e) { - if(!Page.IsPostBack) + if (!Page.IsPostBack) { - if(DateTime.Today.Subtract(dtRif).TotalDays>3650) + if (DateTime.Today.Subtract(dtRif).TotalDays > 3650) { dtRif = DateTime.Today; } @@ -40,5 +44,7 @@ namespace GPW_Commesse.WebUserControls // imposto valori... hfIdxDip.Value = $"{DataProxy.idxDipendente}"; } + + #endregion Protected Methods } } \ 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 c26ac19..22cd135 100644 --- a/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs +++ b/GPW_Commesse/WebUserControls/cmp_chart.ascx.designer.cs @@ -40,5 +40,14 @@ namespace GPW_Commesse.WebUserControls /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlMaxNum; + + /// + /// divGraphs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divGraphs; } } diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx index 8e717c6..8cb4a34 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx @@ -23,39 +23,62 @@
+
+ Temp: + +
Sel globale: - +
- -
-
- - + + +
+
- - -
-
- -
-
+
+
+ +
+
+ +
diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs index e281b41..48f21e8 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.cs @@ -52,6 +52,18 @@ namespace GPW_Commesse.WebUserControls } } + protected bool tempVisible + { + get + { + return cmp_toggleTemp.toggleValue; + } + set + { + cmp_toggleTemp.toggleValue = value; + } + } + #endregion Protected Properties #region Public Properties @@ -103,24 +115,26 @@ namespace GPW_Commesse.WebUserControls #region Private Methods - private void cmp_rilTemp_ehCancel(object sender, EventArgs e) + private void closeEditTemp() { activeMode = modoCommesse.elenco; grView.SelectedIndex = -1; grView.DataBind(); + tempVisible = false; //showCharts(false); showPanels(); raiseEvent(ucEvType.Reset); } + private void cmp_rilTemp_ehCancel(object sender, EventArgs e) + { + closeEditTemp(); + } + private void cmp_rilTemp_ehSave(object sender, EventArgs e) { - activeMode = modoCommesse.elenco; - - //showCharts(false); - showPanels(); - raiseEvent(ucEvType.Reset); + closeEditTemp(); } private void Cmp_toggle_ehToggle(object sender, EventArgs e) @@ -128,6 +142,16 @@ namespace GPW_Commesse.WebUserControls showPanels(); } + private void Cmp_toggleTemp_ehToggle(object sender, EventArgs e) + { + if (!cmp_toggleTemp.toggleValue) + { + grView.SelectedIndex = -1; + grView.DataBind(); + } + showPanels(); + } + private void editCommDay(string dataRif) { CultureInfo ita = new CultureInfo("it-IT"); @@ -152,10 +176,10 @@ namespace GPW_Commesse.WebUserControls //salvo in sessione dati x detail timbrature memLayer.ML.setSessionVal("idxDip_det", DataProxy.idxDipendente); // imposto modalità + tempVisible = true; activeMode = modoCommesse.editRilTemp; showPanels(); - showCharts(true); raiseEvent(ucEvType.ReqUpdateParent); } @@ -219,6 +243,7 @@ namespace GPW_Commesse.WebUserControls { activeMode = modoCommesse.elenco; showPanels(); + grView.SelectedIndex = -1; grView.DataBind(); } @@ -313,9 +338,10 @@ namespace GPW_Commesse.WebUserControls mod_TagCloudProgetti1.modo = TagCloudMode.standard; break; } - showCharts(false); + showPanels(); + tempVisible = true; } - showPanels(); + showCharts(tempVisible); grView.DataBind(); mod_commUtMancTimbr1.eh_nuovoValore += new EventHandler(mod_commUtMancTimbr1_eh_nuovoValore); mod_commAttivitaDesk1.eh_nuovoValore += new EventHandler(mod_commAttivitaDesk1_eh_nuovoValore); @@ -323,20 +349,27 @@ namespace GPW_Commesse.WebUserControls mod_TagCloudProgetti1.eh_refresh += mod_TagCloudProgetti1_eh_refresh; mod_periodoAnalisi1.eh_doUpdate += mod_periodoAnalisi1_eh_doUpdate; cmp_toggle.ehToggle += Cmp_toggle_ehToggle; + cmp_toggleTemp.ehToggle += Cmp_toggleTemp_ehToggle; cmp_rilTemp.ehCancel += cmp_rilTemp_ehCancel; cmp_rilTemp.ehSave += cmp_rilTemp_ehSave; } protected void showCharts(bool doShow) { + divRilTemp.Visible = doShow; +#if false + ScriptManager.RegisterStartupScript(upCharts, this.GetType(), "ShowHideCharts", "checkVisible();", true); + divCharts.Visible = true; if (doShow) { - ScriptManager.RegisterStartupScript(upCharts, this.GetType(), "MyAction", "showCharts();", true); + ScriptManager.RegisterStartupScript(upCharts, this.GetType(), "ShowHideCharts", "showCharts();", true); } else { - ScriptManager.RegisterStartupScript(upCharts, this.GetType(), "MyAction", "hideCharts();", true); + ScriptManager.RegisterStartupScript(upCharts, this.GetType(), "ShowHideCharts", "hideCharts();", true); } +#endif + divCharts.Visible = doShow; } /// @@ -426,8 +459,10 @@ namespace GPW_Commesse.WebUserControls pnlEditOre.Visible = timbr; mod_commAttivitaDesk1.Visible = commesse; mod_commUtMancTimbr1.Visible = timbr; +#if false cmp_rilTemp.Visible = temp; - showCharts(temp); +#endif + showCharts(temp && tempVisible); upMain.Update(); upFilt.Update(); diff --git a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs index ea60ede..26a8214 100644 --- a/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs +++ b/GPW_Commesse/WebUserControls/mod_commUtLog.ascx.designer.cs @@ -50,6 +50,15 @@ namespace GPW_Commesse.WebUserControls /// protected global::mod_periodoAnalisi mod_periodoAnalisi1; + /// + /// cmp_toggleTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggleTemp; + /// /// cmp_toggle control. /// @@ -59,15 +68,6 @@ namespace GPW_Commesse.WebUserControls /// protected global::GPW_Commesse.WebUserControls.cmp_toggle cmp_toggle; - /// - /// divRilTemp control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRilTemp; - /// /// upCharts control. /// @@ -77,6 +77,15 @@ namespace GPW_Commesse.WebUserControls /// protected global::System.Web.UI.UpdatePanel upCharts; + /// + /// divRilTemp control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRilTemp; + /// /// cmp_rilTemp control. ///