84 lines
2.2 KiB
C#
84 lines
2.2 KiB
C#
using AppData;
|
|
using System;
|
|
|
|
namespace NKC_WF
|
|
{
|
|
public partial class MachineUnload : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
((SiteMaster)this.Master).showSearch = false;
|
|
doUpdate();
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// BatchId corrente...
|
|
/// </summary>
|
|
public int BatchId
|
|
{
|
|
set
|
|
{
|
|
hfBatchID.Value = value.ToString();
|
|
}
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfBatchID.Value, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// SheetId corrente...
|
|
/// </summary>
|
|
public int SheetId
|
|
{
|
|
set
|
|
{
|
|
hfSheetID.Value = value.ToString();
|
|
}
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfSheetID.Value, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Aggiorna componente principale e child components
|
|
/// </summary>
|
|
private void doUpdate()
|
|
{
|
|
// imposto dati correnti
|
|
setCurrData();
|
|
// aggiorno child
|
|
cmp_MU_stats.BatchId = BatchId;
|
|
cmp_MU_bins.BatchId = BatchId;
|
|
cmp_MU_carts.BatchId = BatchId;
|
|
cmp_MU_svgViewer.BatchId = BatchId;
|
|
cmp_MU_svgViewer.SheetId = SheetId;
|
|
}
|
|
/// <summary>
|
|
/// Imposta dati correnti (Bunk / Sheet)
|
|
/// </summary>
|
|
private void setCurrData()
|
|
{
|
|
// recupero bunk corrente...
|
|
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
|
|
if (currBunk != null)
|
|
{
|
|
BatchId = currBunk.BatchID;
|
|
DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
|
|
if (currSheet != null)
|
|
{
|
|
SheetId = currSheet.SheetID;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
BatchId = 0;
|
|
}
|
|
}
|
|
}
|
|
} |