diff --git a/AppData/DataLayer.cs b/AppData/DataLayer.cs
index 54e0f5d..f9412cb 100644
--- a/AppData/DataLayer.cs
+++ b/AppData/DataLayer.cs
@@ -8,6 +8,8 @@ namespace AppData
#region oggetti public
public DS_AppTableAdapters.BatchListTableAdapter taBL;
+ public DS_AppTableAdapters.BinsTableAdapter taBN;
+ public DS_AppTableAdapters.CartsTableAdapter taCR;
public DS_AppTableAdapters.ItemListTableAdapter taIL;
public DS_AppTableAdapters.MaterialsTableAdapter taMat;
public DS_AppTableAdapters.OrderListTableAdapter taOL;
@@ -29,6 +31,8 @@ namespace AppData
{
string connString = memLayer.ML.CRS("NKC_WFConnectionString");
taBL.Connection.ConnectionString = connString;
+ taBN.Connection.ConnectionString = connString;
+ taCR.Connection.ConnectionString = connString;
taIL.Connection.ConnectionString = connString;
taMat.Connection.ConnectionString = connString;
taOL.Connection.ConnectionString = connString;
@@ -42,6 +46,8 @@ namespace AppData
private void initTA()
{
taBL = new DS_AppTableAdapters.BatchListTableAdapter();
+ taBN = new DS_AppTableAdapters.BinsTableAdapter();
+ taCR = new DS_AppTableAdapters.CartsTableAdapter();
taIL = new DS_AppTableAdapters.ItemListTableAdapter();
taMat = new DS_AppTableAdapters.MaterialsTableAdapter();
taOL = new DS_AppTableAdapters.OrderListTableAdapter();
diff --git a/NKC_WF/MachineUnloadSmart.aspx b/NKC_WF/MachineUnloadSmart.aspx
index d9ae1ff..24910e3 100644
--- a/NKC_WF/MachineUnloadSmart.aspx
+++ b/NKC_WF/MachineUnloadSmart.aspx
@@ -13,6 +13,28 @@
+
-
<%: traduci("cancel") %>
+
<%: traduci("cancel") %>
diff --git a/NKC_WF/MachineUnloadSmart.aspx.cs b/NKC_WF/MachineUnloadSmart.aspx.cs
index bcfa2cd..5162942 100644
--- a/NKC_WF/MachineUnloadSmart.aspx.cs
+++ b/NKC_WF/MachineUnloadSmart.aspx.cs
@@ -49,11 +49,11 @@ namespace NKC_WF
doRaiseEv = true;
break;
case codeType.Item:
- cmp_barcode.showOutput("badge badge-success", $"Item recognized: {decoData.rawData}");
+ cmp_barcode.showOutput("badge badge-success", $"Valid IT Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.ItemGeneric:
- cmp_barcode.showOutput("badge badge-success", $"Item recognized: {decoData.rawData}");
+ cmp_barcode.showOutput("badge badge-success", $"Valid IG Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.Material:
@@ -73,11 +73,11 @@ namespace NKC_WF
doRaiseEv = true;
break;
case codeType.Cart:
- cmp_barcode.showOutput("badge badge-success", $"Cart recognized: {decoData.description}");
+ cmp_barcode.showOutput("badge badge-success", $"Valid CR Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.Bin:
- cmp_barcode.showOutput("badge badge-success", $"Bin recognized: {decoData.description}");
+ cmp_barcode.showOutput("badge badge-success", $"Valid BN Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
default:
@@ -107,7 +107,40 @@ namespace NKC_WF
///
private void processItemSuggestion(codeType tipoCod, string rawData, int codeInt)
{
- // processo suggerimenti x ITEM dato suo RawData (Dtmx) e Cod univoco (intero)
+ DS_App.ItemListDataTable tabItem = null;
+ // processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
+ switch (tipoCod)
+ {
+ case codeType.Item:
+ tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData);
+ if (tabItem.Count == 1)
+ {
+ showItemDetail(true, tabItem[0], false);
+ }
+ else if (tabItem.Count == 0)
+ {
+ showItemDetail(false, null, true);
+ }
+ break;
+ case codeType.ItemGeneric:
+ tabItem = DataLayer.man.taIL.getBySearch(0, rawData);
+ if (tabItem.Count == 1)
+ {
+ showItemDetail(true, tabItem[0], false);
+ }
+ else if (tabItem.Count == 0)
+ {
+ showItemDetail(false, null, true);
+ }
+ break;
+ case codeType.Cart:
+ break;
+ case codeType.Bin:
+ break;
+ default:
+ break;
+ }
+
// cerco su DB
@@ -126,6 +159,43 @@ namespace NKC_WF
lblDestination.Text = "SEND TO CART CR00012";
lblDestination.CssClass = "text-success";
}
+ ///
+ /// Mostra o nasconde dettaglio su ITEM letto
+ ///
+ ///
+ ///
+ private void showItemDetail(bool showItem, DS_App.ItemListRow itemRow, bool showError)
+ {
+ divItemDet.Visible = showItem;
+ divItemError.Visible = showError;
+ if (showError)
+ {
+ lblErrorMsg.Text = "Item not found";
+ itemIdSelected = 0;
+ }
+ if (showItem)
+ {
+ lblItemCode.Text = itemRow.ItemExtCode;
+ lblItemDesc.Text = itemRow.ItemDesc;
+ lblItemDtmx.Text = itemRow.ItemDtmx;
+ itemIdSelected = itemRow.ItemID;
+ }
+ }
+
+ public int itemIdSelected
+ {
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfItemID.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfItemID.Value = value.ToString();
+ }
+ }
+
private void resetIcons()
{
@@ -171,5 +241,12 @@ namespace NKC_WF
}
#endif
}
+
+ protected void lbtCancel_Click(object sender, EventArgs e)
+ {
+ // resetto item selezionato...
+ itemIdSelected = 0;
+ showItemDetail(false, null, false);
+ }
}
}
\ No newline at end of file
diff --git a/NKC_WF/MachineUnloadSmart.aspx.designer.cs b/NKC_WF/MachineUnloadSmart.aspx.designer.cs
index e6ea9d7..a40ea6e 100644
--- a/NKC_WF/MachineUnloadSmart.aspx.designer.cs
+++ b/NKC_WF/MachineUnloadSmart.aspx.designer.cs
@@ -30,6 +30,69 @@ namespace NKC_WF {
///
protected global::System.Web.UI.WebControls.HiddenField hfBarcode;
+ ///
+ /// Controllo divItemDet.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemDet;
+
+ ///
+ /// Controllo hfItemID.
+ ///
+ ///
+ /// 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 hfItemID;
+
+ ///
+ /// Controllo lblItemCode.
+ ///
+ ///
+ /// 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.Label lblItemCode;
+
+ ///
+ /// Controllo lblItemDesc.
+ ///
+ ///
+ /// 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.Label lblItemDesc;
+
+ ///
+ /// Controllo lblItemDtmx.
+ ///
+ ///
+ /// 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.Label lblItemDtmx;
+
+ ///
+ /// Controllo divItemError.
+ ///
+ ///
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divItemError;
+
+ ///
+ /// Controllo lblErrorMsg.
+ ///
+ ///
+ /// 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.Label lblErrorMsg;
+
///
/// Controllo icnCart.
///