diff --git a/NKC_WF/site/MachineUnload.aspx.cs b/NKC_WF/site/MachineUnload.aspx.cs
index 1a21799..90699bf 100644
--- a/NKC_WF/site/MachineUnload.aspx.cs
+++ b/NKC_WF/site/MachineUnload.aspx.cs
@@ -14,7 +14,7 @@ namespace NKC_WF
}
}
///
- /// Batch corrente...
+ /// BatchId corrente...
///
public int BatchId
{
@@ -30,29 +30,51 @@ namespace NKC_WF
}
}
///
+ /// SheetId corrente...
+ ///
+ public int SheetId
+ {
+ set
+ {
+ hfSheetID.Value = value.ToString();
+ }
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfSheetID.Value, out answ);
+ return answ;
+ }
+ }
+ ///
/// Aggiorna componente principale e child components
///
private void doUpdate()
{
- //!!!FIXME!!! fare calcolo del VERO batch corrente...
- BatchId = 242; // fixed x test!
+ // imposto dati correnti
+ setCurrData();
// 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)
+ cmp_MU_svgViewer.SheetId = SheetId;
+ }
+
+ ///
+ /// Imposta dati correnti (Bunk / Sheet)
+ ///
+ private void setCurrData()
+ {
+ // recupero bunk corrente...
+ DS_App.StackListRow currBunk = ComLib.getCurrBunk();
+ if (currBunk != null)
{
- // FORSE 5/5?!?
- var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5);
- if (sheetList.Count > 0)
+ BatchId = currBunk.BatchID;
+ DS_App.SheetListRow currSheet = ComLib.getCurrSheet(BatchId);
+ if (currSheet != null)
{
- SheetId = sheetList[0].SheetID;
+ SheetId = currSheet.SheetID;
}
}
- cmp_MU_svgViewer.SheetId = SheetId;
}
}
}
\ No newline at end of file
diff --git a/NKC_WF/site/MachineUnload.aspx.designer.cs b/NKC_WF/site/MachineUnload.aspx.designer.cs
index 14b0e32..e8749b5 100644
--- a/NKC_WF/site/MachineUnload.aspx.designer.cs
+++ b/NKC_WF/site/MachineUnload.aspx.designer.cs
@@ -23,6 +23,15 @@ namespace NKC_WF
///
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
+ ///
+ /// Controllo hfSheetID.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.WebControls.HiddenField hfSheetID;
+
///
/// Controllo upnlDrawings.
///