Merge branch 'feature/BCodeReadUdc' into develop
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="row px-1">
|
||||
<div class="col-12">
|
||||
<uc1:cmp_PLScanner runat="server" id="cmp_PLScanner" />
|
||||
<uc1:cmp_PLScanner runat="server" ID="cmp_PLScanner" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
Generated
+8
-8
@@ -1,10 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_MAG.SMART
|
||||
@@ -15,11 +15,11 @@ namespace MP_MAG.SMART
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo cmp_PLScanner.
|
||||
/// cmp_PLScanner control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::MP_MAG.WebUserControls.cmp_PLScanner cmp_PLScanner;
|
||||
}
|
||||
|
||||
+4
-3
@@ -36,7 +36,7 @@
|
||||
<add key="_safePages" value="chLang#jumper#unauthorized#forceUser#login#test#UserAdmin#EnrollDevice#UpdMan#about#contact" />
|
||||
<add key="matrixUrl" value="https://qrcode.steamware.net/" />
|
||||
<add key="intUpdatePagina_ms" value="60000" />
|
||||
<add key="fastUpdateMs" value="1000" />
|
||||
<add key="fastUpdateMs" value="2000" />
|
||||
<add key="slowUpdateMs" value="30000" />
|
||||
<!--Redis conn-->
|
||||
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
|
||||
@@ -73,8 +73,9 @@
|
||||
</namespaces>
|
||||
<controls>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
|
||||
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
|
||||
|
||||
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
|
||||
</controls>
|
||||
</pages>
|
||||
<sessionState mode="Custom" customProvider="MySessionStateStore">
|
||||
<providers>
|
||||
|
||||
@@ -130,7 +130,6 @@ namespace MP_MAG.WebUserControls
|
||||
// processo evento..
|
||||
lastCmd = cmp_barcode.inputAcquired.ToUpper();
|
||||
doRaiseEv = processLastCmd(doRaiseEv);
|
||||
|
||||
// reset comando
|
||||
cmp_barcode.inputAcquired = "";
|
||||
// aggiorno...
|
||||
@@ -143,61 +142,6 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
private void doUpdate()
|
||||
{
|
||||
#if false
|
||||
// reset grafico
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-outline-secondary");
|
||||
|
||||
// in base al secondo mostro uno o altro...
|
||||
if (showCart)
|
||||
{
|
||||
icnCart.Attributes.Remove("class");
|
||||
icnCart.Attributes.Add("class", "btn btn-sm btn-block btn-success");
|
||||
lblMessage.Text = "Item recognized";
|
||||
// controllo SE HO cart
|
||||
if (currCartTab.Count == 1)
|
||||
{
|
||||
var cartRow = currCartTab[0];
|
||||
// imposto OUT
|
||||
lblDestination.Text = $"SEND TO CART <b>C{cartRow.CartIndex}</b> ({cartRow.CartDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING CART: {currCartTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-success";
|
||||
}
|
||||
else if (showBin)
|
||||
{
|
||||
icnBin.Attributes.Remove("class");
|
||||
icnBin.Attributes.Add("class", "btn btn-sm btn-block btn-primary");
|
||||
lblMessage.Text = "Item recognized";
|
||||
if (currBinTab.Count == 1)
|
||||
{
|
||||
var binRow = currBinTab[0];
|
||||
lblDestination.Text = $"SEND TO BIN <b>B{binRow.BinIndex}</b> ({binRow.BinDtmx})";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblDestination.Text = $"ERROR SEARCHING BIN: {currBinTab.Count} found!";
|
||||
}
|
||||
lblDestination.CssClass = "text-primary";
|
||||
}
|
||||
if (showSecOp)
|
||||
{
|
||||
icnSecOp.Attributes.Remove("class");
|
||||
icnSecOp.Attributes.Add("class", "btn btn-sm btn-block btn-info");
|
||||
lblMessage.Text = "Item recognized";
|
||||
lblLastBCode.Text = $"DO SEC OP: {secOp}";
|
||||
lblLastBCode.CssClass = "text-info";
|
||||
}
|
||||
// fix btn reset!
|
||||
lbtResetSel.Visible = (itemIdSelected != 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool processLastCmd(bool doRaiseEv)
|
||||
@@ -212,7 +156,7 @@ namespace MP_MAG.WebUserControls
|
||||
case codeType.Pedana:
|
||||
case codeType.Udc:
|
||||
cmp_barcode.showOutput("badge badge-success", $"{decoData.description}");
|
||||
processSuggestion(decoData.codeType, decoData.rawData, decoData.codeInt);
|
||||
processSuggestion(decoData.codeType, decoData.rawData, decoData.code, decoData.codeInt);
|
||||
doRaiseEv = true;
|
||||
break;
|
||||
|
||||
@@ -231,8 +175,9 @@ namespace MP_MAG.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="tipoCod"></param>
|
||||
/// <param name="rawData"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="codeInt"></param>
|
||||
private void processSuggestion(codeType tipoCod, string rawData, int codeInt)
|
||||
private void processSuggestion(codeType tipoCod, string rawData, string code, int codeInt)
|
||||
{
|
||||
bool allOk = false;
|
||||
// processo suggerimenti
|
||||
@@ -365,22 +310,22 @@ namespace MP_MAG.WebUserControls
|
||||
else
|
||||
{
|
||||
// verifico esista
|
||||
var tabUDC = MagDataLayer.man.taEUdc.getByKey(rawData);
|
||||
var tabUDC = MagDataLayer.man.taEUdc.getByKey(code);
|
||||
if (tabUDC.Rows.Count == 0)
|
||||
{
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC non trovato: {rawData}");
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC non trovato: {code}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// ...e NON sia stato TRASFERITO
|
||||
if (tabUDC[0].IdxPosizione > 0)
|
||||
{
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC già trasferito: {rawData}");
|
||||
cmp_barcode.showOutput("badge badge-warning", $"Errore: UDC già trasferito: {code}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// cerco AL se sia quello selezionato...
|
||||
var tabAL = MagDataLayer.man.taEAL.getByUdc(rawData);
|
||||
var tabAL = MagDataLayer.man.taEAL.getByUdc(code);
|
||||
// se non trovo --> associo
|
||||
if (tabAL.Rows.Count == 0)
|
||||
{
|
||||
@@ -396,7 +341,7 @@ namespace MP_MAG.WebUserControls
|
||||
else
|
||||
{
|
||||
// se siamo in seconda lettura --> OK x spostamento
|
||||
if (LastUDC == rawData)
|
||||
if (LastUDC == code)
|
||||
{
|
||||
allOk = true;
|
||||
LastUDC = "";
|
||||
@@ -411,8 +356,8 @@ namespace MP_MAG.WebUserControls
|
||||
// chiedo seconda lettura SE AL "libero"
|
||||
else
|
||||
{
|
||||
cmp_barcode.showOutput("badge badge-info", $"Attenzione: UDC {rawData} già associato ad AL ({tabAL[0].AL}), rileggere per confermare ({SelPedana})");
|
||||
LastUDC = rawData;
|
||||
cmp_barcode.showOutput("badge badge-info", $"Attenzione: UDC {code} già associato ad AL ({tabAL[0].AL}), rileggere per confermare ({SelPedana})");
|
||||
LastUDC = code;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,7 +366,7 @@ namespace MP_MAG.WebUserControls
|
||||
// ...e seleziono udc
|
||||
if (allOk)
|
||||
{
|
||||
SelUDC = rawData;
|
||||
SelUDC = code;
|
||||
tryLinkAlUdc();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_barcode.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_barcode" %>
|
||||
|
||||
<div class="form-group bigText">
|
||||
<asp:TextBox runat="server" ID="txtBarcode" class="form-control" autofocus="true" AutoPostBack="True" OnTextChanged="txtBarcode_TextChanged"></asp:TextBox>
|
||||
<asp:TextBox runat="server" ID="txtBarcode" class="form-control" autofocus="true" OnTextChanged="txtBarcode_TextChanged" AutoPostBack="true"></asp:TextBox>
|
||||
<div class="small text-center textCondens">
|
||||
<asp:Label ID="lblOutput" runat="server" for="txtBarcode" Width="100%" />
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace MP_MAG.WebUserControls
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = "";
|
||||
txtBarcode.Text = value;
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,10 @@ namespace MP_MAG.WebUserControls
|
||||
|
||||
protected void txtBarcode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
if (!string.IsNullOrEmpty(inputAcquired))
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
@@ -66,10 +69,10 @@ namespace MP_MAG.WebUserControls
|
||||
public void showOutput(string cssClass, string messaggio)
|
||||
{
|
||||
// In primis: mostro qualcosa SOLO SE ho del testo
|
||||
lblOutput.Visible = !string.IsNullOrEmpty(messaggio);
|
||||
lblOutput.Text = messaggio;
|
||||
lblOutput.Attributes.Remove("class");
|
||||
lblOutput.Attributes.Add("class", cssClass);
|
||||
lblOutput.Text = messaggio;
|
||||
lblOutput.Visible = !string.IsNullOrEmpty(messaggio);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
+24
-24
@@ -1,35 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_MAG.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class cmp_barcode
|
||||
{
|
||||
public partial class cmp_barcode
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Controllo txtBarcode.
|
||||
/// </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.TextBox txtBarcode;
|
||||
/// <summary>
|
||||
/// txtBarcode 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.TextBox txtBarcode;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lblOutput.
|
||||
/// </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.Label lblOutput;
|
||||
}
|
||||
/// <summary>
|
||||
/// lblOutput 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.Label lblOutput;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user