Files
NKC/NKC_WF/site/MachineUnload.aspx.cs
T
2020-01-26 11:11:14 +01:00

58 lines
1.3 KiB
C#

using AppData;
using System;
using System.IO;
namespace NKC_WF
{
public partial class MachineUnload : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
doUpdate();
}
}
/// <summary>
/// Batch corrente...
/// </summary>
public int BatchId
{
set
{
hfBatchID.Value = value.ToString();
}
get
{
int answ = 0;
int.TryParse(hfBatchID.Value, out answ);
return answ;
}
}
/// <summary>
/// Aggiorna componente principale e child components
/// </summary>
private void doUpdate()
{
//!!!FIXME!!! fare calcolo del VERO batch corrente...
BatchId = 242; // fixed x test!
// aggiorno child
cmp_MU_stats.BatchId = BatchId;
cmp_MU_bins.BatchId = BatchId;
cmp_MU_carts.BatchId = BatchId;
// calcolo sheet x SVG viewer...
int SheetId = 0;
//SOLO SE ho batch != 0...
if (BatchId > 0)
{
// FORSE 5/5?!?
var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5);
if (sheetList.Count > 0)
{
SheetId = sheetList[0].SheetID;
}
}
cmp_MU_svgViewer.SheetId = SheetId;
}
}
}