Fix display detail x casi type corretti
This commit is contained in:
@@ -118,6 +118,16 @@
|
||||
PartOk
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia Batch
|
||||
/// </summary>
|
||||
public enum BatchType
|
||||
{
|
||||
Original = 0
|
||||
, Ancestor = 1
|
||||
, Descendant = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipi di barcode gestiti
|
||||
/// </summary>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<asp:LinkButton runat="server" ID="lbtSendNesting" CssClass="btn btn-sm btn-block btn-warning"
|
||||
OnClick="lbtSendNesting_Click"
|
||||
OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmStartNest") %>'
|
||||
Visible='<%# checkStatus(Eval("Status"), NKC_SDK.BatchStatus.EstimationDone) && canStartNew %>'><%# traduci("SendToNest") %></asp:LinkButton>
|
||||
Visible='<%# checkStatus(Eval("Status"), NKC_SDK.BatchStatus.EstimationDone) && !checkType(Eval("BatchType"), NKC_SDK.BatchType.Descendant) && canStartNew %>'><%# traduci("SendToNest") %></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtStopNesting" CssClass="btn btn-sm btn-block btn-dark"
|
||||
OnClick="lbtStopNesting_Click"
|
||||
OnClientClick='<%# SteamWare.jsUtils.getCBE("ConfirmStopNest") %>'
|
||||
@@ -96,7 +96,7 @@
|
||||
<asp:Label runat="server" ID="lblTestJson" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" runat="server" id="divSplit">
|
||||
<div class="card-header text-center">
|
||||
<h5><%: traduci("BatchSplit") %></h5>
|
||||
<asp:HiddenField runat="server" ID="hfNeedSave" />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Controlla se il type sia uguale a quello richiesto
|
||||
/// </summary>
|
||||
/// <param name="_bType"></param>
|
||||
/// <param name="bTypeReq"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,15 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblTestJson;
|
||||
|
||||
/// <summary>
|
||||
/// divSplit control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSplit;
|
||||
|
||||
/// <summary>
|
||||
/// hfNeedSave control.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user