vers 680
sterr taglio IN/OUT completata
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -11,7 +11,7 @@ namespace GMW
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,21 +127,5 @@ namespace GMW
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
protected void Page_PreInit(object sender, EventArgs e)
|
||||
{
|
||||
// Create an event handler for the master page's contentCallEvent event
|
||||
Master.eh_doRefresh += new EventHandler(Master_eh_doRefresh);
|
||||
}
|
||||
/// <summary>
|
||||
/// chiamo update in modulo interno
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Master_eh_doRefresh(object sender, EventArgs e)
|
||||
{
|
||||
mod_SterrTagOUT1.doRefreshBloccoPost();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,7 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
}
|
||||
public event EventHandler eh_nuovaRicerca;
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
@@ -69,33 +70,9 @@ namespace GMW.WebUserControls
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
fixRicercaUdc();
|
||||
calcolaPostazione();
|
||||
traduciObj();
|
||||
storicoVisibile = false;
|
||||
fixStorico();
|
||||
// imposto pos abilitata x cancellazione
|
||||
mod_storicoAzioniOperatore1.IdxPosizione2del = memLayer.ML.confReadInt("IdxPosizioneSterrati");
|
||||
checkLinea();
|
||||
}
|
||||
doChecks();
|
||||
mod_storicoAzioniOperatore1.eh_stampa += new EventHandler(mod_storicoAzioniOperatore1_eh_stampa);
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica linea corretta
|
||||
/// </summary>
|
||||
private void checkLinea()
|
||||
{
|
||||
// se c'è imposto linea da sessione
|
||||
if (currCodLinea != "")
|
||||
{
|
||||
MagClass.magazzino.taAL.updatePost(currCodLinea, postazione_name);
|
||||
checkSelDDL(currCodLinea, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// resetto uso postazione...
|
||||
MagClass.magazzino.taAL.resetPost(postazione_name);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se si debba mostrare un campo ricerca attivo...
|
||||
@@ -113,9 +90,9 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_storicoAzioniOperatore1_eh_stampa(object sender, EventArgs e)
|
||||
public void ristampa()
|
||||
{
|
||||
MagClass.magazzino.stampaUdc(udcReq, postazione_printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
MagClass.magazzino.stampaUdc(udcReq, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
@@ -130,7 +107,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Sterratura OUT {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, postazione_name, postazione_IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Sterratura OUT");
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Sterratura OUT");
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
@@ -186,19 +163,13 @@ namespace GMW.WebUserControls
|
||||
private void traduciObj()
|
||||
{
|
||||
// labels
|
||||
lblPostazione.Text = string.Format("{2}: {0} ({1})", postazione_name, postazione_IP, traduci("postazione"));
|
||||
lblPrinter.Text = string.Format("{1}: {0}", postazione_printer, traduci("stampante"));
|
||||
lblQta.Text = traduci("lblQuantitaTotale");
|
||||
lblNote.Text = traduci("lblNote");
|
||||
lblCurrentPage.Text = traduci(PagCorrente);
|
||||
btnCerca.Text = traduci("btnSearch");
|
||||
//txtBox
|
||||
txtQta.Text = memLayer.ML.confReadString("QtaImballoSterr");
|
||||
// buttons
|
||||
btnStampa.Text = traduci("btnStampa");
|
||||
btnEmptyNote.Text = traduci("btnEmptyNote");
|
||||
// fix storico
|
||||
fixStorico();
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
@@ -229,75 +200,6 @@ namespace GMW.WebUserControls
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// calcola postazione corrente (ip, name, printer)
|
||||
/// </summary>
|
||||
private void calcolaPostazione()
|
||||
{
|
||||
postazione_IP = Request.UserHostName;
|
||||
postazione_name = dnsUtils.DetermineCompName(postazione_IP);
|
||||
// cerco stampante x postazione
|
||||
postazione_printer = "n.d.";
|
||||
try
|
||||
{
|
||||
DS_Applicazione.ElencoPostazioniDataTable tabPost = DataProxy.obj.taElPost.getByCod(postazione_name);
|
||||
if (tabPost.Rows.Count > 0)
|
||||
{
|
||||
postazione_printer = tabPost[0].stampante;
|
||||
}
|
||||
else
|
||||
{
|
||||
tabPost = DataProxy.obj.taElPost.getByCod("default");
|
||||
postazione_printer = tabPost[0].stampante;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// mostro warning se postazione non configurata...
|
||||
lblWarning.Visible = (postazione_printer == "n.d.");
|
||||
}
|
||||
/// <summary>
|
||||
/// indica name della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_name
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_name");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_name", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica ip della postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_IP
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_IP");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_IP", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica stampante associata alla postazione corrente
|
||||
/// </summary>
|
||||
protected string postazione_printer
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("postazione_printer");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("postazione_printer", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
@@ -417,19 +319,21 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
{
|
||||
#if false
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// verifico se il comando sia di tipo "seleziona linea"
|
||||
string cmdSelLine = memLayer.ML.confReadString("cmdSelLine");
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
if (barcodeIn.StartsWith(cmdSelLine))
|
||||
{
|
||||
// allora provo ad impostare la linea!
|
||||
checkSelDDL(barcodeIn.Replace(cmdSelLine, ""), true);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
#endif
|
||||
case tipoCodiceBarcode.Particolare:
|
||||
// 2014.02.13: tolto perché NON si vuole particolare OUT diverso da IN
|
||||
#if false
|
||||
@@ -463,16 +367,16 @@ namespace GMW.WebUserControls
|
||||
|
||||
break;
|
||||
default:
|
||||
lblMessaggi.Text += " - codice <b>non riconosciuto</b>!";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
Postazione.messaggiText += " - codice <b>non riconosciuto</b>!";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
break;
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
@@ -486,13 +390,13 @@ namespace GMW.WebUserControls
|
||||
if (DataProxy.obj.taAnagParticolari.getByParticolare(currParticolare).Rows.Count == 0)
|
||||
{
|
||||
currParticolare = "";
|
||||
lblMessaggi.Text += " - codice particolare non valido / non trovato in RILPRO.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
Postazione.messaggiText += " - codice particolare non valido / non trovato in RILPRO.";
|
||||
Postazione.CssClass = "stileComandoKo";
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text += " - impostato particolare!";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
Postazione.messaggiText += " - impostato particolare!";
|
||||
Postazione.CssClass = "stileComandoOk";
|
||||
}
|
||||
// leggo la qta dell'ultimo UDC del particolare, SE C'E', e la imposto...
|
||||
if (pezziUdc > 0)
|
||||
@@ -525,11 +429,10 @@ namespace GMW.WebUserControls
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
private void doUpdate()
|
||||
public void doUpdate()
|
||||
{
|
||||
checkStampa();
|
||||
grView.DataBind();
|
||||
mod_storicoAzioniOperatore1.doUpdate();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
@@ -563,11 +466,9 @@ namespace GMW.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void btnStampa_Click(object sender, EventArgs e)
|
||||
{
|
||||
// calcolo postazione
|
||||
calcolaPostazione();
|
||||
string[] stringSeparators = new string[] { "#" };
|
||||
// verifico postazione x procedere...
|
||||
if (postazione_printer != "n.d.")
|
||||
if (Postazione.printer != "n.d.")
|
||||
{
|
||||
// controllo UDC in ingresso, che siano tutti con uguale particolare e DIVERSO da ""
|
||||
string partUdcIn = "";
|
||||
@@ -599,8 +500,11 @@ namespace GMW.WebUserControls
|
||||
string newUdcChild = "";
|
||||
int qta = memLayer.ML.confReadInt("QtaImballoSterr");
|
||||
string noteTrim = txtNote.Text.Trim();
|
||||
string nomeLinea = ddlLinea.SelectedItem.Text;
|
||||
noteTrim = string.Format("{0}{1}{2}", nomeLinea, Environment.NewLine, noteTrim);
|
||||
// 2014.05.08 tolto e spostato in clase postaizoen gestioen NOME LINEA x note, da verificare...
|
||||
#if false
|
||||
string nomeLinea = ddlLinea.SelectedItem.Text;
|
||||
#endif
|
||||
noteTrim = string.Format("{0}{1}{2}", Postazione.currNomeLinea, Environment.NewLine, noteTrim);
|
||||
try
|
||||
{
|
||||
qta = Convert.ToInt32(txtQta.Text);
|
||||
@@ -627,7 +531,7 @@ namespace GMW.WebUserControls
|
||||
// creo nuovo UDC sterrato OUT multiple
|
||||
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoSterr"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.confReadInt("IdxPosizioneSterrati"), "IdxPosizioneSterrati", eventoUDC, noteTrim, "", adesso.Year, Request.UserHostName);
|
||||
// registro creazione nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "creaUDC", string.Format("Creato nuovo UDC Sterrato, qta: {0} {1}", qta, noteTrim));
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, particolare, "creaUDC", string.Format("Creato nuovo UDC Sterrato, qta: {0} {1}", qta, noteTrim));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -656,12 +560,12 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
|
||||
// ora stampo il nuovo cartellino!!!
|
||||
MagClass.magazzino.stampaUdc(newUdcChild, postazione_printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
MagClass.magazzino.stampaUdc(newUdcChild, Postazione.printer, tipoCartellino.cartSterr, Request.UserHostName);
|
||||
// incremento timing...
|
||||
adesso = DateTime.Now;
|
||||
adesso = adesso.AddSeconds(2);
|
||||
// registro stampa nuovo UDC
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, postazione_name, postazione_IP, newUdcChild, particolare, "stampaUDC", "Stampato UDC Sterrato");
|
||||
MagClass.magazzino.taSAO.insertQuery(adesso, codSogg, Postazione.name, Postazione.IP, newUdcChild, particolare, "stampaUDC", "Stampato UDC Sterrato");
|
||||
}
|
||||
// resetto
|
||||
doResetData();
|
||||
@@ -671,28 +575,26 @@ namespace GMW.WebUserControls
|
||||
httpLog(string.Format("STERRATI OUT, Errore persi utente/particolare, ricarico!"), tipoLog.ERROR);
|
||||
Response.Redirect("~/login.aspx");
|
||||
}
|
||||
mod_storicoAzioniOperatore1.doUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("STERRATI OUT, Errore controllo coerenza particolari da distinta base!"), tipoLog.ERROR);
|
||||
lblMessaggi.Text += "Errore particolari UDC da controllo distinta base";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
Postazione.messaggiText += "Errore particolari UDC da controllo distinta base";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
httpLog(string.Format("STERRATI OUT, Errore controllo coerenza elenco aprticolari IN!"), tipoLog.ERROR);
|
||||
lblMessaggi.Text += "Errore particolari UDC da consumare non coerenti";
|
||||
pnlAll.CssClass = "stileComandoND";
|
||||
Postazione.messaggiText += "Errore particolari UDC da consumare non coerenti";
|
||||
Postazione.CssClass = "stileComandoND";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.Redirect("~/menu.aspx");
|
||||
}
|
||||
checkLinea();
|
||||
doRefreshBloccoPost();
|
||||
doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua il consumo di tutti gli UDC inviati come array di stringhe
|
||||
@@ -766,14 +668,7 @@ namespace GMW.WebUserControls
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + _testoPre);
|
||||
logger.lg.scriviLog(Postazione.IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -784,14 +679,7 @@ namespace GMW.WebUserControls
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
string postazione_IP = "";
|
||||
try
|
||||
{
|
||||
postazione_IP = string.Format(" | {0} | ", Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
logger.lg.scriviLog(postazione_IP + testoLog, tipo);
|
||||
logger.lg.scriviLog(Postazione.IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -817,45 +705,6 @@ namespace GMW.WebUserControls
|
||||
txtNote.Text = "";
|
||||
}
|
||||
/// <summary>
|
||||
/// toggle controllo storico
|
||||
/// </summary>
|
||||
private void fixStorico()
|
||||
{
|
||||
pnlSAO.Visible = storicoVisibile;
|
||||
if (storicoVisibile)
|
||||
{
|
||||
btnShowHideStorico.Text = traduci("btnHideStorico");
|
||||
}
|
||||
else
|
||||
{
|
||||
btnShowHideStorico.Text = traduci("btnShowStorico");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposto visibilità pannelo storico
|
||||
/// </summary>
|
||||
protected bool storicoVisibile
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.BoolSessionObj(string.Format("showHist_{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("showHist_{0}", this.ID), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gestisco evento show/hide storico
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnShowHideStorico_Click(object sender, EventArgs e)
|
||||
{
|
||||
storicoVisibile = !storicoVisibile;
|
||||
fixStorico();
|
||||
}
|
||||
/// <summary>
|
||||
/// passo alla modalità IN
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
@@ -865,95 +714,6 @@ namespace GMW.WebUserControls
|
||||
Response.Redirect("SterrTaglioIN.aspx");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// selezione di una linea da elenco DropDownList
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlLinea_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkSelDDL(ddlLinea.SelectedValue, true);
|
||||
}
|
||||
/// <summary>
|
||||
/// tenta di selezionare la linea indicata
|
||||
/// </summary>
|
||||
/// <param name="p"></param>
|
||||
private void checkSelDDL(string codLinea, bool doSave)
|
||||
{
|
||||
/*******************************************************
|
||||
* controllo se la linea sia libera .. OVVERO:
|
||||
* - nessuna postazione la occupa
|
||||
* - è bloccata da + di "minutiBloccoLinea" (e quindi sovrascrivo)
|
||||
*
|
||||
*******************************************************/
|
||||
bool lineaLibera = false;
|
||||
try
|
||||
{
|
||||
DS_magazzino.AnagLineeRow riga = MagClass.magazzino.taAL.getByKey(codLinea)[0];
|
||||
if (riga.codPostazione == "" || riga.codPostazione == postazione_name)
|
||||
{
|
||||
lineaLibera = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// controllo se è bloccata da tempo > minutiBloccoLinea --> ignoro blocco!
|
||||
if (DateTime.Now >= riga.dtAccess.AddMinutes(memLayer.ML.confReadInt("minutiBloccoLinea")))
|
||||
{
|
||||
lineaLibera = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (lineaLibera)
|
||||
{
|
||||
//...aggiorno ddl
|
||||
try
|
||||
{
|
||||
ddlLinea.SelectedValue = codLinea;
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
catch
|
||||
{
|
||||
// mostro errore
|
||||
lblMessaggi.Text = string.Format("Errore selezione linea: codice {0} non trovato!", codLinea);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
if (doSave)
|
||||
{
|
||||
refreshBloccoPost(codLinea);
|
||||
// continuo
|
||||
currCodLinea = codLinea;
|
||||
testoRicerca = "";
|
||||
grView.DataBind();
|
||||
salvaCerca();
|
||||
}
|
||||
// salvo codice cella!
|
||||
try
|
||||
{
|
||||
codCella = MagClass.magazzino.taAL.getByKey(currCodLinea)[0].CodCella;
|
||||
idxCella = MagClass.magazzino.taCelle.getByCodCella(codCella)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{
|
||||
codCella = "";
|
||||
idxCella = 0;
|
||||
MagClass.magazzino.taAL.resetPost(postazione_name);
|
||||
}
|
||||
doUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
codCella = "";
|
||||
idxCella = 0;
|
||||
MagClass.magazzino.taAL.resetPost(postazione_name);
|
||||
// mostro errore
|
||||
lblMessaggi.Text = string.Format("Errore: linea {0} già impegnata, sbloccare postazione o attendere timeout!", codLinea);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
ddlLinea.DataBind();
|
||||
ddlLinea.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua refresh (su db) del blocco postazione
|
||||
/// </summary>
|
||||
@@ -961,71 +721,12 @@ namespace GMW.WebUserControls
|
||||
private void refreshBloccoPost(string codLinea)
|
||||
{
|
||||
// resetto usi linee precedenti..
|
||||
MagClass.magazzino.taAL.resetPost(postazione_name);
|
||||
MagClass.magazzino.taAL.resetPost(Postazione.name);
|
||||
// se la linea non è "base" = "Sel linea", finisce x "0"
|
||||
if (codLinea.Substring(codLinea.Length - 1) != "0")
|
||||
{
|
||||
// salvo su DB che sto occupando linea...
|
||||
MagClass.magazzino.taAL.updatePost(codLinea, postazione_name);
|
||||
}
|
||||
// ricarico elenco postazioni...
|
||||
ddlLinea.DataBind();
|
||||
}
|
||||
/// <summary>
|
||||
/// CODICE cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected string codCella
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject("codCellaST"))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj("codCellaST");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("codCellaST", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IDX cella associata alla linea corrente
|
||||
/// </summary>
|
||||
protected int idxCella
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (memLayer.ML.isInSessionObject("IdxCellaLineaST_OUT"))
|
||||
{
|
||||
answ = memLayer.ML.IntSessionObj("IdxCellaLineaST_OUT");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxCellaLineaST_OUT", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// codice della linea corrente
|
||||
/// </summary>
|
||||
protected string currCodLinea
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("LineaOut-{0}", uid)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("LineaOut-{0}", uid));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("LineaOut-{0}", uid), value);
|
||||
MagClass.magazzino.taAL.updatePost(codLinea, Postazione.name);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1190,13 +891,6 @@ namespace GMW.WebUserControls
|
||||
checkParticolare();
|
||||
impostaParticolare();
|
||||
}
|
||||
/// <summary>
|
||||
/// fa su richiesta un refresh (aggiornando dataOra di blocco x cella/posizione ad esempio)
|
||||
/// </summary>
|
||||
public void doRefreshBloccoPost()
|
||||
{
|
||||
refreshBloccoPost(currCodLinea);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,11 +18,25 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("Linea{0}", user_std.pagCorrente));
|
||||
return memLayer.ML.StringSessionObj(string.Format("codLinea{0}", user_std.pagCorrente));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("Linea{0}", user_std.pagCorrente), value);
|
||||
memLayer.ML.setSessionVal(string.Format("codLinea{0}", user_std.pagCorrente), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// NOME Linea corrente (x scambio norm/Dtx)
|
||||
/// </summary>
|
||||
public string nomeLinea
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("nomeLinea{0}", user_std.pagCorrente));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("nomeLinea{0}", user_std.pagCorrente), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -93,6 +107,13 @@ namespace GMW.WebUserControls
|
||||
fixStorico();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnUnload(EventArgs e)
|
||||
{
|
||||
base.OnUnload(e);
|
||||
refreshBloccoPost(Postazione.currCodLinea);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica se ci sia linea ins essione, altrimenti su db, altrimenti reset!
|
||||
/// </summary>
|
||||
@@ -102,6 +123,7 @@ namespace GMW.WebUserControls
|
||||
if (codCella != "")
|
||||
{
|
||||
Postazione.currCodLinea = codLinea;
|
||||
Postazione.currNomeLinea = nomeLinea;
|
||||
Postazione.currCodCella = codCella;
|
||||
Postazione.currIdxCella = idxCella;
|
||||
}
|
||||
@@ -110,6 +132,7 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
DS_magazzino.AnagLineeRow riga = MagClass.magazzino.taAL.getByPostBlocco(Postazione.name, preCodLinea)[0];
|
||||
Postazione.currCodLinea = riga.CodLinea;
|
||||
Postazione.currNomeLinea = riga.Descrizione;
|
||||
Postazione.currCodCella = riga.CodCella;
|
||||
Postazione.currIdxCella = MagClass.magazzino.taCelle.getByCodCella(riga.CodCella)[0].IdxCella;
|
||||
}
|
||||
@@ -117,6 +140,7 @@ namespace GMW.WebUserControls
|
||||
// altrimenti reset!
|
||||
{
|
||||
Postazione.currCodLinea = codLinea;
|
||||
Postazione.currNomeLinea = nomeLinea;
|
||||
Postazione.currCodCella = codCella;
|
||||
Postazione.currIdxCella = idxCella;
|
||||
}
|
||||
@@ -235,6 +259,7 @@ namespace GMW.WebUserControls
|
||||
else
|
||||
{
|
||||
codLinea = Postazione.currCodLinea;
|
||||
nomeLinea = Postazione.currNomeLinea;
|
||||
codCella = Postazione.currCodCella;
|
||||
idxCella = Postazione.currIdxCella;
|
||||
Response.Redirect(urlNT);
|
||||
@@ -341,11 +366,13 @@ namespace GMW.WebUserControls
|
||||
try
|
||||
{
|
||||
Postazione.currCodCella = MagClass.magazzino.taAL.getByKey(Postazione.currCodLinea)[0].CodCella;
|
||||
Postazione.currNomeLinea = MagClass.magazzino.taAL.getByKey(Postazione.currCodLinea)[0].Descrizione;
|
||||
Postazione.currIdxCella = MagClass.magazzino.taCelle.getByCodCella(Postazione.currCodCella)[0].IdxCella;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Postazione.currCodCella = "";
|
||||
Postazione.currNomeLinea = "";
|
||||
Postazione.currIdxCella = 0;
|
||||
MagClass.magazzino.taAL.resetPostBlocco(Postazione.name, preCodLinea); // resetto solo x blocco!
|
||||
//MagClass.magazzino.taAL.resetPost(Postazione.name);
|
||||
@@ -354,6 +381,7 @@ namespace GMW.WebUserControls
|
||||
else
|
||||
{
|
||||
Postazione.currCodCella = "";
|
||||
Postazione.currNomeLinea = "";
|
||||
Postazione.currIdxCella = 0;
|
||||
MagClass.magazzino.taAL.resetPostBlocco(Postazione.name, preCodLinea); // resetto solo x blocco!
|
||||
//MagClass.magazzino.taAL.resetPost(Postazione.name);
|
||||
@@ -372,7 +400,7 @@ namespace GMW.WebUserControls
|
||||
/// effettua refresh (su db) del blocco postazione
|
||||
/// </summary>
|
||||
/// <param name="codLinea"></param>
|
||||
private void refreshBloccoPost(string codLinea)
|
||||
public void refreshBloccoPost(string codLinea)
|
||||
{
|
||||
// resetto usi linee precedenti..
|
||||
MagClass.magazzino.taAL.resetPostBlocco(Postazione.name, preCodLinea); // resetto solo x blocco!
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+22
-3
@@ -103,15 +103,34 @@ namespace GMW_data
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("Linea-{0}", Postazione.IP)))
|
||||
if (memLayer.ML.isInSessionObject(string.Format("codLinea-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("Linea-{0}", Postazione.IP));
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("codLinea-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("Linea-{0}", Postazione.IP), value);
|
||||
memLayer.ML.setSessionVal(string.Format("codLinea-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// NOME della linea corrente
|
||||
/// </summary>
|
||||
public static string currNomeLinea
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (memLayer.ML.isInSessionObject(string.Format("nomeLinea-{0}", Postazione.IP)))
|
||||
{
|
||||
answ = memLayer.ML.StringSessionObj(string.Format("nomeLinea-{0}", Postazione.IP));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("nomeLinea-{0}", Postazione.IP), value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.5.679.1587")]
|
||||
[assembly: AssemblyFileVersion("2.5.679.1587")]
|
||||
[assembly: AssemblyVersion("2.5.680.1588")]
|
||||
[assembly: AssemblyFileVersion("2.5.680.1588")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2007-2014")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("2.5.679.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.5.679.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyVersion("2.5.680.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyFileVersion("2.5.680.<#= this.RevisionNumber #>")]
|
||||
[assembly: AssemblyCopyright("Steamware © 2007-<#= DateTime.Now.Year #>")]
|
||||
[assembly: AssemblyCompany("Steamware")]
|
||||
<#+
|
||||
|
||||
Reference in New Issue
Block a user