+
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx
new file mode 100644
index 0000000..b9a519f
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx
@@ -0,0 +1,36 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_OkoiCart.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_OkoiCart" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.cs
new file mode 100644
index 0000000..86317d6
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NKC_WF.WebUserControls
+{
+ public partial class cmp_KS_OkoiCart : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ public string Dtmx
+ {
+ get
+ {
+ return hfDtmx.Value;
+ }
+ set
+ {
+ hfDtmx.Value = value.Trim();
+ grView.DataBind();
+ }
+ }
+
+ internal void doUpdate()
+ {
+ grView.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.designer.cs
new file mode 100644
index 0000000..8231470
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiCart.ascx.designer.cs
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+namespace NKC_WF.WebUserControls
+{
+
+
+ public partial class cmp_KS_OkoiCart
+ {
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// 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.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// 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.ObjectDataSource ods;
+
+ ///
+ /// Controllo hfDtmx.
+ ///
+ ///
+ /// 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 hfDtmx;
+ }
+}
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx
new file mode 100644
index 0000000..1efd1b8
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx
@@ -0,0 +1,35 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_OkoiOI.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_OkoiOI" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.cs
new file mode 100644
index 0000000..df773c6
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NKC_WF.WebUserControls
+{
+ public partial class cmp_KS_OkoiOI : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ public string Dtmx
+ {
+ get
+ {
+ return hfDtmx.Value;
+ }
+ set
+ {
+ hfDtmx.Value = value.Trim();
+ grView.DataBind();
+ }
+ }
+
+ internal void doUpdate()
+ {
+ grView.DataBind();
+ }
+ }
+}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.designer.cs
new file mode 100644
index 0000000..bcbdd52
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiOI.ascx.designer.cs
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+namespace NKC_WF.WebUserControls
+{
+
+
+ public partial class cmp_KS_OkoiOI
+ {
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// 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.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// 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.ObjectDataSource ods;
+
+ ///
+ /// Controllo hfDtmx.
+ ///
+ ///
+ /// 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 hfDtmx;
+ }
+}
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx
new file mode 100644
index 0000000..f46f7e0
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx
@@ -0,0 +1,35 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_OkoiSum.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_OkoiSum" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.cs
new file mode 100644
index 0000000..fe43d13
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NKC_WF.WebUserControls
+{
+ public partial class cmp_KS_OkoiSum : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ OtherItemID = 0;
+ CartID = 0;
+ }
+ }
+
+ public void doUpdate()
+ {
+ grView.DataBind();
+ }
+
+ public int OtherItemID
+ {
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfOtherItemID.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfOtherItemID.Value = value.ToString();
+ }
+ }
+
+ public int CartID
+ {
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfCartID.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfCartID.Value = value.ToString();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.designer.cs
new file mode 100644
index 0000000..ab482c1
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OkoiSum.ascx.designer.cs
@@ -0,0 +1,53 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+namespace NKC_WF.WebUserControls
+{
+
+
+ public partial class cmp_KS_OkoiSum
+ {
+
+ ///
+ /// Controllo grView.
+ ///
+ ///
+ /// 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.GridView grView;
+
+ ///
+ /// Controllo ods.
+ ///
+ ///
+ /// 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.ObjectDataSource ods;
+
+ ///
+ /// Controllo hfOtherItemID.
+ ///
+ ///
+ /// 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 hfOtherItemID;
+
+ ///
+ /// Controllo hfCartID.
+ ///
+ ///
+ /// 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 hfCartID;
+ }
+}
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx b/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx
deleted file mode 100644
index d6e5f85..0000000
--- a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx
+++ /dev/null
@@ -1 +0,0 @@
-<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_OtherCart.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_OtherCart" %>
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.cs
deleted file mode 100644
index dd32c6e..0000000
--- a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-
-namespace NKC_WF.WebUserControls
-{
- public partial class cmp_KS_OtherCart : System.Web.UI.UserControl
- {
- protected void Page_Load(object sender, EventArgs e)
- {
-
- }
- }
-}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.designer.cs
deleted file mode 100644
index c38d3f1..0000000
--- a/NKC_WF/WebUserControls/cmp_KS_OtherCart.ascx.designer.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// Codice generato da uno strumento.
-//
-// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
-// il codice viene rigenerato.
-//
-//------------------------------------------------------------------------------
-
-namespace NKC_WF.WebUserControls
-{
-
-
- public partial class cmp_KS_OtherCart
- {
- }
-}
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx
new file mode 100644
index 0000000..7740366
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx
@@ -0,0 +1,29 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_OtherItemsCart.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_OtherItemsCart" %>
+<%@ Register Src="~/WebUserControls/cmp_KS_currOI.ascx" TagPrefix="uc1" TagName="cmp_KS_currOI" %>
+<%@ Register Src="~/WebUserControls/cmp_KS_currCart.ascx" TagPrefix="uc1" TagName="cmp_KS_currCart" %>
+<%@ Register Src="~/WebUserControls/cmp_KS_OkoiSum.ascx" TagPrefix="uc1" TagName="cmp_KS_OkoiSum" %>
+<%@ Register Src="~/WebUserControls/cmp_KS_OkoiOI.ascx" TagPrefix="uc1" TagName="cmp_KS_OkoiOI" %>
+
+
+
+
+
+
+
+
+
+
+
+<%: hfNumAll.Value %> (ALL)
+
+
+
+
+
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.cs
new file mode 100644
index 0000000..0228087
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.cs
@@ -0,0 +1,161 @@
+using AppData;
+using SteamWare;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NKC_WF.WebUserControls
+{
+ public partial class cmp_KS_OtherItemsCart : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ fixVisibility();
+ }
+ }
+
+ protected bool showBtns
+ {
+ get
+ {
+ return otherItemOk && cartOk;
+ }
+ }
+ protected bool otherItemOk
+ {
+ get
+ {
+ return OtherItemID > 0;
+ }
+ }
+ protected bool cartOk
+ {
+ get
+ {
+ return CartID > 0;
+ }
+ }
+
+ public int numMax
+ {
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfNumAll.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfNumAll.Value = value.ToString();
+ }
+ }
+
+ private void fixVisibility()
+ {
+ // controllo visualizazione in base ai dati presenti
+ cmp_KS_currOI.Visible = otherItemOk;
+ cmp_KS_currCart.Visible = showBtns;
+ if (showBtns)
+ {
+ cmp_KS_OkoiOI.Visible = false;
+ }
+ else
+ {
+ cmp_KS_OkoiOI.Visible = otherItemOk;
+ }
+ // se ho bin e cart --> mostro buttons calcolati!
+ lbtAddAll.Visible = false;
+ if (showBtns)
+ {
+ var tabOKOI = DataLayer.man.taOKOI_Sum.getByKey(OtherItemID, CartID);
+ if (tabOKOI.Count > 0)
+ {
+ numMax = tabOKOI[0].NumItems - tabOKOI[0].NumPicked;
+ lbtAddAll.Visible = true;
+ }
+ }
+ }
+
+ public void doUpdate()
+ {
+ fixVisibility();
+ if (otherItemOk && !cartOk)
+ {
+ cmp_KS_OkoiOI.doUpdate();
+ }
+ }
+
+ ///
+ /// Cart selezionato
+ ///
+ public int CartID
+ {
+ get
+ {
+ return cmp_KS_currCart.CurrId;
+ }
+ set
+ {
+ cmp_KS_currCart.CurrId = value;
+ }
+ }
+ ///
+ /// Matrix Cart selezionato
+ ///
+ public string CartDtmx
+ {
+ get
+ {
+ return cmp_KS_currCart.Dtmx;
+ }
+ set
+ {
+ cmp_KS_currCart.Dtmx = value;
+ }
+ }
+ ///
+ /// OtherItem selezionato
+ ///
+ public int OtherItemID
+ {
+ get
+ {
+ return cmp_KS_currOI.CurrId;
+ }
+ set
+ {
+ cmp_KS_currOI.CurrId = value;
+ }
+ }
+ ///
+ /// Matrix OtherItem selezionato
+ ///
+ public string OtherItemDtmx
+ {
+ get
+ {
+ return cmp_KS_currOI.Dtmx;
+ }
+ set
+ {
+ cmp_KS_currOI.Dtmx = value;
+ cmp_KS_OkoiOI.Dtmx = value;
+ }
+ }
+
+ protected void lbtAddAll_Click(object sender, EventArgs e)
+ {
+ DataLayer.man.taPLog.acquireOtherItems(OtherItemID, CartID, numMax, currIpAddress(), user_std.UtSn.userNameAD);
+ // resetto
+ CartID = 0;
+ OtherItemID = 0;
+ // sollevo evento
+ raiseEvent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.designer.cs
new file mode 100644
index 0000000..1d3b4dd
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_OtherItemsCart.ascx.designer.cs
@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+namespace NKC_WF.WebUserControls
+{
+
+
+ public partial class cmp_KS_OtherItemsCart
+ {
+
+ ///
+ /// Controllo cmp_KS_currOI.
+ ///
+ ///
+ /// 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_currOI cmp_KS_currOI;
+
+ ///
+ /// Controllo hfNumAll.
+ ///
+ ///
+ /// 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 hfNumAll;
+
+ ///
+ /// Controllo lbtAddAll.
+ ///
+ ///
+ /// 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.LinkButton lbtAddAll;
+
+ ///
+ /// Controllo cmp_KS_currCart.
+ ///
+ ///
+ /// 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_currCart cmp_KS_currCart;
+
+ ///
+ /// Controllo cmp_KS_OkoiOI.
+ ///
+ ///
+ /// 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_OkoiOI cmp_KS_OkoiOI;
+ }
+}
diff --git a/NKC_WF/WebUserControls/cmp_KS_currOI.ascx b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx
new file mode 100644
index 0000000..3fac7e2
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx
@@ -0,0 +1,6 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_KS_currOI.ascx.cs" Inherits="NKC_WF.WebUserControls.cmp_KS_currOI" %>
+
diff --git a/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.cs b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.cs
new file mode 100644
index 0000000..330c9b8
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NKC_WF.WebUserControls
+{
+ public partial class cmp_KS_currOI : BaseUserControl
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ public int CurrId
+ {
+ get
+ {
+ int answ = 0;
+ int.TryParse(hfValue.Value, out answ);
+ return answ;
+ }
+ set
+ {
+ hfValue.Value = value.ToString();
+ }
+ }
+ public string Dtmx
+ {
+ get
+ {
+ return lblDtmx.Text;
+ }
+ set
+ {
+ lblDtmx.Text = value;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.designer.cs
new file mode 100644
index 0000000..c56f301
--- /dev/null
+++ b/NKC_WF/WebUserControls/cmp_KS_currOI.ascx.designer.cs
@@ -0,0 +1,35 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da uno strumento.
+//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
+//------------------------------------------------------------------------------
+
+namespace NKC_WF.WebUserControls
+{
+
+
+ public partial class cmp_KS_currOI
+ {
+
+ ///
+ /// Controllo hfValue.
+ ///
+ ///
+ /// 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 hfValue;
+
+ ///
+ /// Controllo lblDtmx.
+ ///
+ ///
+ /// 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 lblDtmx;
+ }
+}
diff --git a/NKC_WF/WebUserControls/cmp_kitRunning.ascx b/NKC_WF/WebUserControls/cmp_kitRunning.ascx
index 53a965d..fd892e5 100644
--- a/NKC_WF/WebUserControls/cmp_kitRunning.ascx
+++ b/NKC_WF/WebUserControls/cmp_kitRunning.ascx
@@ -3,12 +3,13 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/NKC_WF/WebUserControls/cmp_kittingBin.ascx b/NKC_WF/WebUserControls/cmp_kittingBin.ascx
index 2cb6166..36217ad 100644
--- a/NKC_WF/WebUserControls/cmp_kittingBin.ascx
+++ b/NKC_WF/WebUserControls/cmp_kittingBin.ascx
@@ -8,7 +8,7 @@
CNC:
diff --git a/NKC_WF/WebUserControls/cmp_kittingCart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingCart.ascx.cs
index c3ccb9b..bcd5447 100644
--- a/NKC_WF/WebUserControls/cmp_kittingCart.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_kittingCart.ascx.cs
@@ -24,7 +24,7 @@ namespace NKC_WF.WebUserControls
{
answ = "alert-danger border-danger";
}
- else if ((numReady + numOtherReady > 0) || (numOtherWait > 0))
+ else if (numReady + numOtherWait > 0)
{
answ = "alert-warning border-warning";
}
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
index e7ba19f..cffc385 100644
--- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
+++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.cs
@@ -9,45 +9,6 @@ namespace NKC_WF.WebUserControls
{
public partial class cmp_kittingSmart : BaseUserControl
{
- protected bool showBin
- {
- set
- {
- hfShowBin.Value = value.ToString();
- }
- get
- {
- bool answ = false;
- bool.TryParse(hfShowBin.Value, out answ);
- return answ;
- }
- }
- protected bool showCart
- {
- set
- {
- hfShowCart.Value = value.ToString();
- }
- get
- {
- bool answ = false;
- bool.TryParse(hfShowCart.Value, out answ);
- return answ;
- }
- }
- protected bool showSecOp
- {
- set
- {
- hfShowSecOp.Value = value.ToString();
- }
- get
- {
- bool answ = false;
- bool.TryParse(hfShowSecOp.Value, out answ);
- return answ;
- }
- }
///
/// ID univoco da IP
///
@@ -129,17 +90,25 @@ namespace NKC_WF.WebUserControls
}
cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh;
cmp_barcode.eh_doReset += Cmp_barcode_eh_doReset;
- // resetto
- lblLastBCode.Text = "------";
- lblMessage.Text = "----";
- lblDestination.Text = "--";
+ cmp_KS_BinCart.eh_doRefresh += cmp_KS_BinCart_eh_doRefresh;
+ cmp_KS_OtherItemsCart.eh_doRefresh += cmp_KS_OtherItemsCart_eh_doRefresh;
+ }
+
+ private void cmp_KS_OtherItemsCart_eh_doRefresh(object sender, EventArgs e)
+ {
+ displInfo("Other PART added", true);
+ }
+
+ private void cmp_KS_BinCart_eh_doRefresh(object sender, EventArgs e)
+ {
+ displInfo("PAINT PART added", true);
}
private void resetShowData()
{
- showCart = false;
- showBin = false;
- showSecOp = false;
+ cmp_KS_Cart.Visible = false;
+ cmp_KS_BinCart.Visible = false;
+ cmp_KS_OtherItemsCart.Visible = false;
}
///
@@ -233,7 +202,7 @@ namespace NKC_WF.WebUserControls
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}");
@@ -269,7 +238,6 @@ namespace NKC_WF.WebUserControls
resetSelection(false);
break;
}
-
return doRaiseEv;
}
@@ -283,6 +251,7 @@ namespace NKC_WF.WebUserControls
private void processItemSuggestion(codeType tipoCod, string rawData, int codeInt)
{
DS_App.ItemListDataTable tabItem = null;
+ divInfo.Visible = false;
// processo suggerimenti x ITEM / cart / bin dato suo RawData (Dtmx) e Cod univoco (intero)
switch (tipoCod)
{
@@ -308,15 +277,33 @@ namespace NKC_WF.WebUserControls
else
{
// mostro CART!
- cmp_KS_BinCart.CartID = codeInt;
- cmp_KS_BinCart.CartDtmx = rawData;
- cmp_KS_BinCart.doUpdate();
+ setCart(rawData, codeInt);
// 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)
{
- // se già in scarico ok --> segnalo
- displError($"CART already on KIT: Cart {rawData}", true);
+ // verifico se sia completo -_> reset... altrimenti lascio così...
+ var tabCOK = DataLayer.man.taCOK.GetData();
+ // cerco se sia "green" numWait + numReady + numOtherWait = 0
+ var tabGreen = tabCOK.Where(x => (x.NumPzWaiting + x.NumPzBinAvail + x.OtherQtyWait == 0) && x.CartDtmx == rawData).ToList();
+ if(tabGreen.Count>0)
+ {
+ // verifico se sia SECONDA lettura
+ if (lastObject == rawData)
+ {
+ // --> metto cart in scarico e registro LOG come se avesse appena letto 1:1 ogni Dtmx
+ DataLayer.man.taPLog.closeCart(codeInt);
+ // mostro che ho fatto
+ displInfo($"OK: CART removed {rawData}", true);
+ lastObject = "";
+ }
+ else
+ {
+ lastObject = rawData;
+ displInfo($"Cart already completed, please read CART another time: Cart {rawData}", true);
+ }
+ resetCart();
+ }
}
else
{
@@ -338,7 +325,7 @@ namespace NKC_WF.WebUserControls
{
// --> metto cart in scarico e registro LOG come se avesse appena letto 1:1 ogni Dtmx
DataLayer.man.taPLog.acquireCart(rawData, currIpAddress(), user_std.UtSn.userNameAD);
- displError($"OK: CART acquired {rawData} - item confirmed", true);
+ displInfo($"OK: CART acquired {rawData} - item confirmed", true);
lastObject = "";
}
else
@@ -365,6 +352,7 @@ namespace NKC_WF.WebUserControls
if (tabOKIB.Count == 0)
{
displError($"BIN: Code not found {rawData}, please retry", true);
+ // reset preliminare
resetBin();
}
else
@@ -373,6 +361,7 @@ namespace NKC_WF.WebUserControls
if (listPainted.Count == 0)
{
displError($"BIN: Paint Date missing for item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}, please retry", true);
+ // reset preliminare
resetBin();
}
else
@@ -381,6 +370,7 @@ namespace NKC_WF.WebUserControls
if (listAvailable.Count == 0)
{
displError($"BIN: No item available for pickup on target CART for code {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}, please retry", true);
+ // reset preliminare
resetBin();
}
else
@@ -390,14 +380,13 @@ namespace NKC_WF.WebUserControls
if (listCartAvailable.Count == 0)
{
displError($"BIN: No CART available to proceed: {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
+ // reset preliminare
resetBin();
}
else
{
// mostro BIN!
- cmp_KS_BinCart.BinID = codeInt;
- cmp_KS_BinCart.BinDtmx = rawData;
- cmp_KS_BinCart.doUpdate();
+ setBin(rawData, codeInt);
// verifico se il Bin sia già stato messo in scarico (in quel caso dico già ok...)
@@ -406,15 +395,12 @@ namespace NKC_WF.WebUserControls
{
// 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)
+ if (listBinNotCompleted.Count == 0)
{
displError($"BIN: already completed: {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
+ // reset preliminare
resetBin();
}
- else
- {
- displError($"OK BIN: already acquired! {rawData} | item {tabOKIB[0].ItemDesc} | order {tabOKIB[0].OrderExtCode}", true);
- }
}
else
{
@@ -438,6 +424,44 @@ namespace NKC_WF.WebUserControls
}
}
break;
+ case codeType.OtherItem:
+ // recupero la tab OKOI x iniziare a controllare i dati...
+ var tabOKOI = DataLayer.man.taOKOI.getByOtherItemDtmx(rawData);
+ // PRIMO: verifico SE ho delle righe valide...
+ if (tabOKOI.Count == 0)
+ {
+ displError($"PART: Code not found {rawData}, please retry", true);
+ // reset preliminare
+ resetOtherItem();
+ }
+ else
+ {
+ var listAvailable = tabOKOI.Where(x => x.IsOnCartDateNull()).ToList();
+ if (listAvailable.Count == 0)
+ {
+ displError($"PART: No item available for pickup on target CART for code {rawData} | item {tabOKOI[0].OtherItemDesc} | order {tabOKOI[0].OrderExtCode}, please retry", true);
+ // reset preliminare
+ resetOtherItem();
+ }
+ else
+ {
+ // verifico SE ci sia ALMENO UN CART in postazione (iniziato KIT ma NON finito)...
+ var listCartAvailable = tabOKOI.Where(x => !x.IsCartKitStartNull() && x.IsCartKitEndNull()).ToList();
+ if (listCartAvailable.Count == 0)
+ {
+ displError($"PART: No CART available to proceed: {rawData} | item {tabOKOI[0].OtherItemDesc} | order {tabOKOI[0].OrderExtCode}", true);
+ // reset preliminare
+ resetOtherItem();
+ }
+ else
+ {
+ // mostro OtherItem!
+ setOtherItem(rawData, codeInt);
+
+ }
+ }
+ }
+ break;
default:
lastObject = "";
break;
@@ -445,29 +469,92 @@ namespace NKC_WF.WebUserControls
+ }
+ ///
+ /// Imposta il codice OtherItem sugli oggetti dipendenti
+ ///
+ ///
+ ///
+ private void setOtherItem(string rawData, int codeInt)
+ {
+ cmp_KS_OtherItemsCart.OtherItemID = codeInt;
+ cmp_KS_OtherItemsCart.OtherItemDtmx = rawData;
+ cmp_KS_OtherItemsCart.doUpdate();
+ fixVisibility();
+ }
+
+ ///
+ /// Imposta il bin sugli oggetti dipendenti
+ ///
+ ///
+ ///
+ private void setBin(string rawData, int codeInt)
+ {
+ cmp_KS_BinCart.BinID = codeInt;
+ cmp_KS_BinCart.BinDtmx = rawData;
+ cmp_KS_BinCart.doUpdate();
+ fixVisibility();
+ }
+ ///
+ /// Imposta il cart sugli oggetti dipendenti
+ ///
+ ///
+ ///
+ private void setCart(string rawData, int codeInt)
+ {
+ cmp_KS_BinCart.CartID = codeInt;
+ cmp_KS_BinCart.CartDtmx = rawData;
+ cmp_KS_BinCart.doUpdate();
+ cmp_KS_OtherItemsCart.CartID = codeInt;
+ cmp_KS_OtherItemsCart.CartDtmx = rawData;
+ cmp_KS_OtherItemsCart.doUpdate();
+ cmp_KS_Cart.CartID = codeInt;
+ cmp_KS_Cart.CartDtmx = rawData;
+ cmp_KS_Cart.doUpdate();
+ fixVisibility();
}
private void resetBin()
{
cmp_KS_BinCart.BinID = 0;
- cmp_KS_BinCart.doUpdate();
+ fixVisibility();
}
private void resetCart()
{
cmp_KS_BinCart.CartID = 0;
- cmp_KS_BinCart.doUpdate();
+ cmp_KS_OtherItemsCart.CartID = 0;
+ cmp_KS_Cart.CartID = 0;
+ fixVisibility();
+ }
+ private void resetOtherItem()
+ {
+ cmp_KS_OtherItemsCart.OtherItemID = 0;
+ fixVisibility();
}
+ ///
+ /// Mostra errore ed effettua reset vari...
+ ///
+ ///
+ ///
+ protected void displInfo(string infoMessage, bool resetStatus)
+ {
+ lblSuccessMsg.Text = infoMessage;
+ divError.Visible = false;
+ divInfo.Visible = true;
+ resetSelection(resetStatus);
+ }
///
/// Mostra errore ed effettua reset vari...
///
///
///
- protected void displError(string errorMessage, bool resetStatus)
+ protected void displError(string errorMessage, bool resetStatus)
{
lblErrorMsg.Text = errorMessage;
- divItemError.Visible = true;
+ divError.Visible = true;
+ divInfo.Visible = false;
resetSelection(resetStatus);
}
///
@@ -506,7 +593,7 @@ namespace NKC_WF.WebUserControls
{
resetShowData();
divItemDet.Visible = showItem;
- divItemError.Visible = showError;
+ divError.Visible = showError;
if (showError)
{
displError("Item not found", true);
@@ -528,9 +615,6 @@ namespace NKC_WF.WebUserControls
case 100:
// salvo che è in STATO 2 (picked up)
DataLayer.man.taIL.updateStatus(itemRow.ItemID, 2, PlaceId);
- // verifico cosa devo mostrare come PROX passaggio...
- showCart = string.IsNullOrEmpty(itemRow.ProcessesReq);
- showBin = (itemRow.ProcessesReq.Contains("PaintFlag"));
doUpdate();
break;
case 3:
@@ -556,68 +640,6 @@ namespace NKC_WF.WebUserControls
}
lbtResetSel.Visible = (itemIdSelected != 0);
}
- ///
- /// Mostra o nasconde dettaglio su OTHER ITEM letto
- ///
- ///
- ///
- ///
- private void showOtherItemDetail(bool showItem, DS_App.OtherItemRow otherItemRow, bool showError)
- {
- resetShowData();
- divItemDet.Visible = showItem;
- divItemError.Visible = showError;
- if (showError)
- {
- displError("Other Item not found", true);
- }
- if (showItem)
- {
- lblItemCode.Text = otherItemRow.OtherItemExtCode;
- lblItemDesc.Text = otherItemRow.OtherItemDesc;
- lblItemDtmx.Text = otherItemRow.OtherItemDtmx;
- itemIdSelected = otherItemRow.OtherItemID;
- //// CONTROLLO SIA in stato 1 --> worked, 2--> selected, 100--> parked...
- //switch (otherItemRow.StatusID)
- //{
- // case 0:
- // displError("ERROR: Item not ready", false);
- // break;
- // case 1:
- // case 2:
- // case 100:
- // // salvo che è in STATO 2 (picked up)
- // DataLayer.man.taIL.updateStatus(otherItemRow.ItemID, 2, PlaceId);
- // // verifico cosa devo mostrare come PROX passaggio...
- // showCart = otherItemRow.ProcessesReq == "";
- // showBin = (otherItemRow.ProcessesReq.Contains("PaintFlag"));
- // secOp = otherItemRow.PostProcList;
- // showSecOp = (secOp != "");
- // doUpdate();
- // break;
- // case 3:
- // displError("Item already on CART!", false);
- // break;
- // case 4:
- // // fino a concorrenza qta richiesta sposto, POI do errori
- // displError("ALL Item already scanned on BIN!", false);
- // break;
- // case 5:
- // displError("Item already at KIT STATION!", false);
- // break;
- // case 990:
- // displError("Item declared SCRAP!", false);
- // break;
- // case 991:
- // displError("Item declared SCRAP with CNC program created!", false);
- // break;
- // default:
- // displError("ERROR: Item status UNKNOWN!", false);
- // break;
- //}
- }
- lbtResetSel.Visible = (itemIdSelected != 0);
- }
public int itemIdSelected
{
@@ -633,8 +655,6 @@ namespace NKC_WF.WebUserControls
bool showBtn = value != 0;
// fix visibilità
lbtCancel.Visible = showBtn;
- lbtScrapped.Visible = showBtn;
- lbtParkArea.Visible = showBtn;
}
}
@@ -645,8 +665,6 @@ namespace NKC_WF.WebUserControls
lblDestination.Text = "";
lblLastBCode.Text = "";
lbtCancel.Visible = false;
- lbtScrapped.Visible = false;
- lbtParkArea.Visible = false;
lbtResetSel.Visible = (itemIdSelected != 0);
}
@@ -667,44 +685,16 @@ namespace NKC_WF.WebUserControls
private void doUpdate()
{
- // reset grafico
+ fixVisibility();
+ }
+
+ private void fixVisibility()
+ {
+ // reset grafico
+ cmp_KS_Cart.Visible = cmp_KS_Cart.CartID > 0 && (cmp_KS_BinCart.BinID + cmp_KS_OtherItemsCart.OtherItemID == 0);
+ cmp_KS_BinCart.Visible = cmp_KS_BinCart.BinID > 0;
+ cmp_KS_OtherItemsCart.Visible = cmp_KS_OtherItemsCart.OtherItemID > 0;
- // in base al secondo mostro uno o altro...
- if (showCart)
- {
- lblMessage.Text = "Item recognized";
- // controllo SE HO cart
- if (currCartTab.Count == 1)
- {
- var cartRow = currCartTab[0];
- // imposto OUT
- lblDestination.Text = $"SEND TO CART C{cartRow.CartIndex} ({cartRow.CartDtmx})";
- }
- else
- {
- lblDestination.Text = $"ERROR SEARCHING CART: {currCartTab.Count} found!";
- }
- lblDestination.CssClass = "text-success";
- }
- else if (showBin)
- {
- lblMessage.Text = "Item recognized";
- if (currBinTab.Count == 1)
- {
- var binRow = currBinTab[0];
- lblDestination.Text = $"SEND TO BIN B{binRow.BinIndex} ({binRow.BinDtmx})";
- }
- else
- {
- lblDestination.Text = $"ERROR SEARCHING BIN: {currBinTab.Count} found!";
- }
- lblDestination.CssClass = "text-primary";
- }
- if (showSecOp)
- {
- lblMessage.Text = "Item recognized";
- lblLastBCode.CssClass = "text-info";
- }
// fix btn reset!
lbtResetSel.Visible = (itemIdSelected != 0);
}
diff --git a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
index a1b7068..70265cf 100644
--- a/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
+++ b/NKC_WF/WebUserControls/cmp_kittingSmart.ascx.designer.cs
@@ -77,33 +77,6 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.HiddenField hfLastValidBCode;
- ///
- /// Controllo hfShowCart.
- ///
- ///
- /// 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 hfShowCart;
-
- ///
- /// Controllo hfShowBin.
- ///
- ///
- /// 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 hfShowBin;
-
- ///
- /// Controllo hfShowSecOp.
- ///
- ///
- /// 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 hfShowSecOp;
-
///
/// Controllo cmp_KS_BinCart.
///
@@ -113,6 +86,24 @@ namespace NKC_WF.WebUserControls
///
protected global::NKC_WF.WebUserControls.cmp_KS_BinCart cmp_KS_BinCart;
+ ///
+ /// Controllo cmp_KS_OtherItemsCart.
+ ///
+ ///
+ /// 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_OtherItemsCart cmp_KS_OtherItemsCart;
+
+ ///
+ /// Controllo cmp_KS_Cart.
+ ///
+ ///
+ /// 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_Cart cmp_KS_Cart;
+
///
/// Controllo divItemDet.
///
@@ -159,13 +150,13 @@ namespace NKC_WF.WebUserControls
protected global::System.Web.UI.WebControls.Label lblItemDtmx;
///
- /// Controllo divItemError.
+ /// Controllo divError.
///
///
/// 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;
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl divError;
///
/// Controllo lblErrorMsg.
@@ -176,6 +167,24 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblErrorMsg;
+ ///
+ /// Controllo divInfo.
+ ///
+ ///
+ /// 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 divInfo;
+
+ ///
+ /// Controllo lblSuccessMsg.
+ ///
+ ///
+ /// 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 lblSuccessMsg;
+
///
/// Controllo lbtCancel.
///
@@ -212,24 +221,6 @@ namespace NKC_WF.WebUserControls
///
protected global::System.Web.UI.WebControls.Label lblDestination;
- ///
- /// Controllo lbtScrapped.
- ///
- ///
- /// 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.LinkButton lbtScrapped;
-
- ///
- /// Controllo lbtParkArea.
- ///
- ///
- /// 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.LinkButton lbtParkArea;
-
///
/// Controllo lbtResetSel.
///