inizio ad aggiungere componenti barcode
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_MAG.WebUserControls
|
||||
{
|
||||
public partial class cmp_barcode : BaseUserControl
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
resetMessage();
|
||||
}
|
||||
else if (inputAcquired == "")
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
}
|
||||
|
||||
public void resetMessage()
|
||||
{
|
||||
lblOutput.Visible = false;
|
||||
lblOutput.Text = "";
|
||||
}
|
||||
|
||||
protected void txtBarcode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
raiseEvent();
|
||||
}
|
||||
/// <summary>
|
||||
/// Valore acquisito in lettura barcode
|
||||
/// </summary>
|
||||
public string inputAcquired
|
||||
{
|
||||
get
|
||||
{
|
||||
return txtBarcode.Text.Trim();
|
||||
}
|
||||
set
|
||||
{
|
||||
txtBarcode.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gestione output da mostrare (opzionale
|
||||
/// </summary>
|
||||
/// <param name="cssClass"></param>
|
||||
/// <param name="messaggio"></param>
|
||||
public void showOutput(string cssClass, string messaggio)
|
||||
{
|
||||
// In primis: mostro qualcosa SOLO SE ho del testo
|
||||
lblOutput.Visible = (messaggio != "");
|
||||
lblOutput.Text = messaggio;
|
||||
lblOutput.Attributes.Remove("class");
|
||||
lblOutput.Attributes.Add("class", cssClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user