estendo generalizzazione decodifica barcode tra finiti e finiti supercubati
This commit is contained in:
@@ -31,6 +31,10 @@ namespace GMW.WebUserControls
|
||||
/// dati x verifica CodSoggetto / matricola
|
||||
/// </summary>
|
||||
protected string preCodSogg = memLayer.ML.confReadString("prefCodSogg");
|
||||
/// <summary>
|
||||
/// Codice linea non utilizzabile ("00" finale = Select...)
|
||||
/// </summary>
|
||||
protected string codLineaKo = "W2100";
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
@@ -321,72 +325,6 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
int matricola = -1;
|
||||
// provo a convertire in intero barcode x verifica eventuale matricola...
|
||||
try
|
||||
{
|
||||
matricola = Convert.ToInt32(barcodeIn);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
// controllo se sia un codice IMBALLO
|
||||
else if (utils.obj.taSelImballi.getByImballo(barcodeIn).Rows.Count > 0)
|
||||
{
|
||||
// è imballo!
|
||||
answ = tipoCodiceBarcode.Imballo;
|
||||
}
|
||||
else if (barcodeIn.StartsWith(preCodSogg))
|
||||
{
|
||||
// cerco cod soggetto...
|
||||
if (DataProxy.obj.taTrascSogg.getByKey(barcodeIn, 0).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
else if (matricola >= 0)
|
||||
{
|
||||
if (DataProxy.obj.taTrascSogg.getByKey("", matricola).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
@@ -443,7 +381,7 @@ namespace GMW.WebUserControls
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
switch (MagClass.tipoBCode_L3(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.Comando:
|
||||
if (barcodeIn == memLayer.ML.confReadString("cmdReset"))
|
||||
@@ -472,7 +410,7 @@ namespace GMW.WebUserControls
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W2100")
|
||||
if (Postazione.currCodLinea == codLineaKo)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
|
||||
@@ -31,6 +31,10 @@ namespace GMW.WebUserControls
|
||||
/// dati x verifica CodSoggetto / matricola
|
||||
/// </summary>
|
||||
protected string preCodSogg = memLayer.ML.confReadString("prefCodSogg");
|
||||
/// <summary>
|
||||
/// Codice linea non utilizzabile ("00" finale = Select...)
|
||||
/// </summary>
|
||||
protected string codLineaKo = "W2300";
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
@@ -318,72 +322,6 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// decodifica il tipo barcode acquisito
|
||||
/// </summary>
|
||||
public tipoCodiceBarcode tipoBCode
|
||||
{
|
||||
get
|
||||
{
|
||||
tipoCodiceBarcode answ = tipoCodiceBarcode.ND;
|
||||
int trovati = 0;
|
||||
int matricola = -1;
|
||||
// provo a convertire in intero barcode x verifica eventuale matricola...
|
||||
try
|
||||
{
|
||||
matricola = Convert.ToInt32(barcodeIn);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// controllo non si tratti di un comando...
|
||||
string preCmd = memLayer.ML.confReadString("prefComandi");
|
||||
if (barcodeIn.StartsWith(preCmd))
|
||||
{
|
||||
answ = tipoCodiceBarcode.Comando;
|
||||
}
|
||||
else if ((TermClass.Ter.riconosciBarcode(barcodeIn) == tipoCodiceBarcode.Particolare)) // è un particolare...
|
||||
{
|
||||
answ = tipoCodiceBarcode.Particolare;
|
||||
}
|
||||
// controllo se sia un codice IMBALLO
|
||||
else if (utils.obj.taSelImballi.getByImballo(barcodeIn).Rows.Count > 0)
|
||||
{
|
||||
// è imballo!
|
||||
answ = tipoCodiceBarcode.Imballo;
|
||||
}
|
||||
else if (barcodeIn.StartsWith(preCodSogg))
|
||||
{
|
||||
// cerco cod soggetto...
|
||||
if (DataProxy.obj.taTrascSogg.getByKey(barcodeIn, 0).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
else if (matricola >= 0)
|
||||
{
|
||||
if (DataProxy.obj.taTrascSogg.getByKey("", matricola).Rows.Count == 1)
|
||||
{
|
||||
answ = tipoCodiceBarcode.Operatore;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// cerco tra gitterbox (UDC)...
|
||||
trovati = MagClass.magazzino.taCartellini.getByUdc(barcodeIn).Rows.Count;
|
||||
if (trovati > 0)
|
||||
{
|
||||
answ = tipoCodiceBarcode.UDC;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode
|
||||
/// </summary>
|
||||
public string barcodeIn
|
||||
@@ -440,7 +378,7 @@ namespace GMW.WebUserControls
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
switch (MagClass.tipoBCode_L3(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.Comando:
|
||||
if (barcodeIn == memLayer.ML.confReadString("cmdReset"))
|
||||
@@ -469,7 +407,7 @@ namespace GMW.WebUserControls
|
||||
break;
|
||||
case tipoCodiceBarcode.UDC:
|
||||
// se linea non selezionata ERRORE!!!
|
||||
if (Postazione.currCodLinea == "W2100")
|
||||
if (Postazione.currCodLinea == codLineaKo)
|
||||
{
|
||||
Postazione.messaggiText += " - Attenzione, IMPOSTARE LINEA!";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
|
||||
Reference in New Issue
Block a user