diff --git a/NKC_SDK/Enums.cs b/NKC_SDK/Enums.cs index 7dd8a2f..9104d0b 100644 --- a/NKC_SDK/Enums.cs +++ b/NKC_SDK/Enums.cs @@ -118,6 +118,16 @@ PartOk } + /// + /// Tipologia Batch + /// + public enum BatchType + { + Original = 0 + , Ancestor = 1 + , Descendant = 2 + } + /// /// Tipi di barcode gestiti /// diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx b/NKC_WF/WebUserControls/cmp_batchDetail.ascx index 57eb013..396298a 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx @@ -20,7 +20,7 @@ <%# traduci("SendToNest") %> + Visible='<%# checkStatus(Eval("Status"), NKC_SDK.BatchStatus.EstimationDone) && !checkType(Eval("BatchType"), NKC_SDK.BatchType.Descendant) && canStartNew %>'><%# traduci("SendToNest") %> -
+
<%: traduci("BatchSplit") %>
diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs index 499ec07..c2a4bf4 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.cs @@ -306,6 +306,7 @@ namespace NKC_WF.WebUserControls checkCreateDescendant(); showBatchDescendant(); fixChildBatch(); + fixDisplayDesc(); } } get @@ -355,6 +356,23 @@ namespace NKC_WF.WebUserControls cmp_orderExtListNE02.doUpdate(); } + private void fixDisplayDesc() + { + var tabBatch = DLMan.taBL.getByKey(BatchId); + if (tabBatch != null && tabBatch.Count > 0) + { + bool showSplit = false; + try + { + // mostro split se di tipo 1... + showSplit = tabBatch[0].BatchType == 1; + } + catch + { } + divSplit.Visible = showSplit; + } + } + private void fixRatio() { // sistemazione ratio calcolata... @@ -649,6 +667,21 @@ namespace NKC_WF.WebUserControls return answ; } + /// + /// Controlla se il type sia uguale a quello richiesto + /// + /// + /// + /// + public bool checkType(object _bType, BatchType bTypeReq) + { + bool answ = false; + int bType = -1; + int.TryParse(_bType.ToString(), out bType); + answ = (bType == (int)bTypeReq); + return answ; + } + #endregion Public Methods } } \ No newline at end of file diff --git a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs index bc2d66c..7c0a362 100644 --- a/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs +++ b/NKC_WF/WebUserControls/cmp_batchDetail.ascx.designer.cs @@ -68,6 +68,15 @@ namespace NKC_WF.WebUserControls /// protected global::System.Web.UI.WebControls.Label lblTestJson; + /// + /// divSplit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSplit; + /// /// hfNeedSave control. ///