ricalcolo reports SOLO su click esplicito utente

This commit is contained in:
Samuele Locatelli
2022-02-02 18:40:54 +01:00
parent f551174e7f
commit 14ee3cf7af
3 changed files with 45 additions and 26 deletions
+8 -5
View File
@@ -12,11 +12,14 @@
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-3">
<div class="col-2">
<h3>Reports</h3>
</div>
<div class="col-9">
<uc1:cmp_reportSelector runat="server" id="cmp_reportSelector" />
<uc1:cmp_reportSelector runat="server" ID="cmp_reportSelector" />
</div>
<div class="col-1">
<asp:LinkButton runat="server" ID="lbtRefreshData" CssClass="btn btn-success" OnClick="lbtRefreshData_Click"><i class="fa fa-refresh" aria-hidden="true"></i> Reload</asp:LinkButton>
</div>
</div>
</div>
@@ -30,11 +33,11 @@
</div>
</div>
<uc1:cmp_SheetsStats runat="server" ID="cmp_SheetsStats" />
<uc1:cmp_BatchStatsList runat="server" id="cmp_BatchStatsList" />
<uc1:cmp_DailyStatsList runat="server" id="cmp_DailyStatsList" />
<uc1:cmp_BatchStatsList runat="server" ID="cmp_BatchStatsList" />
<uc1:cmp_DailyStatsList runat="server" ID="cmp_DailyStatsList" />
</div>
</div>
</div>
</div>
</div>
</asp:Content>
</asp:Content>
+8 -1
View File
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
@@ -74,6 +75,7 @@ namespace NKC_WF.site
private void TryUpdateModel()
{
Thread.Sleep(200);
DateTime oggi = DateTime.Today;
// verifica se ci sia VETO x update da redis
string rawVal = memLayer.ML.getRSV(ComLib.redVetoDayStats);
@@ -153,8 +155,8 @@ namespace NKC_WF.site
((SiteMaster)this.Master).showSearch = false;
doUpdate();
}
//TryUpdateModel();
cmp_reportSelector.eh_doRefresh += Cmp_reportSelector_eh_doRefresh;
TryUpdateModel();
}
#endregion Protected Methods
@@ -177,5 +179,10 @@ namespace NKC_WF.site
}
#endregion Public Methods
protected void lbtRefreshData_Click(object sender, EventArgs e)
{
TryUpdateModel();
}
}
}
+29 -20
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// This code was generated by a tool.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NKC_WF.site
@@ -15,47 +15,56 @@ namespace NKC_WF.site
{
/// <summary>
/// Controllo cmp_reportSelector.
/// cmp_reportSelector control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_reportSelector cmp_reportSelector;
/// <summary>
/// Controllo lblInstruction.
/// lbtRefreshData control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtRefreshData;
/// <summary>
/// lblInstruction 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 lblInstruction;
/// <summary>
/// Controllo cmp_SheetsStats.
/// cmp_SheetsStats control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_SheetsStats cmp_SheetsStats;
/// <summary>
/// Controllo cmp_BatchStatsList.
/// cmp_BatchStatsList control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_BatchStatsList cmp_BatchStatsList;
/// <summary>
/// Controllo cmp_DailyStatsList.
/// cmp_DailyStatsList control.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::NKC_WF.WebUserControls.cmp_DailyStatsList cmp_DailyStatsList;
}