Aggiunta reset

This commit is contained in:
Samuele E. Locatelli
2020-11-09 19:30:03 +01:00
parent 2a4fdf6138
commit a1901b7134
12 changed files with 224 additions and 50 deletions
+3 -1
View File
@@ -1,12 +1,14 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_ST_objCheck.ascx.cs" Inherits="MoonProTablet.WebUserControls.cmp_ST_objCheck" %>
<div class="form-row" runat="server" id="divCheckData">
<div class="form-group col-8 col-md-9 col-lg-10">
<asp:TextBox runat="server" ID="txtInput" CssClass="form-control form-control-lg" OnTextChanged="txtInput_TextChanged" TabIndex="1" AutoPostBack="true" />
</div>
<div class="col-4 col-md-3 col-lg-2">
<asp:LinkButton ID="lbtCerca" runat="server" CssClass="btn text-truncate btn-warning btn-lg btn-block text-uppercase"><i class="fa fa-barcode"></i> read</asp:LinkButton>
</div>
<div class="col-12 small text-center">
<asp:Label runat="server" ID="lblMessage" Text="prego confermare parametri" />
</div>
</div>
<asp:HiddenField runat="server" ID="hfCodArticolo" Value="" />
+34 -48
View File
@@ -99,19 +99,44 @@ namespace MoonProTablet.WebUserControls
if (trovatoEq != null && trovatoEq.Count() > 0)
{
// recupero record..
var data = trovatoEq.FirstOrDefault();
var datiEqCheck = trovatoEq.FirstOrDefault();
// registro trovato
found = true;
lblMessage.Text = $"Parametro acquisito: {BCodeVal}";
lblMessage.CssClass = "text-success";
// upsert controllo
DataLayerObj.taSTChk.upsertQuery(idxOdl, data.IdxST, data.Oggetto, data.Num, BCodeVal, BCodeVal, true, user_std.UtSn.utente);
DataLayerObj.taSTChk.upsertQuery(idxOdl, datiEqCheck.IdxST, datiEqCheck.Oggetto, datiEqCheck.Num, BCodeVal, BCodeVal, true, user_std.UtSn.utente);
}
// se non trovato
if (!found)
{
// controllo condizione tipo BATCH (speciale)
// controllo condizione tipo BATCH (speciale) - prima solo che CI SIA una richiesta di questo tipo
var trovatoBatch = tabRichieste.Where(x => x.CheckType == "BATCH");
if (trovatoBatch != null && trovatoBatch.Count() > 0)
{
// recupero record.. cercando in giacenza il LOTTO...
var tabGiacenzeLotto = DataLayerObj.taArcaGiac.getBySearch(null, "", BCodeVal, "", false);
if (tabGiacenzeLotto != null && tabGiacenzeLotto.Count > 0)
{
var datiBatchCheck = trovatoBatch.FirstOrDefault();
var datiLotto = tabGiacenzeLotto.FirstOrDefault();
// registro trovato
found = true;
lblMessage.Text = $"Parametro acquisito: {BCodeVal} --> {datiLotto.Cd_AR}";
lblMessage.CssClass = "text-success";
// upsert controllo
DataLayerObj.taSTChk.upsertQuery(idxOdl, datiBatchCheck.IdxST, datiBatchCheck.Oggetto, datiBatchCheck.Num, BCodeVal, datiLotto.Cd_AR, true, user_std.UtSn.utente);
}
}
}
}
else
{
lblMessage.Text = "Parametro non valido";
lblMessage.CssClass = "text-secondary";
}
// sistemo visualizzaizone componente
BCodeVal = "";
@@ -126,6 +151,12 @@ namespace MoonProTablet.WebUserControls
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
lblMessage.Text = "prego confermare parametri";
lblMessage.CssClass = "text-dark";
}
txtInput.Focus();
}
/// <summary>
@@ -139,50 +170,5 @@ namespace MoonProTablet.WebUserControls
}
#endregion Protected Methods
#if false
/// <summary>
/// verifico se sia un valore compreso nell'elenco fornito
/// </summary>
private void isValore()
{
if (_tabValori.ContainsKey(BCodeVal)) // verifico se il comando digitato esista...
{
comando.isValid = true;
comando.valore = BCodeVal;
_tabValori.TryGetValue(BCodeVal, out comando.valoreTrad);
}
}
/// <summary>
/// verifica se il comando inserito sia valido
/// </summary>
private void isInputEvent()
{
if (_comandi.ContainsKey(BCodeVal)) // verifico se il comando digitato esista...
{
comando.isValid = true;
// salvo comando precedente (se c'è...)
comando.prevCmdIn = comando.currCmdIn;
comando.descrComandoPrev = comando.descrComando;
comando.currCmdIn = BCodeVal;
_comandi.TryGetValue(BCodeVal, out comando.descrComando);
}
}
/// <summary>
/// verifica quale browser usato e applica css corretto al div attorno al box
/// </summary>
private void DetectAgent()
{
System.Web.HttpBrowserCapabilities browser = Request.Browser;
if (browser.Browser == "IE")
{
pnlBarcodeBox.CssClass = "barcodeBoxIE";
}
else
{
pnlBarcodeBox.CssClass = "barcodeBoxOther";
}
}
#endif
}
}
+9
View File
@@ -41,6 +41,15 @@ namespace MoonProTablet.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtCerca;
/// <summary>
/// Controllo lblMessage.
/// </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 lblMessage;
/// <summary>
/// Controllo hfCodArticolo.
/// </summary>
@@ -12,6 +12,7 @@
<div class='<%: "col-8 pl-0 text-right font-weight-bold" + dataCss %>'>
<%: hfValue.Value %>
<asp:Label runat="server" ID="lblError"><i class="fa fa-exclamation-triangle" aria-hidden="true" ></i></asp:Label>
<asp:Label runat="server" ID="lblChecked"><i class="fa fa-check-square-o" aria-hidden="true" ></i></asp:Label>
</div>
</div>
<div runat="server" id="divImg" class="row">
@@ -125,6 +125,19 @@ namespace MoonProTablet.WebUserControls
}
}
public bool showCheckedData
{
get
{
bool answ = false;
if (required && (dataValue == extCode))
{
answ = true;
}
return answ;
}
}
public bool showMissingData
{
get
@@ -158,6 +171,7 @@ namespace MoonProTablet.WebUserControls
break;
}
lblError.Visible = showMissingData;
lblChecked.Visible = showCheckedData;
}
#endregion Private Methods
+9
View File
@@ -77,6 +77,15 @@ namespace MoonProTablet.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblError;
/// <summary>
/// Controllo lblChecked.
/// </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 lblChecked;
/// <summary>
/// Controllo divImg.
/// </summary>
+20
View File
@@ -0,0 +1,20 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_disabled.ascx.cs" Inherits="MoonProTablet.WebUserControls.cmp_disabled" %>
<div class="card text-dark textCondens">
<div class="card-header bg-info text-light">
<h4>
<asp:Label runat="server" ID="lblTitolo" /></h4>
</div>
<div class="card-body py-1">
<div class="row">
<div class="col">
<p>
<b>
<asp:Label runat="server" ID="lblSubtitle" /></b>
</p>
<asp:Label runat="server" ID="lblMessage" />
</div>
</div>
</div>
</div>
@@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MoonProTablet.WebUserControls
{
public partial class cmp_disabled : System.Web.UI.UserControl
{
#region Public Properties
public string message
{
get
{
return lblMessage.Text;
}
set
{
lblMessage.Text = value.Trim();
}
}
public string subtitle
{
get
{
return lblSubtitle.Text;
}
set
{
lblSubtitle.Text = value.Trim();
}
}
public string title
{
get
{
return lblTitolo.Text;
}
set
{
lblTitolo.Text = value.Trim();
}
}
#endregion Public Properties
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion Protected Methods
}
}
+44
View File
@@ -0,0 +1,44 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace MoonProTablet.WebUserControls
{
public partial class cmp_disabled
{
/// <summary>
/// Controllo lblTitolo.
/// </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 lblTitolo;
/// <summary>
/// Controllo lblSubtitle.
/// </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 lblSubtitle;
/// <summary>
/// Controllo lblMessage.
/// </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 lblMessage;
}
}
+8 -1
View File
@@ -4,7 +4,14 @@
<div class="card text-dark textCondens">
<div class="card-header bg-info text-light">
<h4>Scheda Tecnica</h4>
<div class="row">
<div class="col-9 col-md-10">
<h4>Scheda Tecnica</h4>
</div>
<div class="col-3 col-md-2">
<asp:LinkButton ID="lbtClearOdl" runat="server" CssClass="btn text-truncate btn-danger btn-lg btn-block text-uppercase" OnClick="lbtClearOdl_Click" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaReset") %>'><i class="fa fa-trash"></i> reset</asp:LinkButton>
</div>
</div>
</div>
<div class="card-body py-1">
<div class="row">
@@ -37,8 +37,21 @@ namespace MoonProTablet.WebUserControls
#region Protected Methods
protected void lbtClearOdl_Click(object sender, EventArgs e)
{
// chiamo stored x ripulire dati check già caricati
DataLayerObj.taSTChk.cleanByOdl(idxOdl);
// sollevo evento
repGroup.DataBind();
reportUpdate();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
lbtClearOdl.DataBind();
}
cmp_ST_objCheck.eh_doUpdate += cmp_ST_objCheck_eh_doUpdate;
}
+9
View File
@@ -14,6 +14,15 @@ namespace MoonProTablet.WebUserControls
public partial class cmp_sheetTech
{
/// <summary>
/// Controllo lbtClearOdl.
/// </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.LinkButton lbtClearOdl;
/// <summary>
/// Controllo cmp_ST_objCheck.
/// </summary>