diff --git a/MP-MAG/Web.config b/MP-MAG/Web.config index 31edad0f..a86e94b2 100644 --- a/MP-MAG/Web.config +++ b/MP-MAG/Web.config @@ -36,7 +36,7 @@ - + @@ -73,8 +73,9 @@ - - + + + diff --git a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs index 4fc2352e..a8f7b160 100644 --- a/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_PLScanner.ascx.cs @@ -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 C{cartRow.CartIndex} ({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{binRow.BinIndex} ({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) diff --git a/MP-MAG/WebUserControls/cmp_barcode.ascx b/MP-MAG/WebUserControls/cmp_barcode.ascx index a30db529..37de3a76 100644 --- a/MP-MAG/WebUserControls/cmp_barcode.ascx +++ b/MP-MAG/WebUserControls/cmp_barcode.ascx @@ -1,7 +1,7 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_barcode.ascx.cs" Inherits="MP_MAG.WebUserControls.cmp_barcode" %>
- +
diff --git a/MP-MAG/WebUserControls/cmp_barcode.ascx.cs b/MP-MAG/WebUserControls/cmp_barcode.ascx.cs index 904b5a03..ec796086 100644 --- a/MP-MAG/WebUserControls/cmp_barcode.ascx.cs +++ b/MP-MAG/WebUserControls/cmp_barcode.ascx.cs @@ -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 diff --git a/MP-MAG/WebUserControls/cmp_barcode.ascx.designer.cs b/MP-MAG/WebUserControls/cmp_barcode.ascx.designer.cs index db147147..1e86e9af 100644 --- a/MP-MAG/WebUserControls/cmp_barcode.ascx.designer.cs +++ b/MP-MAG/WebUserControls/cmp_barcode.ascx.designer.cs @@ -1,35 +1,35 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// 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. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace MP_MAG.WebUserControls { - public partial class cmp_barcode - { + public partial class cmp_barcode + { - /// - /// Controllo txtBarcode. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.TextBox txtBarcode; + /// + /// txtBarcode control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtBarcode; - /// - /// Controllo lblOutput. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::System.Web.UI.WebControls.Label lblOutput; - } + /// + /// lblOutput control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOutput; + } }