-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<%: traduci("cancel") %>
+
+
+
+
<%: traduci("scrapped") %>
+
<%: traduci("toPark") %>
+
+
+
<%: traduci("ResetSel") %>
+
-
-
-
-
-
<%: traduci("cancel") %>
-
-
-
-
<%: traduci("scrapped") %>
-
<%: traduci("toPark") %>
-
-
-
<%: traduci("ResetSel") %>
-
-
-
-
\ No newline at end of file
+
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
index 10ecee6..e7ba19f 100644
--- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
@@ -2,6 +2,8 @@
using NKC_SDK;
using SteamWare;
using System;
+using System.Data;
+using System.Linq;
namespace NKC_WF.WebUserControls
{
@@ -87,17 +89,6 @@ namespace NKC_WF.WebUserControls
return answ;
}
}
- protected string secOp
- {
- get
- {
- return hfSecOp.Value;
- }
- set
- {
- hfSecOp.Value = value;
- }
- }
///
/// Aggiorna dati correnti (IP, batch, sheet...)
///
@@ -214,7 +205,7 @@ namespace NKC_WF.WebUserControls
cmp_barcode.inputAcquired = "";
// aggiorno...
doUpdate();
- if(doRaiseEv)
+ if (doRaiseEv)
{
raiseEvent();
}
@@ -234,15 +225,15 @@ namespace NKC_WF.WebUserControls
break;
case codeType.Item:
cmp_barcode.showOutput("badge badge-success", $"Valid IT Code: {decoData.rawData}");
- processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
+ //processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.ItemGeneric:
cmp_barcode.showOutput("badge badge-success", $"Valid IG Code: {decoData.rawData}");
- processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
+ //processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.OtherItem:
cmp_barcode.showOutput("badge badge-success", $"Valid Generic PART Code: {decoData.rawData}");
- processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
+ //processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
case codeType.Material:
cmp_barcode.showOutput("badge badge-warning", $"Material - ignored: {decoData.description}");
@@ -266,7 +257,11 @@ namespace NKC_WF.WebUserControls
doRaiseEv = true;
break;
case codeType.Bin:
- cmp_barcode.showOutput("badge badge-success", $"Valid BN Code: {decoData.description}");
+ cmp_barcode.showOutput("badge badge-warning", $"BIN NOT PAINTED - Ignored: {decoData.description}");
+ doRaiseEv = true;
+ break;
+ case codeType.BinProcessed:
+ cmp_barcode.showOutput("badge badge-success", $"Valid BP Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
break;
default:
@@ -291,50 +286,13 @@ namespace NKC_WF.WebUserControls
// processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
switch (tipoCod)
{
- case codeType.OtherItem:
- lastObject = "";
- var tabOtherItem = DataLayer.man.taOtItem.getByKey(codeInt);
- if (tabOtherItem.Count == 1)
- {
- showOtherItemDetail(true, tabOtherItem[0], false);
- }
- break;
- case codeType.Item:
- lastObject = "";
- tabItem = DataLayer.man.taIL.getBySearch(codeInt, rawData, 0, 999);
- if (tabItem.Count == 1)
- {
- showItemDetail(true, tabItem[0], false);
- }
- else if (tabItem.Count == 0)
- {
- showItemDetail(false, null, true);
- }
- break;
- case codeType.ItemGeneric:
- lastObject = "";
- // PRIMA CERCSE ne ho in stato 1..3
- tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 3);
- if (tabItem.Count == 0)
- {
- // se NON ne trovo cerci FINO a stato 5...
- tabItem = DataLayer.man.taIL.getBySearch(0, rawData, 1, 5);
- }
- if (tabItem.Count == 1)
- {
- showItemDetail(true, tabItem[0], false);
- }
- else if (tabItem.Count == 0)
- {
- showItemDetail(false, null, true);
- }
- break;
case codeType.Cart:
// primo step: verifico dal codice CART l'ordine da cui deriva...
var tabOrdini = DataLayer.man.taOL.getByCart(rawData);
if (tabOrdini.Count == 0)
{
displError($"CART: Order not found for Cart {rawData}, please retry", true);
+ resetCart();
}
else
{
@@ -345,9 +303,14 @@ namespace NKC_WF.WebUserControls
if (tabPLD.Count == 0)
{
displError($"KIT REQuest: PackList not found for Cart {rawData} --> OrdExtCode {rigaOrd.OrderExtCode}, please retry", true);
+ resetCart();
}
else
{
+ // mostro CART!
+ cmp_KS_BinCart.CartID = codeInt;
+ cmp_KS_BinCart.CartDtmx = rawData;
+ cmp_KS_BinCart.doUpdate();
// verifico se il cart sia già stato messo in scarico (in quel caso dico già ok...)
var tabLog = DataLayer.man.taPLog.getByCartId(codeInt);
if (tabLog.Count > 0)
@@ -362,6 +325,7 @@ namespace NKC_WF.WebUserControls
if (tabPLCheck.Count == 0)
{
displError($"ERROR evaluating CART: {rawData}", true);
+ resetCart();
}
else
{
@@ -386,62 +350,90 @@ namespace NKC_WF.WebUserControls
else
{
displError($"ERROR CART contains KIT already on download: {rawData}", true);
+ resetCart();
}
}
}
}
}
-
-#if false
-
- // verifico NON SIA richiesto PAINT
- if (showBin)
- {
- displError("PAINT: BIN REQUESTED: please retry", true);
- }
- else
- {
- if (currCartTab.Count == 1)
- {
- // controllo se sia quello corretto
- if (rawData != currCartTab[0].CartDtmx)
- {
- displError("INCORRECT CART: please retry", true);
- }
- else
- {
- // dichiaro che è depositato
- DataLayer.man.taIL.updateStatus(itemIdSelected, 3, PlaceId);
- lblDestination.Text = $"Item {itemIdSelected} PUT IN CART {rawData}";
- resetSelection(false);
- }
- }
- }
-#endif
break;
- case codeType.Bin:
- lastObject = "";
- // verifico NON SIA richiesto PAINT
- if (showCart)
+ case codeType.BinProcessed:
+ // recupero la tab OKIB x iniziare a controllare i dati...
+ var tabOKIB = DataLayer.man.taOKIB.getByBinDtmxProc(rawData);
+ // PRIMO: verifico SE ho delle righe valide...
+ if (tabOKIB.Count == 0)
{
- displError("NOT PAINTED: CART REQUESTED: please retry", true);
+ displError($"BIN: Code not found {rawData}, please retry", true);
+ resetBin();
}
else
{
- if (currBinTab.Count == 1)
+ var listPainted = tabOKIB.Where(x => !x.IsPaintDateNull()).ToList();
+ if (listPainted.Count == 0)
{
- // controllo se sia quello corretto
- if (rawData != currBinTab[0].BinDtmx)
+ displError($"BIN: Paint Date missing for item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}, please retry", true);
+ resetBin();
+ }
+ else
+ {
+ var listAvailable = tabOKIB.Where(x => !x.IsPaintDateNull() && x.IsOnCartDateNull()).ToList();
+ if (listAvailable.Count == 0)
{
- displError("INCORRECT BIN: please retry", true);
+ displError($"BIN: No item available for pickup on target CART for code {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}, please retry", true);
+ resetBin();
}
else
{
- // dichiaro che è depositato
- DataLayer.man.taIL.updateStatus(itemIdSelected, 4, PlaceId);
- lblDestination.Text = $"Item {itemIdSelected} PUT IN BIN {rawData}";
- resetSelection(false);
+ // verifico SE ci sia ALMENO UN CART in postazione (iniziato KIT ma NON finito)...
+ var listCartAvailable = tabOKIB.Where(x => !x.IsCartKitStartNull() && x.IsCartKitEndNull()).ToList();
+ if (listCartAvailable.Count == 0)
+ {
+ displError($"BIN: No CART available to proceed: {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
+ resetBin();
+ }
+ else
+ {
+ // mostro BIN!
+ cmp_KS_BinCart.BinID = codeInt;
+ cmp_KS_BinCart.BinDtmx = rawData;
+ cmp_KS_BinCart.doUpdate();
+
+
+ // verifico se il Bin sia già stato messo in scarico (in quel caso dico già ok...)
+ var listBinAcquired = tabOKIB.Where(x => !x.IsCartKitStartNull() && x.IsCartKitEndNull() && !x.IsBinKitStartNull()).ToList();
+ if (listBinAcquired.Count > 0)
+ {
+ // verifico se sia GIA' stato completato KIT...
+ var listBinNotCompleted = tabOKIB.Where(x => !x.IsCartKitStartNull() && x.IsCartKitEndNull() && !x.IsBinKitStartNull() && x.IsBinKitEndNull()).ToList();
+ if(listBinNotCompleted.Count == 0)
+ {
+ displError($"BIN: already completed: {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
+ resetBin();
+ }
+ else
+ {
+ displError($"OK BIN: already acquired! {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
+ }
+ }
+ else
+ {
+ // processing...
+ if (lastObject == rawData)
+ {
+ // seconda lettura x indicare in scarico
+ DataLayer.man.taBN.updateKitting(codeInt, true, false);
+ }
+ else
+ {
+ // chiedo seconda lettura
+ lastObject = rawData;
+ displError($"Please read BIN another time: BIN {rawData}", true);
+ // reset preliminare
+ resetBin();
+ }
+ }
+ }
}
}
}
@@ -454,6 +446,19 @@ namespace NKC_WF.WebUserControls
}
+
+ private void resetBin()
+ {
+ cmp_KS_BinCart.BinID = 0;
+ cmp_KS_BinCart.doUpdate();
+ }
+
+ private void resetCart()
+ {
+ cmp_KS_BinCart.CartID = 0;
+ cmp_KS_BinCart.doUpdate();
+ }
+
///
/// Mostra errore ed effettua reset vari...
///
@@ -526,8 +531,6 @@ namespace NKC_WF.WebUserControls
// verifico cosa devo mostrare come PROX passaggio...
showCart = string.IsNullOrEmpty(itemRow.ProcessesReq);
showBin = (itemRow.ProcessesReq.Contains("PaintFlag"));
- secOp = itemRow.PostProcList;
- showSecOp = (!string.IsNullOrEmpty(secOp));
doUpdate();
break;
case 3:
@@ -665,18 +668,10 @@ namespace NKC_WF.WebUserControls
private void doUpdate()
{
// reset grafico
- icnCart.Attributes.Remove("class");
- icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
- icnBin.Attributes.Remove("class");
- icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
- icnSecOp.Attributes.Remove("class");
- icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
// in base al secondo mostro uno o altro...
if (showCart)
{
- icnCart.Attributes.Remove("class");
- icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
lblMessage.Text = "Item recognized";
// controllo SE HO cart
if (currCartTab.Count == 1)
@@ -693,8 +688,6 @@ namespace NKC_WF.WebUserControls
}
else if (showBin)
{
- icnBin.Attributes.Remove("class");
- icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary");
lblMessage.Text = "Item recognized";
if (currBinTab.Count == 1)
{
@@ -709,10 +702,7 @@ namespace NKC_WF.WebUserControls
}
if (showSecOp)
{
- icnSecOp.Attributes.Remove("class");
- icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info");
lblMessage.Text = "Item recognized";
- lblLastBCode.Text = $"DO SEC OP: {secOp}";
lblLastBCode.CssClass = "text-info";
}
// fix btn reset!
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
index bead678..a1b7068 100644
--- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
+++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
@@ -104,6 +104,15 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.HiddenField hfShowSecOp;
+ ///
+ /// Controllo cmp_KS_BinCart.
+ ///
+ ///
+ /// 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_KS_BinCart cmp_KS_BinCart;
+
///
/// Controllo divItemDet.
///
@@ -167,42 +176,6 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblErrorMsg;
- ///
- /// Controllo hfSecOp.
- ///
- ///
- /// 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 hfSecOp;
-
- ///
- /// Controllo icnCart.
- ///
- ///
- /// 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 icnCart;
-
- ///
- /// Controllo icnBin.
- ///
- ///
- /// 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 icnBin;
-
- ///
- /// Controllo icnSecOp.
- ///
- ///
- /// 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 icnSecOp;
-
///
/// Controllo lbtCancel.
///
diff --git a/NKC_WF/site/KittingSmart.aspx b/NKC_WF/site/KittingSmart.aspx
index fd7e80e..be60006 100644
--- a/NKC_WF/site/KittingSmart.aspx
+++ b/NKC_WF/site/KittingSmart.aspx
@@ -1,4 +1,4 @@
-<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="KittingSmart.aspx.cs" Inherits="NKC_WF.site.KittingSmart" %>
+<%@ Page Title="" Language="C#" MasterPageFile="~/SiteContent.master" AutoEventWireup="true" CodeBehind="KittingSmart.aspx.cs" Inherits="NKC_WF.site.KittingSmart" %>
<%@ Register Src="~/WebUserControls/cmp_kittingSmart.ascx" TagPrefix="uc1" TagName="cmp_kittingSmart" %>
<%@ Register Src="~/WebUserControls/cmp_kitRunning.ascx" TagPrefix="uc1" TagName="cmp_kitRunning" %>
diff --git a/NKC_WF/site/KittingSmart.aspx.cs b/NKC_WF/site/KittingSmart.aspx.cs
index 15df822..7e97e22 100644
--- a/NKC_WF/site/KittingSmart.aspx.cs
+++ b/NKC_WF/site/KittingSmart.aspx.cs
@@ -10,7 +10,7 @@ namespace NKC_WF.site
{
if (!Page.IsPostBack)
{
- ((SiteMaster)this.Master).showSearch = false;
+ ((SiteContent)this.Master).showSearch = false;
doUpdate();
}
cmp_kittingSmart.eh_doRefresh += cmp_kittingSmart_eh_doRefresh;