cleanup generale x barcode

This commit is contained in:
Samuele Locatelli
2021-04-20 10:23:36 +02:00
parent b97664c5b7
commit 0c6301739a
5 changed files with 36 additions and 88 deletions
+4 -3
View File
@@ -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)
+1 -1
View File
@@ -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>
+7 -4
View File
@@ -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
View File
@@ -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;
}
}