Inizio fix dati da lettura QR painting
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:stp_prt_StackLabel" ZOrder="3" X="70" Y="70" Height="267" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
|
||||
<Shape ID="DesignTable:PrintJobQueue" ZOrder="2" X="432" Y="94" Height="343" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:PrintJobQueue" ZOrder="2" X="432" Y="94" Height="400" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="178" />
|
||||
<Shape ID="DesignTable:ElencoPostazioni" ZOrder="1" X="861" Y="123" Height="153" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
</Shapes>
|
||||
<Connectors />
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
|
||||
<div class="row text-center">
|
||||
<div class="col-4">
|
||||
<uc1:cmp_paint_bins runat="server" id="cmp_paint_binsIN" titleText="BINS IN" titleClass="text-light" ShowComplete="true" ShowPainted="false" />
|
||||
<uc1:cmp_paint_bins runat="server" ID="cmp_paint_binsIN" titleText="BINS IN" titleClass="text-light" ShowComplete="true" ShowPainted="false" />
|
||||
</div>
|
||||
<div class="col-4">
|
||||
READER<br />
|
||||
<uc1:cmp_barcode runat="server" ID="cmp_barcode" />
|
||||
<asp:HiddenField runat="server" ID="hfLastBCode" />
|
||||
<asp:HiddenField runat="server" ID="hfLastValidBCode" />
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<uc1:cmp_paint_bins runat="server" id="cmp_paint_binsOUT" titleText="BINS OUT" titleClass="text-warning" ShowComplete="true" ShowPainted="true" />
|
||||
<uc1:cmp_paint_bins runat="server" ID="cmp_paint_binsOUT" titleText="BINS OUT" titleClass="text-warning" ShowComplete="true" ShowPainted="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@@ -7,11 +9,123 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_painting : System.Web.UI.UserControl
|
||||
public partial class cmp_painting : BaseUserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Comando barcode letto
|
||||
/// </summary>
|
||||
protected string lastCmd
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfLastBCode.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
hfLastBCode.Value = value;
|
||||
lastValidCmd = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ULTIMO Comando barcode VALIDO (!="") letto
|
||||
/// </summary>
|
||||
protected string lastValidCmd
|
||||
{
|
||||
get
|
||||
{
|
||||
return hfLastValidBCode.Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
// solo se è !=""
|
||||
if (value != "")
|
||||
{
|
||||
hfLastValidBCode.Value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
cmp_barcode.eh_doRefresh += Cmp_barcode_eh_doRefresh;
|
||||
}
|
||||
private void doUpdate()
|
||||
{
|
||||
cmp_paint_binsIN.doUpdate();
|
||||
cmp_paint_binsOUT.doUpdate();
|
||||
}
|
||||
|
||||
private void Cmp_barcode_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
bool doRaiseEv = false;
|
||||
// processo evento..
|
||||
lastCmd = cmp_barcode.inputAcquired.ToUpper();
|
||||
doRaiseEv = processLastCmd(doRaiseEv);
|
||||
|
||||
// reset comando
|
||||
cmp_barcode.inputAcquired = "";
|
||||
// aggiorno...
|
||||
doUpdate();
|
||||
}
|
||||
|
||||
private bool processLastCmd(bool doRaiseEv)
|
||||
{
|
||||
// verifico il datamatrix dei BIN da pitturare
|
||||
if (lastCmd == "") doRaiseEv = true;
|
||||
// processiamo barcode letto
|
||||
decodedData decoData = DataLayer.man.decodeBcode(lastCmd);
|
||||
switch (decoData.codeType)
|
||||
{
|
||||
case codeType.UNK:
|
||||
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Item:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Item - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.ItemGeneric:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Item Generic - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Material:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Material - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Sheet:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Sheet - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Stack:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"BUNK - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Batch:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Batch - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Cart:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Cart - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
case codeType.Bin:
|
||||
break;
|
||||
case codeType.BinProcessed:
|
||||
break;
|
||||
case codeType.SecScreen:
|
||||
cmp_barcode.showOutput("badge badge-warning", $"SecScreen - ignored: {decoData.description}");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
default:
|
||||
cmp_barcode.showOutput("text-danger", $"Unknown Data: {decoData.rawData} --> no action");
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
}
|
||||
return doRaiseEv;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,24 @@ namespace NKC_WF.WebUserControls
|
||||
/// </remarks>
|
||||
protected global::NKC_WF.WebUserControls.cmp_barcode cmp_barcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfLastBCode.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfLastBCode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hfLastValidBCode.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HiddenField hfLastValidBCode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_paint_binsOUT.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user