Completamento gestione display BatchID corrente

This commit is contained in:
Samuele Locatelli
2021-07-14 19:41:50 +02:00
parent 8fcfc092dd
commit c7152d2af9
6 changed files with 112 additions and 24 deletions
+47 -12
View File
@@ -468,15 +468,29 @@ namespace NKC_WF.WebUserControls
break;
case codeType.Item:
tryPickup(decoData.rawData);
cmp_barcode.showOutput(cssClass.success, $"Valid IT Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
if (string.IsNullOrEmpty(MachineSel))
{
cmp_barcode.showOutput(cssClass.danger, $"{traduci("MissingMachineSel")}: {decoData.rawData} --> {traduci("NoValiAction")}");
}
else
{
tryPickup(decoData.rawData);
cmp_barcode.showOutput(cssClass.success, $"Valid IT Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
}
break;
case codeType.ItemGeneric:
tryPickup(decoData.rawData);
cmp_barcode.showOutput(cssClass.success, $"Valid IG Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
if (string.IsNullOrEmpty(MachineSel))
{
cmp_barcode.showOutput(cssClass.danger, $"{traduci("MissingMachineSel")}: {decoData.rawData} --> {traduci("NoValiAction")}");
}
else
{
tryPickup(decoData.rawData);
cmp_barcode.showOutput(cssClass.success, $"Valid IG Code: {decoData.rawData}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
}
break;
case codeType.Material:
@@ -505,18 +519,39 @@ namespace NKC_WF.WebUserControls
break;
case codeType.Cart:
cmp_barcode.showOutput(cssClass.success, $"Valid CR Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
if (string.IsNullOrEmpty(MachineSel))
{
cmp_barcode.showOutput(cssClass.danger, $"{traduci("MissingMachineSel")}: {decoData.rawData} --> {traduci("NoValiAction")}");
}
else
{
cmp_barcode.showOutput(cssClass.success, $"Valid CR Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
}
break;
case codeType.Bin:
cmp_barcode.showOutput(cssClass.success, $"Valid BN Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
if (string.IsNullOrEmpty(MachineSel))
{
cmp_barcode.showOutput(cssClass.danger, $"{traduci("MissingMachineSel")}: {decoData.rawData} --> {traduci("NoValiAction")}");
}
else
{
cmp_barcode.showOutput(cssClass.success, $"Valid BN Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
}
break;
case codeType.SecScreen:
cmp_barcode.showOutput(cssClass.success, $"Valid Screen Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
if (string.IsNullOrEmpty(MachineSel))
{
cmp_barcode.showOutput(cssClass.danger, $"{traduci("MissingMachineSel")}: {decoData.rawData} --> {traduci("NoValiAction")}");
}
else
{
cmp_barcode.showOutput(cssClass.success, $"Valid Screen Code: {decoData.description}");
processItemSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
}
break;
case codeType.MachSelection:
+2 -1
View File
@@ -6,7 +6,8 @@
<div class="container px-1">
<div class="card text-center" style="width: 100%;">
<div class="card-header p-1 bg-secondary text-light">
<h4 class="mb-0"><%: traduci("MachineLoad") %></h4>
<asp:HiddenField ID="hfBatchID" runat="server" />
<h4 class="mb-0"><%: traduci("MachineLoad") %><sub>(<%: hfBatchID.Value %>)</sub></h4>
</div>
<div class="card-body py-1">
<div class="row">
+28
View File
@@ -9,11 +9,38 @@ namespace NKC_WF.site
{
public partial class MachineLoadSmart : BasePage
{
#region Public Properties
/// <summary>
/// Batch corrente...
/// </summary>
public int BatchId
{
set
{
hfBatchID.Value = value.ToString();
}
get
{
int answ = 0;
int.TryParse(hfBatchID.Value, out answ);
return answ;
}
}
#endregion Public Properties
#region Private Methods
private void Cmp_stackLoading_eh_doRefresh(object sender, EventArgs e)
{
BatchId = cmp_stackLoading.BatchIdCurr;
}
private void forceRefresh()
{
cmp_stackLoading.doUpdate();
BatchId = cmp_stackLoading.BatchIdCurr;
}
#endregion Private Methods
@@ -27,6 +54,7 @@ namespace NKC_WF.site
((SiteMaster)this.Master).showSearch = false;
forceRefresh();
}
cmp_stackLoading.eh_doRefresh += Cmp_stackLoading_eh_doRefresh;
}
#endregion Protected Methods
+9
View File
@@ -14,6 +14,15 @@ namespace NKC_WF.site
public partial class MachineLoadSmart
{
/// <summary>
/// hfBatchID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfBatchID;
/// <summary>
/// cmp_stackLoading control.
/// </summary>
+2 -2
View File
@@ -6,12 +6,12 @@
<div class="container px-1">
<div class="card text-center" style="width: 100%;">
<div class="card-header p-1 bg-secondary text-light">
<h4 class="mb-0"><%: traduci("MachineUnloadSmart") %></h4>
<asp:HiddenField ID="hfBatchID" runat="server" />
<h4 class="mb-0"><%: traduci("MachineUnloadSmart") %><sub>(<%: hfBatchID.Value %>)</sub></h4>
</div>
<div class="card-body py-1">
<div class="row">
<div class="col-12 mb-2">
<asp:HiddenField ID="hfBatchID" runat="server" />
<uc1:cmp_unloadSmart runat="server" ID="cmp_unloadSmart" />
</div>
</div>
+24 -9
View File
@@ -5,14 +5,8 @@ namespace NKC_WF
{
public partial class MachineUnloadSmart : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((SiteMaster)this.Master).showSearch = false;
doUpdate();
}
}
#region Public Properties
/// <summary>
/// Batch corrente...
/// </summary>
@@ -29,6 +23,11 @@ namespace NKC_WF
return answ;
}
}
#endregion Public Properties
#region Private Methods
/// <summary>
/// Aggiorna componente principale e child components
/// </summary>
@@ -38,17 +37,33 @@ namespace NKC_WF
// aggiorno child
cmp_unloadSmart.BatchId = BatchId;
}
/// <summary>
/// Imposta dati correnti (Bunk / Sheet)
/// </summary>
private void setCurrData()
{
// recupero bunk corrente...
DS_App.StackListRow currBunk = ComLib.getCurrBunk();
DS_App.StackListRow currBunk = ComLib.getCurrBunk(cmp_unloadSmart.MachineSel);
if (currBunk != null)
{
BatchId = currBunk.BatchID;
}
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((SiteMaster)this.Master).showSearch = false;
doUpdate();
}
}
#endregion Protected Methods
}
}