Files
NKC/NKC_WF/site/PlannerReports.aspx.cs

121 lines
2.8 KiB
C#

using AppData;
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 PlannerReports : 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 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
}
}