completata revisione mod_trattamenti da classe base come altri moduli "finiti"
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+26
-4
@@ -26,13 +26,35 @@ namespace GMW
|
||||
// update vari...
|
||||
doUpdate();
|
||||
mod_storicoAzioniOperatore1.eh_stampa += new EventHandler(mod_storicoAzioniOperatore1_eh_stampa);
|
||||
#if false
|
||||
mod_trattamenti1.doUpdate();
|
||||
#endif
|
||||
mod_trattamenti1.eh_reqUpdate += mod_PostRX_NT1_eh_reqUpdate;
|
||||
mod_trattamenti1.eh_ucev += Mod_trattamenti1_eh_ucev;
|
||||
mod_selLineaNtDt1.eh_lineSelected += mod_selLineaNtDt1_eh_doRefresh;
|
||||
mod_selLineaNtDt1.eh_showHideStorico += mod_selLineaNtDt1_eh_showHideStorico;
|
||||
}
|
||||
|
||||
private void Mod_trattamenti1_eh_ucev(object sender, EventArgs e)
|
||||
{
|
||||
// se trovo evento select/reset mostro/nascondo dettagli...
|
||||
ucEvent evento = (ucEvent)e;
|
||||
switch (evento.tipoEvento)
|
||||
{
|
||||
case ucEvType.Delete:
|
||||
break;
|
||||
case ucEvType.Edit:
|
||||
break;
|
||||
case ucEvType.New:
|
||||
break;
|
||||
case ucEvType.Reset:
|
||||
break;
|
||||
case ucEvType.ReqUpdateParent:
|
||||
doUpdate();
|
||||
break;
|
||||
case ucEvType.Selected:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the showHideStorico event of the mod_selLineaNtDt1_eh control.
|
||||
/// </summary>
|
||||
|
||||
@@ -8,121 +8,44 @@ using System.Collections;
|
||||
|
||||
namespace GMW.WebUserControls
|
||||
{
|
||||
public partial class mod_trattamenti : System.Web.UI.UserControl
|
||||
public partial class mod_trattamenti : GMW_data.UserControlBCodeMan
|
||||
{
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a Trattati
|
||||
/// Imposta variabili specifiche classe
|
||||
/// </summary>
|
||||
protected string flusso = "TT";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a Trattati
|
||||
/// </summary>
|
||||
protected string statoUDC = "Tratt";
|
||||
/// <summary>
|
||||
/// tipo di evento associato alla creazione dell'UDC
|
||||
/// </summary>
|
||||
protected string eventoUDC = "UDC_TRATT";
|
||||
/// <summary>
|
||||
/// stato associato all'UDC precedente (Sterrato)
|
||||
/// </summary>
|
||||
protected string statoUDC_pre = "Sterr";
|
||||
/// <summary>
|
||||
/// attributo per TRATTAMENTO termico
|
||||
/// </summary>
|
||||
protected string attrNumTra = "NT";
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) al TRATTAMENTO termico
|
||||
/// </summary>
|
||||
protected string flusso_TR = "TR";
|
||||
/// <summary>
|
||||
/// dati x verifica CodSoggetto / matricola
|
||||
/// </summary>
|
||||
protected string preCodSogg = memLayer.ML.confReadString("prefCodSogg");
|
||||
public event EventHandler eh_reqUpdate;
|
||||
/// <summary>
|
||||
/// stringa UID univoca
|
||||
/// </summary>
|
||||
public string uid
|
||||
public override void setupVariabili()
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.UniqueID.Replace("$", "_").Replace("-", "_");
|
||||
}
|
||||
flusso = "TT";
|
||||
statoUDC = "Tratt";
|
||||
eventoUDC = "UDC_TRATT";
|
||||
eventoUDC_qta = "UDC_QTY";
|
||||
statoUDC_pre = "Sterr";
|
||||
attrNumTra = "NT";
|
||||
flusso_TR = "TR";
|
||||
tipoUdcLinea = "Trattato";
|
||||
IdxPosizioneIn = memLayer.ML.CRI("IdxPosizioneSterrati");
|
||||
IdxPosizioneOut = memLayer.ML.CRI("IdxPosizioneTrattati");
|
||||
tipoCartCurr = tipoCartellino.cartTratt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
public override void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
traduciObj();
|
||||
resetTrattamenti();
|
||||
resetUDC();
|
||||
checkNumKeyIn();
|
||||
}
|
||||
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>
|
||||
/// richiesta (ri)stampa UDC
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void ristampa()
|
||||
{
|
||||
bool fatto = false;
|
||||
// registro ri-stampa UDC
|
||||
DateTime adesso = DateTime.Now;
|
||||
// calcolo particolare...
|
||||
DS_magazzino.ElencoCartelliniRow rigaUDC;
|
||||
string particolare = "";
|
||||
try
|
||||
{
|
||||
rigaUDC = MagClass.magazzino.taCartellini.getByUdc(udcReq)[0];
|
||||
particolare = rigaUDC.Particolare;
|
||||
fatto = MagClass.magazzino.ristampaUdc(udcReq, Postazione.printer, Request.UserHostName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore recupero particolare UDC Trattati {0}", udcReq), tipoLog.EXCEPTION);
|
||||
}
|
||||
if (fatto) MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, udcReq, particolare, "stampaUDC", "Ri-Stampato UDC Trattati");
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// udc da stampare
|
||||
/// </summary>
|
||||
protected string udcReq
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("udcSelSAO");
|
||||
}
|
||||
base.Page_Load(sender, e);
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla particolare selezionato
|
||||
/// </summary>
|
||||
private void checkParticolare()
|
||||
public override void checkParticolare()
|
||||
{
|
||||
if (currParticolare != "")
|
||||
{
|
||||
@@ -149,18 +72,9 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua controlli visibilità
|
||||
/// </summary>
|
||||
private void doChecks()
|
||||
{
|
||||
checkBarcode();
|
||||
checkStampa();
|
||||
checkParticolare();
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo labels oggetti
|
||||
/// </summary>
|
||||
private void traduciObj()
|
||||
public override void traduciObj()
|
||||
{
|
||||
// labels
|
||||
lblAnnoTratt.Text = traduci("lblAnnoTratt");
|
||||
@@ -172,138 +86,9 @@ namespace GMW.WebUserControls
|
||||
btnEmptyNote.Text = traduci("btnEmptyNote");
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome della pagina corrente
|
||||
/// </summary>
|
||||
protected string PagCorrente
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
Uri MyUrl = Request.Url;
|
||||
string delimStr = "/";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] finalUrl = MyUrl.LocalPath.ToString().Split(delimiter);
|
||||
int n = finalUrl.Length;
|
||||
answ = finalUrl[n - 1].ToString();
|
||||
DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", answ))[0];
|
||||
answ = riga.NOME;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper traduzione
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(object lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// indica il codice articolo correntemente selezionato
|
||||
/// </summary>
|
||||
protected string currParticolare
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("currParticolare_{0}", uid));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("currParticolare_{0}", uid), value, memLayer.ML.confReadBool("keepParticolareSel"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// indica se i caratteri vadano forzati a maiuscoli
|
||||
/// </summary>
|
||||
public bool forceUppercase
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.confReadBool("forceUppercase");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// num pezzi dell'ultimo UDC del particolare generato
|
||||
/// </summary>
|
||||
public int pezziUdc
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = (int)MagClass.magazzino.taCartellini.getLastByParticolareStato(memLayer.ML.StringSessionObj("CodCS"), currParticolare, statoUDC)[0].Qta;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <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;
|
||||
}
|
||||
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
|
||||
public override string barcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -317,7 +102,7 @@ namespace GMW.WebUserControls
|
||||
/// <summary>
|
||||
/// qta pezzi TOTALE
|
||||
/// </summary>
|
||||
public int qta
|
||||
public override int qta
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -338,12 +123,12 @@ namespace GMW.WebUserControls
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
public override void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
Postazione.messaggiText = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (tipoBCode)
|
||||
switch (MagClass.tipoBCode_L3(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.Particolare:
|
||||
// 2014.02.13: tolto perché NON si vuole particolare OUT diverso da IN
|
||||
@@ -362,20 +147,15 @@ namespace GMW.WebUserControls
|
||||
// controllo se NON ci siano NC "pending"
|
||||
if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc)
|
||||
{
|
||||
// 2014.05.19: solo posizioni > 0, era ANCHE se consumati, tolto...
|
||||
//if (Math.Abs(MagClass.magazzino.IdxPosizioneUdc(barcodeIn)) == memLayer.ML.confReadInt("IdxPosizioneSterrati"))
|
||||
|
||||
// 2014.07.16 aggiunto check posizione consumata x particolari TK "con deroga" come BMW
|
||||
//if(MagClass.magazzino.IdxPosizioneUdc(barcodeIn) == memLayer.ML.confReadInt("IdxPosizioneSterrati"))
|
||||
bool posizOk = false;
|
||||
if (memLayer.ML.confReadString("codPartTrattDeroga").IndexOf(string.Format("#{0}#", DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare)) >= 0)
|
||||
{
|
||||
// controllo se il particolare è in quelli che accettano UDC già consumati
|
||||
posizOk = (Math.Abs(MagClass.magazzino.IdxPosizioneUdc(barcodeIn)) == memLayer.ML.confReadInt("IdxPosizioneSterrati"));
|
||||
posizOk = (Math.Abs(MagClass.magazzino.IdxPosizioneUdc(barcodeIn)) == IdxPosizioneIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
posizOk = MagClass.magazzino.IdxPosizioneUdc(barcodeIn) == memLayer.ML.confReadInt("IdxPosizioneSterrati");
|
||||
posizOk = MagClass.magazzino.IdxPosizioneUdc(barcodeIn) == IdxPosizioneIn;
|
||||
}
|
||||
// posizione corretta
|
||||
if (posizOk)
|
||||
@@ -472,44 +252,19 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
barcodeIn = "";
|
||||
}
|
||||
#if false
|
||||
else
|
||||
{
|
||||
Postazione.messaggiText = traduci("AttesaBCode");
|
||||
Postazione.CssClass = "stileAttesa";
|
||||
}
|
||||
#endif
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
}
|
||||
/// <summary>
|
||||
/// imposto numero pezzi
|
||||
/// </summary>
|
||||
private void fixNumPezzi()
|
||||
{
|
||||
// leggo la qta dell'ultimo UDC del particolare, SE C'E', e la imposto...
|
||||
if (pezziUdc > 0)
|
||||
{
|
||||
txtQta.Text = pezziUdc.ToString();
|
||||
}
|
||||
else // rimette default
|
||||
{
|
||||
txtQta.Text = memLayer.ML.confReadString("QtaImballoTratt");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// aggiorna tabella + focus a barcode
|
||||
/// </summary>
|
||||
public void doUpdate()
|
||||
public override void doUpdate()
|
||||
{
|
||||
checkStampa();
|
||||
base.doUpdate();
|
||||
txtBarcode.Focus();
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
raiseEvent(ucEvType.ReqUpdateParent);
|
||||
}
|
||||
/// <summary>
|
||||
/// controllo l'abilitazione alla stampa UDC:
|
||||
@@ -518,7 +273,7 @@ namespace GMW.WebUserControls
|
||||
/// - almeno 1 trattamento
|
||||
/// altrimenti disabilito btn stampa
|
||||
/// </summary>
|
||||
private void checkStampa()
|
||||
public override void checkStampa()
|
||||
{
|
||||
bool stampaOk = false;
|
||||
//controllo siano inseriti valori qta
|
||||
@@ -540,7 +295,7 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected void btnStampa_Click(object sender, EventArgs e)
|
||||
public override void btnStampa_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool needsRedirect = false;
|
||||
string[] stringSeparators = new string[] { "#" };
|
||||
@@ -604,7 +359,7 @@ namespace GMW.WebUserControls
|
||||
try
|
||||
{
|
||||
// creo nuovo UDC trattati
|
||||
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoTratt"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.confReadInt("IdxPosizioneTrattati"), "IdxPosizioneTrattati", eventoUDC, noteTrim, "", adesso.Year, Request.UserHostName);
|
||||
newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoTratt"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, IdxPosizioneOut, "IdxPosizioneTrattati", eventoUDC, noteTrim, "", adesso.Year, Request.UserHostName);
|
||||
|
||||
if (OpAuth.isAuth)
|
||||
{
|
||||
@@ -640,39 +395,6 @@ namespace GMW.WebUserControls
|
||||
// creo UDC dei trattamenti termici
|
||||
foreach (KeyValuePair<string, string> kvp in elencoTrattamenti)
|
||||
{
|
||||
// versione vecchia con creazione UDC di trattamento e relazione...
|
||||
#if false
|
||||
|
||||
// verifico se ci sia già UDC
|
||||
UdcExists = MagClass.magazzino.checkUDC(newUdcParent);
|
||||
if (!UdcExists)
|
||||
{
|
||||
try
|
||||
{
|
||||
// creo UDC
|
||||
MagClass.magazzino.creaUdc(flusso_TR, "", currParticolare, "", "", "", "", "", 0, "", "U", MagClass.magazzino.CodSoggCurrUser, 0, 0, 0, DateTime.Now, 0, "Trattamenti", memLayer.ML.confReadInt("IdxPosizioneTrattamenti"), "IdxPosizioneTrattamenti", eventoUDC_TR, flusso, newUdcParent, anno, Request.UserHostName);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
httpLog(string.Format("Errore creazione cartellino trattamenti: {0}", exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
// associo tratt termici e liquidi
|
||||
MagClass.magazzino.associaUdcParent(newUdcChild, newUdcParent);
|
||||
if (!UdcExists)
|
||||
{
|
||||
// consumo UDC tratt termici
|
||||
MagClass.magazzino.scaricaUdcMpWip(newUdcParent, Request.UserHostName);
|
||||
}
|
||||
// reset valori
|
||||
newUdcParent = "";
|
||||
UdcExists = false;
|
||||
#endif
|
||||
// vecchia versione con calcolo num trattamento "tipo UDC"
|
||||
#if false
|
||||
// calcolo il nuovo codice UDC del trattamento
|
||||
newUdcParent = MagClass.magazzino.getComposizioneUDC(memLayer.ML.confReadString("CodCS"), flusso_TR, anno.ToString(), Convert.ToInt32(kvp.Key));
|
||||
#endif
|
||||
// nuova versione codice trattamento (anno-numero)
|
||||
codTratt = MagClass.magazzino.getCompTrattamenti(txtAnno.Text, kvp.Key);
|
||||
// inserisco attributo trattamento
|
||||
@@ -733,53 +455,13 @@ namespace GMW.WebUserControls
|
||||
Response.Redirect("~/menu.aspx");
|
||||
}
|
||||
// raise dell'evento
|
||||
if (eh_reqUpdate != null)
|
||||
{
|
||||
eh_reqUpdate(this, new EventArgs());
|
||||
}
|
||||
raiseEvent(ucEvType.ReqUpdateParent);
|
||||
if (needsRedirect)
|
||||
{
|
||||
Response.Redirect(user_std.pagCorrente);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua il consumo dell'UDC inviati come array di stringhe
|
||||
/// </summary>
|
||||
/// <param name="UDC"></param>
|
||||
private void consumaUdc(string UDC)
|
||||
{
|
||||
// se UDC è NON vuoto ed esiste
|
||||
if (UDC != "" && MagClass.magazzino.checkUDC(UDC))
|
||||
{
|
||||
// se è consumabile (IdxPosizione > 0)...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(UDC))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(UDC, Request.UserHostName);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///associa nuovo UDC ad elenco UDC
|
||||
/// </summary>
|
||||
/// <param name="newUdcChild">UDC da associare come child</param>
|
||||
/// <param name="UDC_P">vettorei di UDC da associare come parent</param>
|
||||
private void associaUdc(string newUdcChild, string[] UDC_P)
|
||||
{
|
||||
if (UDC_P.Length > 0)
|
||||
{
|
||||
// ciclo
|
||||
foreach (string udc_p in UDC_P)
|
||||
{
|
||||
// se UDC è NON vuoto ed esiste
|
||||
if (udc_p != "" && MagClass.magazzino.checkUDC(udc_p))
|
||||
{
|
||||
MagClass.magazzino.associaUdcParent(newUdcChild, udc_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che il vettore di UDC abbia tutto lo stesso particolare e lo restituisce, altrimenti restituisce ""
|
||||
/// </summary>
|
||||
/// <param name="UDC_P">dictionary di UDC da verificare</param>
|
||||
@@ -802,85 +484,15 @@ namespace GMW.WebUserControls
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string _testoPre)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + _testoPre);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// wrapper per log con salvataggio dell'IP del chiamante
|
||||
/// </summary>
|
||||
/// <param name="_testoPre"></param>
|
||||
/// <returns></returns>
|
||||
public bool httpLog(string testoLog, tipoLog tipo)
|
||||
{
|
||||
bool answ = false;
|
||||
logger.lg.scriviLog(Postazione.IP + testoLog, tipo);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua reset dati
|
||||
/// </summary>
|
||||
public void doResetData()
|
||||
public override void doResetData()
|
||||
{
|
||||
// resetto UDC e trattamenti
|
||||
resetTrattamenti();
|
||||
resetUDC();
|
||||
// resetto i dati QtaTot e particolare...
|
||||
qta = 0;
|
||||
currParticolare = "";
|
||||
txtQta.Text = "";
|
||||
doChecks();
|
||||
base.doResetData();
|
||||
}
|
||||
/// <summary>
|
||||
/// svuoto le note
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
protected void grView_PageIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
protected void grView_Sorted(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// aggiorno ods al binding..
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ods_DataBinding(object sender, EventArgs e)
|
||||
{
|
||||
// fix dell'ODS
|
||||
checkFixOds();
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica se attivo filtro company e imposta ods di conseguenza...
|
||||
/// </summary>
|
||||
private void checkFixOds()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// elenco dictionary dei trattamenti da associare ad UDC
|
||||
/// </summary>
|
||||
@@ -1028,7 +640,7 @@ namespace GMW.WebUserControls
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtQta_TextChanged(object sender, EventArgs e)
|
||||
public override void txtQta_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkStampa();
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,14 +11,18 @@ namespace GMW_data
|
||||
#region area base comune (variabili, valori e metodi generali)
|
||||
|
||||
/// <summary>
|
||||
/// flusso associato (hard coded) a sterrati
|
||||
/// flusso associato al controllo
|
||||
/// </summary>
|
||||
public string flusso = "";
|
||||
/// <summary>
|
||||
/// stato associato (hard coded) a sterrati
|
||||
/// stato associato all'UDC da CREARE
|
||||
/// </summary>
|
||||
public string statoUDC = "";
|
||||
/// <summary>
|
||||
/// stato associato all'UDC da accettare
|
||||
/// </summary>
|
||||
public string statoUDC_pre = "";
|
||||
/// <summary>
|
||||
/// tipo di evento associato alla creazione dell'UDC
|
||||
/// </summary>
|
||||
public string eventoUDC = "";
|
||||
@@ -27,6 +31,14 @@ namespace GMW_data
|
||||
/// </summary>
|
||||
public string eventoUDC_qta = "";
|
||||
/// <summary>
|
||||
/// attributo per TRATTAMENTO termico
|
||||
/// </summary>
|
||||
public string attrNumTra = "";
|
||||
/// <summary>
|
||||
/// flusso associato al TRATTAMENTO termico
|
||||
/// </summary>
|
||||
public string flusso_TR = "";
|
||||
/// <summary>
|
||||
/// dati x verifica CodSoggetto / matricola
|
||||
/// </summary>
|
||||
public string preCodSogg = memLayer.ML.CRS("prefCodSogg");
|
||||
@@ -526,11 +538,15 @@ namespace GMW_data
|
||||
/// <param name="oldUdc"></param>
|
||||
public virtual void consumaUdc(string oldUdc)
|
||||
{
|
||||
// se è consumabile (IdxPosizione > 0)...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(oldUdc))
|
||||
// se UDC è NON vuoto ed esiste
|
||||
if (oldUdc != "" && MagClass.magazzino.checkUDC(oldUdc))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(oldUdc, Request.UserHostName);
|
||||
// se è consumabile (IdxPosizione > 0)...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(oldUdc))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(oldUdc, Request.UserHostName);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user