Completata semplificazione pagine reports
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="col-12 col-md-3">
|
||||
<b class="text-uppercase"><%: traduci("BatchPreviewStats") %></b>
|
||||
</div>
|
||||
<div class="col-8 text-right small">
|
||||
<div class="col-12 col-md-9 text-right small">
|
||||
<div class="form-row mb-2">
|
||||
<div class="col-5">
|
||||
<asp:LinkButton runat="server" ID="lbtExportCsv" CssClass="btn btn-sm btn-outline-success" OnClick="lbtExportCsv_Click">Create CSV <i class="fa fa-file-excel-o" aria-hidden="true"></i></asp:LinkButton>
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
cmp_numRow.numRow = 25;
|
||||
cmp_numRow.numRow = 15;
|
||||
grView.PageSize = cmp_numRow.numRow;
|
||||
divGraph.Visible = false;
|
||||
divType.Visible = false;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<div class="col-12 col-md-3">
|
||||
<b class="text-uppercase"><%: traduci("DayProdStats") %></b>
|
||||
</div>
|
||||
<div class="col-9 text-right small">
|
||||
<div class="col-12 col-md-9 text-right small">
|
||||
<div class="form-row mb-2">
|
||||
<div class="col-2">
|
||||
<asp:LinkButton runat="server" ID="lbtExportCsv" CssClass="btn btn-sm btn-outline-success" OnClick="lbtExportCsv_Click">Create CSV <i class="fa fa-file-excel-o" aria-hidden="true"></i></asp:LinkButton>
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
cmp_numRow.numRow = 25;
|
||||
cmp_numRow.numRow = 15;
|
||||
grView.PageSize = cmp_numRow.numRow;
|
||||
divGraph.Visible = false;
|
||||
divType.Visible = false;
|
||||
|
||||
@@ -14,15 +14,6 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
//var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
//prm.add_pageLoaded(pageLoaded);
|
||||
|
||||
//function pageLoaded(sender, args) {
|
||||
// console.log('pageLoaded!');
|
||||
// // chiamo recupero dati + plot della TS e dell'Histogram
|
||||
// plotTS();
|
||||
//}
|
||||
|
||||
// funzione eseguita se successo al caricamento
|
||||
function OnSuccess_(reponse) {
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_reportSelector.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_reportSelector" %>
|
||||
|
||||
<ul class="nav nav-pills nav-justified">
|
||||
<li class="nav-item">
|
||||
<li class="nav-item px-2">
|
||||
<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" Enabled="false"><%: traduci("RepUnloadPart") %></asp:LinkButton>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
<li class="nav-item px-2">
|
||||
<asp:LinkButton runat="server" ID="lbtDayStats" CssClass="btn btn-block btn-outline-primary" OnClick="lbtDailyStats_Click"><%: traduci("RepDayStats") %></asp:LinkButton>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -10,14 +10,21 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_reportSelector : BaseUserControl
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected ReportType _selReport { get; set; } = ReportType.ND;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string currPage
|
||||
{
|
||||
get
|
||||
{
|
||||
string url = HttpContext.Current.Request.Url.PathAndQuery;
|
||||
if (url.Contains("?"))
|
||||
{
|
||||
url = url.Substring(0, url.IndexOf("?"));
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
public ReportType SelReport
|
||||
{
|
||||
get
|
||||
@@ -34,52 +41,11 @@ namespace NKC_WF.WebUserControls
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
#region Protected Properties
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
string baseCss = "btn btn-block btn-outline-primary";
|
||||
lbtBatchPreview.CssClass = baseCss;
|
||||
lbtUnloadPart.CssClass = baseCss;
|
||||
lbtDayStats.CssClass = baseCss;
|
||||
#if false
|
||||
switch (_selReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
lbtBatchPreview.CssClass = "btn btn-block btn-primary";
|
||||
break;
|
||||
protected ReportType _selReport { get; set; } = ReportType.ND;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
lbtUnloadPart.CssClass = "btn btn-block btn-primary";
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
lbtDayStats.CssClass = "btn btn-block btn-primary";
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
public string currPage
|
||||
{
|
||||
get
|
||||
{
|
||||
string url = HttpContext.Current.Request.Url.PathAndQuery;
|
||||
if (url.Contains("?"))
|
||||
{
|
||||
url = url.Substring(0, url.IndexOf("?"));
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -93,11 +59,6 @@ namespace NKC_WF.WebUserControls
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
}
|
||||
|
||||
protected void lbtUnloadPart_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelReport = ReportType.BatchUnloadPreview;
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (currPage.Contains("PlannerReportsBatchStats"))
|
||||
@@ -111,5 +72,16 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
string baseCss = "btn btn-block btn-outline-primary";
|
||||
lbtBatchPreview.CssClass = baseCss;
|
||||
lbtDayStats.CssClass = baseCss;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -23,15 +23,6 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtBatchPreview;
|
||||
|
||||
/// <summary>
|
||||
/// lbtUnloadPart 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 lbtUnloadPart;
|
||||
|
||||
/// <summary>
|
||||
/// lbtDayStats control.
|
||||
/// </summary>
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
<%@ Register Src="~/WebUserControls/cmp_SheetsStats.ascx" TagPrefix="uc1" TagName="cmp_SheetsStats" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_reportSelector.ascx" TagPrefix="uc1" TagName="cmp_reportSelector" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_BatchStatsList.ascx" TagPrefix="uc1" TagName="cmp_BatchStatsList" %>
|
||||
<%@ Register Src="~/WebUserControls/cmp_DailyStatsList.ascx" TagPrefix="uc1" TagName="cmp_DailyStatsList" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<asp:UpdatePanel runat="server" ID="uplBody">
|
||||
@@ -17,7 +15,7 @@
|
||||
<div class="col-2">
|
||||
<h3>Reports</h3>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="col-8">
|
||||
<uc1:cmp_reportSelector runat="server" ID="cmp_reportSelector" />
|
||||
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server" DisplayAfter="100">
|
||||
<ProgressTemplate>
|
||||
@@ -27,23 +25,19 @@
|
||||
</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 class="col-2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-3"></div>
|
||||
<div class="col-9">
|
||||
<div class="row" id="divInstruction" runat="server">
|
||||
<div class="col-12">
|
||||
<div class="text-info text-center">
|
||||
<asp:Label runat="server" ID="lblInstruction" CssClass="alert alert-primary"><i class="fa fa-arrow-up" aria-hidden="true"></i> <%# traduci("PleaseSelectReportType") %><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:Label>
|
||||
<asp:Label runat="server" ID="lblInstruction" CssClass="alert alert-primary p-4 display-4"><i class="fa fa-arrow-up" aria-hidden="true"></i> <%# traduci("PleaseSelectReportType") %><i class="fa fa-arrow-up" aria-hidden="true"></i></asp:Label>
|
||||
</div>
|
||||
</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" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,18 +13,6 @@ namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReports : BasePage
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
protected int savedBatchId
|
||||
{
|
||||
get
|
||||
{
|
||||
return ComLib.getCurrBatchId(PlaceCod);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
@@ -65,104 +53,6 @@ namespace NKC_WF.site
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#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()
|
||||
{
|
||||
lblInstruction.DataBind();
|
||||
lblInstruction.Visible = false;
|
||||
cmp_SheetsStats.Visible = false;
|
||||
cmp_BatchStatsList.Visible = false;
|
||||
cmp_DailyStatsList.Visible = false;
|
||||
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
cmp_SheetsStats.Visible = true;
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
default:
|
||||
lblInstruction.Visible = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteMaster)this.Master).showSearch = false;
|
||||
doUpdate();
|
||||
}
|
||||
//TryUpdateModel();
|
||||
cmp_reportSelector.eh_doRefresh += Cmp_reportSelector_eh_doRefresh;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -182,9 +72,50 @@ namespace NKC_WF.site
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected void lbtRefreshData_Click(object sender, EventArgs e)
|
||||
#region Protected Properties
|
||||
|
||||
protected int savedBatchId
|
||||
{
|
||||
TryUpdateModel();
|
||||
get
|
||||
{
|
||||
return ComLib.getCurrBatchId(PlaceCod);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteMaster)this.Master).showSearch = false;
|
||||
doUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
divInstruction.Visible = false;
|
||||
cmp_SheetsStats.Visible = false;
|
||||
cmp_reportSelector.Visible = false;
|
||||
if (BatchId == 0)
|
||||
{
|
||||
lblInstruction.DataBind();
|
||||
divInstruction.Visible = true;
|
||||
cmp_reportSelector.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmp_SheetsStats.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
+2
-20
@@ -42,13 +42,13 @@ namespace NKC_WF.site
|
||||
protected global::System.Web.UI.UpdateProgress UpdateProgressDisplay;
|
||||
|
||||
/// <summary>
|
||||
/// lbtRefreshData control.
|
||||
/// divInstruction 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;
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divInstruction;
|
||||
|
||||
/// <summary>
|
||||
/// lblInstruction control.
|
||||
@@ -67,23 +67,5 @@ namespace NKC_WF.site
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_SheetsStats cmp_SheetsStats;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_BatchStatsList 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_BatchStatsList cmp_BatchStatsList;
|
||||
|
||||
/// <summary>
|
||||
/// cmp_DailyStatsList 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_DailyStatsList cmp_DailyStatsList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,67 +14,6 @@ namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReportsBatchStats : 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 false
|
||||
if (BatchId > 0)
|
||||
{
|
||||
cmp_reportSelector.SelReport = ReportType.BatchUnloadPreview;
|
||||
// Imposto BatchID...
|
||||
cmp_SheetsStats.BatchID = BatchId;
|
||||
cmp_SheetsStats.MaxHour = MaxHour;
|
||||
}
|
||||
#endif
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int savedBatchId
|
||||
@@ -99,21 +38,13 @@ namespace NKC_WF.site
|
||||
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);
|
||||
@@ -159,29 +90,6 @@ namespace NKC_WF.site
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
//cmp_SheetsStats.Visible = false;
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
Response.Redirect("PlannerReports");
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -14,67 +14,6 @@ namespace NKC_WF.site
|
||||
{
|
||||
public partial class PlannerReportsDailyStats : 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 false
|
||||
if (BatchId > 0)
|
||||
{
|
||||
cmp_reportSelector.SelReport = ReportType.BatchUnloadPreview;
|
||||
// Imposto BatchID...
|
||||
cmp_SheetsStats.BatchID = BatchId;
|
||||
cmp_SheetsStats.MaxHour = MaxHour;
|
||||
}
|
||||
#endif
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected int savedBatchId
|
||||
@@ -99,21 +38,13 @@ namespace NKC_WF.site
|
||||
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);
|
||||
@@ -159,29 +90,6 @@ namespace NKC_WF.site
|
||||
}
|
||||
}
|
||||
|
||||
private void updateDisplay()
|
||||
{
|
||||
//cmp_SheetsStats.Visible = false;
|
||||
switch (cmp_reportSelector.SelReport)
|
||||
{
|
||||
case ReportType.BatchStats:
|
||||
Response.Redirect("PlannerReportsBatchStats");
|
||||
break;
|
||||
|
||||
case ReportType.BatchUnloadPreview:
|
||||
Response.Redirect("PlannerReports");
|
||||
break;
|
||||
|
||||
case ReportType.DailyReport:
|
||||
Response.Redirect("PlannerReportsDailyStats");
|
||||
break;
|
||||
|
||||
case ReportType.ND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user