Bozza cambio stato su CART/BIN

This commit is contained in:
Samuele E. Locatelli
2019-09-27 19:06:20 +02:00
parent c2c986f2cd
commit e7a6d3bdc6
+55 -9
View File
@@ -148,8 +148,38 @@ namespace NKC_WF
}
break;
case codeType.Cart:
if (currCartTab.Count == 1)
{
// controllo se sia quello corretto
if (rawData != currCartTab[0].CartDtmx)
{
lblErrorMsg.Text = "INCORRECT CART: please retry";
itemIdSelected = 0;
divItemError.Visible = true;
}
else
{
// dichiaro che è depositato
DataLayer.man.taIL.updateStatus(itemIdSelected, 4, "WRK001");
}
}
break;
case codeType.Bin:
if (currBinTab.Count == 1)
{
// controllo se sia quello corretto
if (rawData != currBinTab[0].BinDtmx)
{
lblErrorMsg.Text = "INCORRECT BIN: please retry";
itemIdSelected = 0;
divItemError.Visible = true;
}
else
{
// dichiaro che è depositato
DataLayer.man.taIL.updateStatus(itemIdSelected, 5, "WRK001");
}
}
break;
default:
break;
@@ -167,11 +197,13 @@ namespace NKC_WF
// mostro output (compreso che mi aspetto entro 30 sec lettura cart/Bin)
#if false
icnCart.Attributes.Remove("class");
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
lblMessage.Text = "Riconosciuto item";
lblDestination.Text = "SEND TO CART CR00012";
lblDestination.CssClass = "text-success";
lblDestination.CssClass = "text-success";
#endif
}
/// <summary>
/// Mostra o nasconde dettaglio su ITEM letto
@@ -245,6 +277,21 @@ namespace NKC_WF
lbtSecOp.Visible = false;
}
protected DS_App.BinsDataTable currBinTab
{
get
{
return DataLayer.man.taBN.getByItemID(itemIdSelected);
}
}
protected DS_App.CartsDataTable currCartTab
{
get
{
return DataLayer.man.taCR.getByItemID(itemIdSelected);
}
}
private void doUpdate()
{
// reset grafico
@@ -264,14 +311,14 @@ namespace NKC_WF
icnCart.Attributes.Remove("class");
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
lblMessage.Text = "Item recognized";
var tabCart = DataLayer.man.taCR.getByItemID(itemIdSelected);
if (tabCart.Count == 1)
// controllo SE HO cart
if (currCartTab.Count == 1)
{
lblDestination.Text = $"SEND TO CART {tabCart[0].CartDtmx}";
lblDestination.Text = $"SEND TO CART {currCartTab[0].CartDtmx}";
}
else
{
lblDestination.Text = $"ERROR SEARCHING CART: {tabCart.Count} found!";
lblDestination.Text = $"ERROR SEARCHING CART: {currCartTab.Count} found!";
}
lblDestination.CssClass = "text-success";
}
@@ -280,14 +327,13 @@ namespace NKC_WF
icnBin.Attributes.Remove("class");
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary");
lblMessage.Text = "Item recognized";
var tabBin = DataLayer.man.taBN.getByItemID(itemIdSelected);
if (tabBin.Count == 1)
if (currBinTab.Count == 1)
{
lblDestination.Text = $"SEND TO BIN {tabBin[0].BinDtmx}";
lblDestination.Text = $"SEND TO BIN {currBinTab[0].BinDtmx}";
}
else
{
lblDestination.Text = $"ERROR SEARCHING BIN: {tabBin.Count} found!";
lblDestination.Text = $"ERROR SEARCHING BIN: {currBinTab.Count} found!";
}
lblDestination.CssClass = "text-primary";
}