diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs
index 3677ebe..10e08ad 100644
--- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.cs
@@ -12,17 +12,34 @@ namespace NKC_WF.WebUserControls
///
/// ID univoco da IP
///
- protected string deviceId = "AAA";
+ protected string DeviceId
+ {
+ set
+ {
+ hfDeviceId.Value = value;
+ }
+ get
+ {
+ return hfDeviceId.Value;
+ }
+ }
- ///
- /// Batch selezionato
- ///
- protected int BatchID;
///
/// Sheet selezionato...
///
- protected int SheetID;
-
+ protected int SheetID
+ {
+ set
+ {
+ hfSheetID.Value = value.ToString();
+ }
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfSheetID.Value, out answ);
+ return answ;
+ }
+ }
protected string secOp
{
get
@@ -39,15 +56,29 @@ namespace NKC_WF.WebUserControls
///
protected void updateCurrData()
{
- //!!!FIXME!!! fare calcolo del VERO batch corrente...
- BatchID = 242;
// FORSE 5/5?!?
- var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchID, 3, 5);
+ var sheetList = DataLayer.man.taSHL.getByMLStatus(BatchId, 3, 5);
if (sheetList.Count > 0)
{
SheetID = sheetList[0].SheetID;
}
- deviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0");
+ DeviceId = ComLib.GetIPAddress().Replace(".", "0").Replace(":", "0");
+ }
+ ///
+ /// Batch corrente...
+ ///
+ public int BatchId
+ {
+ set
+ {
+ hfBatchID.Value = value.ToString();
+ }
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfBatchID.Value, out answ);
+ return answ;
+ }
}
protected void Page_Load(object sender, EventArgs e)
{
@@ -124,7 +155,7 @@ namespace NKC_WF.WebUserControls
case codeType.UNK:
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
// elimino item sel...
- ComLib.resetItemPickup(SheetID, deviceId);
+ ComLib.resetItemPickup(SheetID, DeviceId);
doRaiseEv = true;
break;
case codeType.Item:
@@ -164,7 +195,7 @@ namespace NKC_WF.WebUserControls
default:
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
// elimino item sel...
- ComLib.resetItemPickup(SheetID, deviceId);
+ ComLib.resetItemPickup(SheetID, DeviceId);
break;
}
@@ -178,7 +209,7 @@ namespace NKC_WF.WebUserControls
{
// salvo in item sel...
updateCurrData();
- ComLib.saveItemPickup(SheetID, deviceId, itemDtmx);
+ ComLib.saveItemPickup(SheetID, DeviceId, itemDtmx);
}
///
@@ -237,7 +268,7 @@ namespace NKC_WF.WebUserControls
DataLayer.man.taIL.updateStatus(itemIdSelected, 4, "WRK001");
lblDestination.Text = $"Item {itemIdSelected} PUT IN CART {rawData}";
// elimino item sel...
- ComLib.resetItemPickup(SheetID, deviceId);
+ ComLib.resetItemPickup(SheetID, DeviceId);
}
}
break;
@@ -257,7 +288,7 @@ namespace NKC_WF.WebUserControls
DataLayer.man.taIL.updateStatus(itemIdSelected, 5, "WRK001");
lblDestination.Text = $"Item {itemIdSelected} PUT IN BIN {rawData}";
// elimino item sel...
- ComLib.resetItemPickup(SheetID, deviceId);
+ ComLib.resetItemPickup(SheetID, DeviceId);
}
}
break;
diff --git a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs
index f458543..73d796d 100644
--- a/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs
+++ b/NKC_WF/WebUserControls/cmp_unloadSmart.ascx.designer.cs
@@ -14,6 +14,33 @@ namespace NKC_WF.WebUserControls
public partial class cmp_unloadSmart
{
+ ///
+ /// Controllo hfBatchID.
+ ///
+ ///
+ /// 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 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 hfDeviceId.
+ ///
+ ///
+ /// 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 hfDeviceId;
+
///
/// Controllo cmp_barcode.
///
diff --git a/NKC_WF/site/MachineUnloadSmart.aspx b/NKC_WF/site/MachineUnloadSmart.aspx
index 4aba26d..c6a1bcd 100644
--- a/NKC_WF/site/MachineUnloadSmart.aspx
+++ b/NKC_WF/site/MachineUnloadSmart.aspx
@@ -5,5 +5,6 @@
+
diff --git a/NKC_WF/site/MachineUnloadSmart.aspx.cs b/NKC_WF/site/MachineUnloadSmart.aspx.cs
index 58d6fb3..0b42cc3 100644
--- a/NKC_WF/site/MachineUnloadSmart.aspx.cs
+++ b/NKC_WF/site/MachineUnloadSmart.aspx.cs
@@ -1,6 +1,41 @@
-namespace NKC_WF
+using System;
+
+namespace NKC_WF
{
public partial class MachineUnloadSmart : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ doUpdate();
+ }
+ }
+ ///
+ /// Batch corrente...
+ ///
+ public int BatchId
+ {
+ set
+ {
+ hfBatchID.Value = value.ToString();
+ }
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfBatchID.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!
+ // aggiorno child
+ cmp_unloadSmart.BatchId = BatchId;
+ }
}
}
\ No newline at end of file
diff --git a/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs
index 73704a3..00c20b0 100644
--- a/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs
+++ b/NKC_WF/site/MachineUnloadSmart.aspx.designer.cs
@@ -7,18 +7,29 @@
//
//------------------------------------------------------------------------------
-namespace NKC_WF {
-
-
- public partial class MachineUnloadSmart {
-
- ///
- /// Controllo cmp_unloadSmart.
- ///
- ///
- /// Campo generato automaticamente.
- /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
- ///
- protected global::NKC_WF.WebUserControls.cmp_unloadSmart cmp_unloadSmart;
- }
+namespace NKC_WF
+{
+
+
+ public partial class MachineUnloadSmart
+ {
+
+ ///
+ /// Controllo hfBatchID.
+ ///
+ ///
+ /// 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 hfBatchID;
+
+ ///
+ /// Controllo cmp_unloadSmart.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::NKC_WF.WebUserControls.cmp_unloadSmart cmp_unloadSmart;
+ }
}