v 3.2.823 - modificato sterrTaglio FC

This commit is contained in:
Samuele E. Locatelli
2015-09-30 12:21:03 +02:00
parent e436805f24
commit 2cbfe0ac29
13 changed files with 150 additions and 36 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+146 -32
View File
@@ -27,6 +27,10 @@ namespace GMW.WebUserControls
/// tipo di evento associato alla modifica qta dell'UDC
/// </summary>
protected string eventoUDC_qta = "UDC_QTY";
/// <summary>
/// dati x verifica CodSoggetto / matricola
/// </summary>
protected string preCodSogg = memLayer.ML.confReadString("prefCodSogg");
public event EventHandler eh_reqUpdate;
/// <summary>
/// stringa UID univoca
@@ -52,11 +56,26 @@ namespace GMW.WebUserControls
destAL = AlByCella;
traduciObj();
idxCella = Postazione.currIdxCella;
checkNumKeyIn();
}
setVisibility();
doChecks();
}
/// <summary>
/// verifico se ci sia in sessione un input da NumKeyb e nel caso lometto in barcodeIn e processo...
/// </summary>
private void checkNumKeyIn()
{
if (memLayer.ML.isInSessionObject("numKeyIn"))
{
barcodeIn = memLayer.ML.StringSessionObj("numKeyIn");
// svuoto valore in sessione...
memLayer.ML.emptySessionVal("numKeyIn");
// controllo barcode...
checkBarcode();
}
}
/// <summary>
/// IDX cella associata alla linea corrente
/// </summary>
protected int idxCella
@@ -294,6 +313,14 @@ namespace GMW.WebUserControls
{
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))
@@ -304,6 +331,21 @@ namespace GMW.WebUserControls
{
answ = tipoCodiceBarcode.Particolare;
}
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
@@ -384,18 +426,57 @@ namespace GMW.WebUserControls
break;
case tipoCodiceBarcode.UDC:
break;
case tipoCodiceBarcode.Operatore:
// calcolo matricola utente
int MatrUtente = -1;
string preCodSogg = memLayer.ML.confReadString("prefCodSogg");
if (barcodeIn.StartsWith(preCodSogg))
{
MatrUtente = DataProxy.obj.taTrascSogg.getByKey(barcodeIn, 0)[0].CodMatricola;
}
else
{
MatrUtente = Convert.ToInt32(barcodeIn);
}
if (MatrUtente >= 0)
{
// salvo in sessione operatore con AUTH
OpAuth.startOpAuth(MatrUtente);
// mostro che ho autorizzato...
Postazione.messaggiText += traduci("userAuthRec");
Postazione.CssClass = "stileComandoOk";
Response.Redirect(user_std.pagCorrente);
}
else
{
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
Postazione.CssClass = "stileComandoND";
}
break;
default:
// cerco se sia "0" = reset utente...
if (barcodeIn == memLayer.ML.CRS("resetCodSogg"))
{
// salvo in sessione operatore con AUTH
OpAuth.stopAuth();
// mostro che ho autorizzato...
Postazione.messaggiText += traduci("userAuthRem");
Postazione.CssClass = "stileComandoOk";
Response.Redirect(user_std.pagCorrente);
}
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
Postazione.CssClass = "stileComandoND";
break;
}
barcodeIn = "";
}
#if false
else
{
Postazione.messaggiText = traduci("AttesaBCode");
Postazione.CssClass = "stileAttesa";
}
}
#endif
txtBarcode.Focus();
}
@@ -509,46 +590,68 @@ namespace GMW.WebUserControls
/// <param name="e"></param>
protected void btnStampa_Click(object sender, EventArgs e)
{
bool needsRedirect = false;
string[] stringSeparators = new string[] { "#" };
// verifico postazione x procedere...
if (Postazione.printer != "n.d.")
{
DateTime adesso = DateTime.Now;
//int qta = memLayer.ML.confReadInt("QtaImballoSterr");
string noteTrim = txtNote.Text.Trim();
string lineaCesta = string.Format("FUORICICLO | {0} | cesta: {1}", Postazione.currNomeLinea, numCesta);
noteTrim = string.Format("{0}{1}{2}", lineaCesta, Environment.NewLine, noteTrim);
//string noteTrim = txtNote.Text.Trim();
//noteTrim = string.Format("FUORICICLO{0}{1}", Environment.NewLine, noteTrim);
// effettuo controlli che cod_soggetto, cod particolare e destAL siano disponibili...
if (MagClass.magazzino.CodSoggCurrUser != "" && currParticolare != "" && destAL != "ALS00")
// verifico auth utente...
if (OpAuth.isAuth)
{
// aggiorno note e posizione da temp a definitiv x UDC...
MagClass.magazzino.updateNotePosizioneUDC(currUDC, noteTrim, memLayer.ML.confReadInt("IdxPosizioneSterrati"));
// registro creazione nuovo UDC
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, currUDC, currParticolare, "creaUDC", string.Format("Creato nuovo UDC Sterr Taglio FC, qta: {0} {1}", qta, ""));
// metto attributo FC
MagClass.magazzino.taAtt2UDC.Insert(currUDC, "FC", "", DateTime.Now, MagClass.magazzino.CodSoggCurrUser);
// tolgo UDC da AL corrente...
MagClass.magazzino.taAL2UDC.deleteQuery(destAL, currUDC);
DateTime adesso = DateTime.Now;
//int qta = memLayer.ML.confReadInt("QtaImballoSterr");
// ora stampo il nuovo cartellino!!!
MagClass.magazzino.stampaUdc(currUDC, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
// incremento timing...
adesso = adesso.AddSeconds(2);
// registro stampa nuovo UDC
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, currUDC, currParticolare, "stampaUDC", "Stampato UDC Sterrato FUORICICLO");
// svuoto campo cesta...
numCesta = "";
// resetto
doResetData();
string noteTrim = txtNote.Text.Trim();
string lineaCesta = string.Format("FUORICICLO | {0} | cesta: {1}", Postazione.currNomeLinea, numCesta);
noteTrim = string.Format("{0}{1}{2}", lineaCesta, Environment.NewLine, noteTrim);
//string noteTrim = txtNote.Text.Trim();
//noteTrim = string.Format("FUORICICLO{0}{1}", Environment.NewLine, noteTrim);
// effettuo controlli che cod_soggetto, cod particolare e destAL siano disponibili...
if (MagClass.magazzino.CodSoggCurrUser != "" && currParticolare != "" && destAL != "ALS00")
{
// aggiorno note e posizione da temp a definitiv x UDC...
MagClass.magazzino.updateNotePosizioneUDC(currUDC, noteTrim, memLayer.ML.confReadInt("IdxPosizioneSterrati"));
// salvo attributo dell'OpAuth...
MagClass.magazzino.taAtt2UDC.Insert(currUDC, memLayer.ML.CRS("attrOpAuth"), OpAuth.currAuth.CodSoggetto, DateTime.Now, MagClass.magazzino.CodSoggCurrUser);
// consumo una auth...
OpAuth.currAuth.remAuth--;
if (OpAuth.currAuth.remAuth == 0)
{
OpAuth.stopAuth();
needsRedirect = true;
}
// registro creazione nuovo UDC
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, currUDC, currParticolare, "creaUDC", string.Format("Creato nuovo UDC Sterr Taglio FC, qta: {0} {1}", qta, ""));
// metto attributo FC
MagClass.magazzino.taAtt2UDC.Insert(currUDC, "FC", "", DateTime.Now, MagClass.magazzino.CodSoggCurrUser);
// tolgo UDC da AL corrente...
MagClass.magazzino.taAL2UDC.deleteQuery(destAL, currUDC);
// ora stampo il nuovo cartellino!!!
MagClass.magazzino.stampaUdc(currUDC, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
// incremento timing...
adesso = adesso.AddSeconds(2);
// registro stampa nuovo UDC
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, currUDC, currParticolare, "stampaUDC", "Stampato UDC Sterrato FUORICICLO");
// svuoto campo cesta...
numCesta = "";
// resetto
doResetData();
}
else
{
httpLog(string.Format("STERRATI FC, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR);
Response.Redirect("~/login.aspx");
}
}
else
{
httpLog(string.Format("STERRATI FC, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR);
Response.Redirect("~/login.aspx");
Postazione.messaggiText = traduci("noOpAuth");
Postazione.CssClass = "stileComandoKo";
httpLog(string.Format("Errore manca OpAuth x UDC anime"), tipoLog.ERROR);
}
}
else
@@ -561,6 +664,10 @@ namespace GMW.WebUserControls
{
eh_reqUpdate(this, new EventArgs());
}
if (needsRedirect)
{
Response.Redirect(user_std.pagCorrente);
}
}
/// <summary>
/// effettua il consumo di tutti gli UDC inviati come array di stringhe
@@ -668,6 +775,13 @@ namespace GMW.WebUserControls
protected void btnEmptyNote_Click(object sender, EventArgs e)
{
txtNote.Text = "";
Postazione.messaggiText = traduci("AttesaBCode");
Postazione.CssClass = "stileAttesa";
// raise dell'evento
if (eh_reqUpdate != null)
{
eh_reqUpdate(this, new EventArgs());
}
}
/// <summary>
/// passo alla modalità IN
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -5,7 +5,7 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.822.2098")]
[assembly: AssemblyFileVersion("3.2.822.2098")]
[assembly: AssemblyVersion("3.2.823.2098")]
[assembly: AssemblyFileVersion("3.2.823.2098")]
[assembly: AssemblyCopyright("Steamware © 2007-2015")]
[assembly: AssemblyCompany("Steamware")]
+2 -2
View File
@@ -6,8 +6,8 @@
using System.Reflection;
[assembly: AssemblyVersion("3.2.822.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("3.2.822.<#= this.RevisionNumber #>")]
[assembly: AssemblyVersion("3.2.823.<#= this.RevisionNumber #>")]
[assembly: AssemblyFileVersion("3.2.823.<#= this.RevisionNumber #>")]
[assembly: AssemblyCopyright("Steamware © 2007-<#= DateTime.Now.Year #>")]
[assembly: AssemblyCompany("Steamware")]
<#+