Completo review pagine x gestioen report su pag diverse
This commit is contained in:
@@ -324,6 +324,7 @@
|
||||
<Content Include="Scripts\Chart.js" />
|
||||
<Content Include="Scripts\Chart.min.js" />
|
||||
<Content Include="Scripts\chartjs-plugin-zoom%40next.js" />
|
||||
<Content Include="Scripts\DailyStatsPlot.js" />
|
||||
<Content Include="Scripts\esm\popper-utils.js" />
|
||||
<Content Include="Scripts\esm\popper-utils.min.js" />
|
||||
<Content Include="Scripts\esm\popper.js" />
|
||||
@@ -479,6 +480,8 @@
|
||||
<Content Include="site\PartMIA.aspx" />
|
||||
<Content Include="site\PartValidation.aspx" />
|
||||
<Content Include="site\PlannerReports.aspx" />
|
||||
<Content Include="site\PlannerReportsBatchStats.aspx" />
|
||||
<Content Include="site\PlannerReportsDailyStats.aspx" />
|
||||
<Content Include="site\PlantMgmt.aspx" />
|
||||
<Content Include="site\RemanExtLink.aspx" />
|
||||
<Content Include="site\SecondScreen.aspx" />
|
||||
@@ -486,6 +489,7 @@
|
||||
<Content Include="site\SvgFull.aspx" />
|
||||
<Content Include="site\TestAuth.aspx" />
|
||||
<Content Include="site\StackManager.aspx" />
|
||||
<Content Include="site\TestChart.aspx" />
|
||||
<Content Include="site\Unauth.aspx" />
|
||||
<Content Include="site\UpdMan.aspx" />
|
||||
<Content Include="WebUserControls\cmp_barcode.ascx" />
|
||||
@@ -1053,6 +1057,20 @@
|
||||
<Compile Include="site\PlannerReports.aspx.designer.cs">
|
||||
<DependentUpon>PlannerReports.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\PlannerReportsBatchStats.aspx.cs">
|
||||
<DependentUpon>PlannerReportsBatchStats.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="site\PlannerReportsBatchStats.aspx.designer.cs">
|
||||
<DependentUpon>PlannerReportsBatchStats.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\PlannerReportsDailyStats.aspx.cs">
|
||||
<DependentUpon>PlannerReportsDailyStats.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="site\PlannerReportsDailyStats.aspx.designer.cs">
|
||||
<DependentUpon>PlannerReportsDailyStats.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\PlantMgmt.aspx.cs">
|
||||
<DependentUpon>PlantMgmt.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -1116,6 +1134,13 @@
|
||||
<Compile Include="site\StackManager.aspx.designer.cs">
|
||||
<DependentUpon>StackManager.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\TestChart.aspx.cs">
|
||||
<DependentUpon>TestChart.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="site\TestChart.aspx.designer.cs">
|
||||
<DependentUpon>TestChart.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="site\Unauth.aspx.cs">
|
||||
<DependentUpon>Unauth.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
+11
-8
@@ -36,8 +36,9 @@
|
||||
</pages>
|
||||
<sessionState mode="Custom" customProvider="MySessionStateStore">
|
||||
<providers>
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="127.0.0.1" accessKey="" ssl="false"
|
||||
applicationName="NKC" databaseId="2" timeout="480"/>
|
||||
<add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider"
|
||||
connectionString="localhost:26379, serviceName=devel, DefaultDatabase=2, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false"
|
||||
applicationName="NKC"/>
|
||||
</providers>
|
||||
</sessionState>
|
||||
<httpModules>
|
||||
@@ -110,18 +111,20 @@
|
||||
<!--Errori e redirect-->
|
||||
<add key="dedupBasePath" value="true"/>
|
||||
<add key="dedupBasePathVal" value="NKC2"/>
|
||||
<add key="NKC_WFConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="DbConfConnectionString" value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="NKC_WFConnectionString"
|
||||
value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="DbConfConnectionString"
|
||||
value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="VocabolarioConnectionString"
|
||||
value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="UtenteCdcConnectionString"
|
||||
value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="PermessiConnectionString"
|
||||
value="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
value="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<add name="AppData.Properties.Settings.Sauder_NKCConnectionString"
|
||||
connectionString="Data Source=SQL2016DEV;Initial Catalog=Sauder_NKC;Persist Security Info=True;User ID=sa;Password=keyhammer16;"
|
||||
connectionString="Data Source=SQL2016PROD;Initial Catalog=Sauder_NKC2_Prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"
|
||||
providerName="System.Data.SqlClient"/>
|
||||
<add name="ErrorLog" connectionString="Data Source=SQL2016DEV;Initial Catalog=Elmah;Persist Security Info=True;User ID=sa;Password=keyhammer16;"
|
||||
providerName="System.Data.SqlClient"/>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var labelsTS = dataTS.map(function (item) {
|
||||
return item['x'];
|
||||
});
|
||||
//console.log('labels data', labels);
|
||||
//console.log('labels data', labelsTS);
|
||||
|
||||
var myOptions = {
|
||||
responsive: true,
|
||||
@@ -42,15 +42,17 @@
|
||||
};
|
||||
|
||||
// recupero obj chart
|
||||
//console.log('ctx ID: ', document.getElementById('myChartTS'));
|
||||
var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
|
||||
var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value;
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelsTS,
|
||||
|
||||
datasets: [{
|
||||
label: '<%=hfLegend.Value %>',
|
||||
label: sLeg,
|
||||
borderColor: 'rgb(7, 173, 236)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
@@ -66,22 +68,31 @@
|
||||
}
|
||||
// effettuo plotting grafico TimeSerie!
|
||||
function plotTS() {
|
||||
//console.log("api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>");
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/BatchStats/<%=hfShowLast.Value %>?PlotType=<%=hfPlotType.Value%>",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
error: OnErrorCall_
|
||||
});
|
||||
var hfSL = document.getElementById('<%=hfShowLast.ClientID %>');
|
||||
if (hfSL != null) {
|
||||
var lastNum = document.getElementById('<%=hfShowLast.ClientID %>').value ?? "";
|
||||
var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value ?? "";
|
||||
//console.log("../api/BatchStats/"+lastNum+"?PlotType="+plotType);
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/BatchStats/" + lastNum + "?PlotType=" + plotType,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
error: OnErrorCall_
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// funzione di drawing ad OGNI pageload!
|
||||
function pageLoad() {
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
//console.log('pageLoad!');
|
||||
try {
|
||||
console.log('pageLoad BatchStats! | ID: <%= this.ID %> ');
|
||||
plotTS();
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -53,10 +53,7 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 px-2">
|
||||
<h4>Batch Stats Plot</h4>
|
||||
<h4>Daily Stats Plot</h4>
|
||||
</div>
|
||||
<div class="col-12 px-2">
|
||||
<div id="divLoading" class="alert alert-primary text-center">
|
||||
<%--<i class="fa fa-5x fa-circle-o-notch fa-spin" aria-hidden="true"></i>--%>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 40%"></div>
|
||||
</div>
|
||||
@@ -23,6 +22,7 @@
|
||||
<canvas id="myChartTS" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// funzione eseguita se successo al caricamento
|
||||
function OnSuccess_(reponse) {
|
||||
@@ -65,7 +65,11 @@
|
||||
};
|
||||
|
||||
// recupero obj chart
|
||||
//console.log('ctx ID: ', document.getElementById('myChartTS'));
|
||||
var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
//var ctx = document.getElementById('myChartTS').getContext('2d');
|
||||
|
||||
var sLeg = document.getElementById('<%=hfLegend.ClientID %>').value;
|
||||
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
@@ -74,21 +78,21 @@
|
||||
|
||||
datasets: [
|
||||
{
|
||||
label: 'NE01: <%=hfLegend.Value %>',
|
||||
label: 'NE01: ' + sLeg,
|
||||
borderColor: 'rgb(7, 173, 236)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
data: dataNE01
|
||||
},
|
||||
{
|
||||
label: 'NE02: <%=hfLegend.Value %>',
|
||||
label: 'NE02: ' + sLeg,
|
||||
borderColor: 'rgb(7, 173, 26)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
data: dataNE02
|
||||
},
|
||||
{
|
||||
label: 'NE03: <%=hfLegend.Value %>',
|
||||
label: 'NE03: ' + sLeg,
|
||||
borderColor: 'rgb(7, 203, 126)',
|
||||
lineTension: 0,
|
||||
//steppedLine: false,
|
||||
@@ -99,10 +103,15 @@
|
||||
options: myOptions
|
||||
});
|
||||
|
||||
// nascondo panel loading
|
||||
var currDiv = document.getElementById("divLoading");
|
||||
currDiv.style.display = "none";
|
||||
console.log("style: " + currDiv.style.display);
|
||||
try {
|
||||
// nascondo panel loading
|
||||
var currDiv = document.getElementById('divLoading');
|
||||
currDiv.style.display = "none";
|
||||
console.log("style: " + currDiv.style.display);
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// errore in reload!
|
||||
function OnErrorCall_(repo) {
|
||||
@@ -110,11 +119,20 @@
|
||||
}
|
||||
// effettuo plotting grafico TimeSerie!
|
||||
function plotTS() {
|
||||
console.log("api/DayStats/<%=hfPlaceCod.Value %>?StartDate=<%=hfDateStart.Value %>&EndDate=<%=hfDateEnd.Value %>&PlotType=<%=hfPlotType.Value%>");
|
||||
//console.log("Start plotTS");
|
||||
var placeCod = document.getElementById('<%=hfPlaceCod.ClientID %>').value;
|
||||
//console.log("placeCod: " + placeCod);
|
||||
var dtStart = document.getElementById('<%=hfDateStart.ClientID %>').value;
|
||||
//console.log("dtStart: " + dtStart);
|
||||
var dtEnd = document.getElementById('<%=hfDateEnd.ClientID %>').value;
|
||||
//console.log("dtEnd: " + dtEnd);
|
||||
var plotType = document.getElementById('<%=hfPlotType.ClientID %>').value;
|
||||
//console.log("plotType: " + plotType);
|
||||
//console.log("../api/DayStats/" + placeCod + "?StartDate=" + dtStart + "&EndDate=" + dtEnd + "&PlotType=" + plotType);
|
||||
// caricamento pagina
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "../api/DayStats/<%=hfPlaceCod.Value %>?StartDate=<%=hfDateStart.Value %>&EndDate=<%=hfDateEnd.Value %>&PlotType=<%=hfPlotType.Value%>",
|
||||
url: "../api/DayStats/" + placeCod + "?StartDate=" + dtStart + "&EndDate=" + dtEnd + "&PlotType=" + plotType,
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
success: OnSuccess_,
|
||||
@@ -124,11 +142,22 @@
|
||||
|
||||
// funzione di drawing ad OGNI pageload!
|
||||
function pageLoad() {
|
||||
// mostro panel loading
|
||||
var currDiv = document.getElementById("divLoading");
|
||||
currDiv.style.display = "block";
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
//console.log('pageLoad!');
|
||||
//console.log('pageLoad DailyStats! | ID: <%= this.ID %> ');
|
||||
try {
|
||||
try {
|
||||
// mostro panel loading
|
||||
var currDiv = document.getElementById('divLoading');
|
||||
currDiv.style.display = "block";
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
// chiamo recupero dati + plot della TS
|
||||
plotTS();
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,21 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_DailyStatsPlot : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected string dateFormat = "yyyy-MM-dd";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public DateTime DateEnd
|
||||
@@ -84,11 +74,14 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string dateFormat = "yyyy-MM-dd";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<asp:LinkButton runat="server" ID="lbtBatchPreview" CssClass="btn btn-block btn-outline-primary" OnClick="lbtBatchPreview_Click"><%: traduci("RepBatchPreview") %></asp:LinkButton>
|
||||
</li>
|
||||
<li class="nav-item mx-2">
|
||||
<asp:LinkButton runat="server" ID="lbtUnloadPart" CssClass="btn btn-block btn-outline-primary" OnClick="lbtUnloadPart_Click"><%: traduci("RepUnloadPart") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtUnloadPart" CssClass="btn btn-block btn-outline-primary" OnClick="lbtUnloadPart_Click" Enabled="false"><%: traduci("RepUnloadPart") %></asp:LinkButton>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<asp:LinkButton runat="server" ID="lbtDayStats" CssClass="btn btn-block btn-outline-primary" OnClick="lbtDailyStats_Click"><%: traduci("RepDayStats") %></asp:LinkButton>
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace NKC_WF.site
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReports02");
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
@@ -157,7 +157,7 @@ namespace NKC_WF.site
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReports03");
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports01.aspx.cs" Inherits="NKC_WF.site.PlannerReports01" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/cmp_SheetsStats.ascx" TagPrefix="uc1" TagName="cmp_SheetsStats" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<asp:UpdatePanel runat="server" ID="uplBody">
|
||||
<ContentTemplate>
|
||||
<div class="my-2 mx-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<h3>Reports</h3>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<uc1:cmp_reportSelector runat="server" ID="cmp_reportSelector" />
|
||||
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server" DisplayAfter="100">
|
||||
<ProgressTemplate>
|
||||
<div class="progress">
|
||||
<div class="progress-bar bg-success progress-bar-striped progress-bar-animated" style="width: 70%"></div>
|
||||
</div>
|
||||
</ProgressTemplate>
|
||||
</asp:UpdateProgress>
|
||||
</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>
|
||||
<div class="card-body">
|
||||
<uc1:cmp_SheetsStats runat="server" ID="cmp_SheetsStats" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -1,185 +0,0 @@
|
||||
using AppData;
|
||||
using NKC_WF.WebUserControls;
|
||||
using SteamWare;
|
||||
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;
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReports01 : BasePage
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Batch corrente...
|
||||
/// </summary>
|
||||
public int BatchId
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (!string.IsNullOrEmpty(memLayer.ML.QSS("BatchId")))
|
||||
{
|
||||
answ = memLayer.ML.QSI("BatchId");
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = savedBatchId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Limite orario preview...
|
||||
/// </summary>
|
||||
public int MaxHour
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = -1;
|
||||
if (!string.IsNullOrEmpty(memLayer.ML.QSS("MaxHour")))
|
||||
{
|
||||
answ = memLayer.ML.QSI("MaxHour");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Update interfaccia
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
{
|
||||
if (BatchId > 0)
|
||||
{
|
||||
cmp_reportSelector.SelReport = ReportType.BatchUnloadPreview;
|
||||
// Imposto BatchID...
|
||||
cmp_SheetsStats.BatchID = BatchId;
|
||||
cmp_SheetsStats.MaxHour = MaxHour;
|
||||
}
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int savedBatchId
|
||||
{
|
||||
get
|
||||
{
|
||||
return ComLib.getCurrBatchId(PlaceCod);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void lbtRefreshData_Click(object sender, EventArgs e)
|
||||
{
|
||||
TryUpdateModel();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteMaster)this.Master).showSearch = false;
|
||||
doUpdate();
|
||||
}
|
||||
cmp_reportSelector.eh_doRefresh += Cmp_reportSelector_eh_doRefresh;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void Cmp_reportSelector_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
// display in base al report selezionato
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
private void TryUpdateModel()
|
||||
{
|
||||
Thread.Sleep(50);
|
||||
DateTime oggi = DateTime.Today;
|
||||
// verifica se ci sia VETO x update da redis
|
||||
string rawVal = memLayer.ML.getRSV(ComLib.redVetoDayStats);
|
||||
if (string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
// effettuo calcolo statistiche
|
||||
Stopwatch stopWatchLap = new Stopwatch();
|
||||
stopWatchLap.Start();
|
||||
// se non c'è effettua ricalcolo x i giorni necessari (da ultimo ricalcolo oppure da
|
||||
// valore web.config)
|
||||
int numDays = memLayer.ML.CRI("repNumDayPre");
|
||||
// verifico ultimo record...
|
||||
var tabLast = DLMan.taDayStats.getLast();
|
||||
try
|
||||
{
|
||||
// se vuoto: 90gg
|
||||
if (tabLast == null || tabLast.Count == 0)
|
||||
{
|
||||
numDays = 90;
|
||||
}
|
||||
else
|
||||
{
|
||||
var lastRec = tabLast[0];
|
||||
// calcolo x eccesso la differenza in giorni
|
||||
var dayDiff = Math.Ceiling(oggi.Subtract(lastRec.DataRif).TotalDays + 1);
|
||||
int numDayLast = (int)dayDiff;
|
||||
numDays = numDays > numDayLast ? numDays : numDayLast;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// verifico ultimo giorno disponibile...
|
||||
DateTime DateEnd = oggi.AddDays(1);
|
||||
DateTime DateStart = DateEnd.AddDays(-numDays);
|
||||
DLMan.taDayStats.ProductionUpdate(DateStart, DateEnd, "*", true);
|
||||
int vetoRecalcMin = memLayer.ML.CRI("repVetoRecalcMin");
|
||||
memLayer.ML.setRSV(ComLib.redVetoDayStats, $"Recalc Done | {DateStart} --> {DateEnd}", 60 * vetoRecalcMin);
|
||||
stopWatchLap.Stop();
|
||||
lgInfo($"DayStats DB ProductionUpdate: effettuato ricalcolo statistiche | periodo {DateStart} --> {DateEnd} | elapsed: {stopWatchLap.Elapsed.TotalMilliseconds} ms | veto ricalcolo per {vetoRecalcMin} minuti");
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
//cmp_SheetsStats.Visible = false;
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReports02");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
Response.Redirect("PlannerReports01");
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReports03");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
|
||||
|
||||
public partial class PlannerReports01
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// uplBody 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 uplBody;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_reportSelector control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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>
|
||||
/// UpdateProgressDisplay control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// lbtRefreshData 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 lbtRefreshData;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_SheetsStats control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports02.aspx.cs" Inherits="NKC_WF.site.PlannerReports02" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReportsBatchStats.aspx.cs" Inherits="NKC_WF.site.PlannerReportsBatchStats" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_BatchStatsList.ascx" TagPrefix="uc1" TagName="cmp_BatchStatsList" %>
|
||||
@@ -12,7 +12,7 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReports02 : BasePage
|
||||
public partial class PlannerReportsBatchStats : BasePage
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
@@ -165,15 +165,15 @@ namespace NKC_WF.site
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReports02");
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
Response.Redirect("PlannerReports01");
|
||||
Response.Redirect("PlannerReports");
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReports03");
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
+1
-1
@@ -11,7 +11,7 @@ namespace NKC_WF.site
|
||||
{
|
||||
|
||||
|
||||
public partial class PlannerReports02
|
||||
public partial class PlannerReportsBatchStats
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReports03.aspx.cs" Inherits="NKC_WF.site.PlannerReports03" %>
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PlannerReportsDailyStats.aspx.cs" Inherits="NKC_WF.site.PlannerReportsDailyStats" %>
|
||||
|
||||
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_DailyStatsList.ascx" TagPrefix="uc1" TagName="cmp_DailyStatsList" %>
|
||||
@@ -12,7 +12,7 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReports03 : BasePage
|
||||
public partial class PlannerReportsDailyStats : BasePage
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
@@ -165,15 +165,15 @@ namespace NKC_WF.site
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReports02");
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
Response.Redirect("PlannerReports01");
|
||||
Response.Redirect("PlannerReports");
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReports03");
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
+1
-1
@@ -11,7 +11,7 @@ namespace NKC_WF.site
|
||||
{
|
||||
|
||||
|
||||
public partial class PlannerReports03
|
||||
public partial class PlannerReportsDailyStats
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
Reference in New Issue
Block a user