ok preselezione dati TIK Anime
This commit is contained in:
@@ -18,12 +18,12 @@ namespace GMW.WebUserControls
|
||||
{
|
||||
disableConfirm = false;
|
||||
traduciObj();
|
||||
lblALSel.Text = "...";
|
||||
}
|
||||
doChecks();
|
||||
lblALSel.Text = "...";
|
||||
if (currAL_KA != "")
|
||||
{
|
||||
lblALSel.Text += string.Format("AL KIT: <b>{0}</b>", currAL_KA);
|
||||
lblALSel.Text = string.Format("AL KIT: <b>{0}</b>", currAL_KA);
|
||||
}
|
||||
if (lblALSel.Text == "")
|
||||
{
|
||||
@@ -128,43 +128,76 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// valore barcode precedente
|
||||
/// </summary>
|
||||
public string prevBarcodeIn
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj(string.Format("prevBarcodeIn.{0}", this.ID));
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal(string.Format("prevBarcodeIn.{0}", this.ID), value, false);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// controlla se ci sia un barcode
|
||||
/// </summary>
|
||||
private void checkBarcode()
|
||||
{
|
||||
if (barcodeIn != "")
|
||||
{
|
||||
DS_Applicazione.ElencoCartelliniRow rigaCart;
|
||||
string tipoImballo = "";
|
||||
prevBarcodeIn = barcodeIn;
|
||||
DS_magazzino.ElencoAssiemiRow rigaAL;
|
||||
bool isAlAnime = false;
|
||||
bool isAttivo = false;
|
||||
lblMessaggi.Text = string.Format("Barcode digitato: {0}", barcodeIn);
|
||||
switch (MagClass.tipoBCode_L4(barcodeIn))
|
||||
{
|
||||
case tipoCodiceBarcode.AL:
|
||||
#if false
|
||||
// procedo solo se UDC esistente
|
||||
if (MagClass.magazzino.checkUDC(barcodeIn))
|
||||
// procedo solo se AL esistente
|
||||
if (MagClass.magazzino.checkAL(barcodeIn))
|
||||
{
|
||||
// cerco di recuperare riga UDC
|
||||
// cerco di recuperare riga AL
|
||||
try
|
||||
{
|
||||
rigaCart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0];
|
||||
tipoImballo = rigaCart.CodImballo;
|
||||
rigaAL = MagClass.magazzino.taEA.getByAL(barcodeIn)[0];
|
||||
if (rigaAL.CodKIT != "" && rigaAL.TipoAL == "A")
|
||||
{
|
||||
isAlAnime = true;
|
||||
isAttivo = rigaAL.Attivo;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salvo UDC from
|
||||
currUdcFrom = barcodeIn;
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
// resetto warnings
|
||||
needForza_NoPosVLP = false;
|
||||
needForzaCons_inLDP = false;
|
||||
// controllo: se sono in fast mode SCARICO!
|
||||
if (disableConfirm)
|
||||
// controllo sia valido x anime (con cod kit + tipo "A"
|
||||
if (isAlAnime)
|
||||
{
|
||||
scaricaUdcFrom(false);
|
||||
// controllo sia attivo (= scaricabile)
|
||||
if (isAttivo)
|
||||
{
|
||||
// salvo AL selezionato
|
||||
currAL_KA = barcodeIn;
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
// controllo: se sono in fast mode SCARICO!
|
||||
if (disableConfirm)
|
||||
{
|
||||
scaricaAlKIT(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text += " - AL KIT Anime <b>NON ATTIVO</b>, impossibile scaricare.";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text += " - AL <b>non valido</b> come KIT Anime!";
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case tipoCodiceBarcode.Comando:
|
||||
// se richiesto scarico rapido lo gestisco
|
||||
@@ -183,8 +216,17 @@ namespace GMW.WebUserControls
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessaggi.Text = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
if (prevBarcodeIn != "")
|
||||
{
|
||||
prevBarcodeIn = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
currAL_KA = "";
|
||||
lblALSel.Text = "---";
|
||||
lblMessaggi.Text = traduci("AttesaBCode");
|
||||
pnlAll.CssClass = "stileAttesa";
|
||||
}
|
||||
}
|
||||
//grView.DataBind();
|
||||
txtBarcode.Focus();
|
||||
@@ -197,7 +239,7 @@ namespace GMW.WebUserControls
|
||||
bool consumaOk = false;
|
||||
if (!disableConfirm)
|
||||
{
|
||||
if (currAL_KA!= "")
|
||||
if (currAL_KA != "")
|
||||
{
|
||||
consumaOk = true;
|
||||
}
|
||||
@@ -227,68 +269,107 @@ namespace GMW.WebUserControls
|
||||
/// perché vogliamo che sia prima in posizione nota (quindi prima spostamento in LP a mano e poi scaricamento)</param>
|
||||
private void scaricaAlKIT(bool forzaOperazione)
|
||||
{
|
||||
DS_magazzino.ElencoAssiemiRow rigaAL;
|
||||
bool isAlAnime = false;
|
||||
bool isAttivo = false;
|
||||
if (currAL_KA != "")
|
||||
{
|
||||
#if false
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
// procedo solo se AL esistente
|
||||
if (MagClass.magazzino.checkAL(barcodeIn))
|
||||
{
|
||||
// controllo UDC sia corretto (in giusta posizione...)
|
||||
if (MagClass.magazzino.IdxPosizioneUdc(currUdcFrom) == memLayer.ML.cdvi("IdxPosizioneAnime"))
|
||||
// cerco di recuperare riga AL
|
||||
try
|
||||
{
|
||||
// 2015.01.08: modifica x gestione con stored esterna di controllo...
|
||||
//if (MagClass.magazzino.codCellaUdc(currUdcFrom) == memLayer.ML.confReadString("cellaLPA") || MagClass.magazzino.codCellaUdc(currUdcFrom) == memLayer.ML.confReadString("cellaLPX") || forzaOperazione)
|
||||
|
||||
// controllo UDC sia in posizione LDP anime LPA010101...
|
||||
if (MagClass.magazzino.checkUdc_OkLPAX(currUdcFrom) || forzaOperazione)
|
||||
rigaAL = MagClass.magazzino.taEA.getByAL(barcodeIn)[0];
|
||||
if (rigaAL.CodKIT != "" && rigaAL.TipoAL == "A")
|
||||
{
|
||||
// controllo che non sia già in una LDP
|
||||
if (!MagClass.magazzino.udcInLdp(currUdcFrom) || forzaOperazione)
|
||||
isAlAnime = true;
|
||||
isAttivo = rigaAL.Attivo;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
// controllo AL sia attivo...
|
||||
if (isAlAnime)
|
||||
{
|
||||
if (isAttivo)
|
||||
{
|
||||
#if false
|
||||
// controllo se UDC non sia già consumato...
|
||||
if (MagClass.magazzino.udcMpIsConsumabile(currUdcFrom))
|
||||
{
|
||||
// controllo UDC sia corretto (in giusta posizione...)
|
||||
if (MagClass.magazzino.IdxPosizioneUdc(currUdcFrom) == memLayer.ML.cdvi("IdxPosizioneAnime"))
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// se richiesto (era in LDP)
|
||||
if (needForzaCons_inLDP)
|
||||
// 2015.01.08: modifica x gestione con stored esterna di controllo...
|
||||
//if (MagClass.magazzino.codCellaUdc(currUdcFrom) == memLayer.ML.confReadString("cellaLPA") || MagClass.magazzino.codCellaUdc(currUdcFrom) == memLayer.ML.confReadString("cellaLPX") || forzaOperazione)
|
||||
|
||||
// controllo UDC sia in posizione LDP anime LPA010101...
|
||||
if (MagClass.magazzino.checkUdc_OkLPAX(currUdcFrom) || forzaOperazione)
|
||||
{
|
||||
// elimino part da altre LDP
|
||||
MagClass.magazzino.taRigheListePrelievo.eliminaByUdc(currUdcFrom);
|
||||
// controllo che non sia già in una LDP
|
||||
if (!MagClass.magazzino.udcInLdp(currUdcFrom) || forzaOperazione)
|
||||
{
|
||||
// consumo UDC
|
||||
MagClass.magazzino.scaricaUdcMpWip(currUdcFrom, Request.UserHostName);
|
||||
// se richiesto (era in LDP)
|
||||
if (needForzaCons_inLDP)
|
||||
{
|
||||
// elimino part da altre LDP
|
||||
MagClass.magazzino.taRigheListePrelievo.eliminaByUdc(currUdcFrom);
|
||||
}
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
needForzaCons_inLDP = false;
|
||||
needForza_NoPosVLP = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// è già in una LDP: mostro button x forzare...
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_impegnatoLDP"), currUdcFrom);
|
||||
needForzaCons_inLDP = true;
|
||||
}
|
||||
}
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("effettuatoConsumoUDC"), currUdcFrom);
|
||||
currUdcFrom = "";
|
||||
pnlAll.CssClass = "stileComandoOk";
|
||||
needForzaCons_inLDP = false;
|
||||
needForza_NoPosVLP = false;
|
||||
else
|
||||
{
|
||||
// non è in posizione LPA: mostro button x forzare...
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_nonPrel"), currUdcFrom);
|
||||
needForza_NoPosVLP = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// è già in una LDP: mostro button x forzare...
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_impegnatoLDP"), currUdcFrom);
|
||||
needForzaCons_inLDP = true;
|
||||
// indico UDC sbagliato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_posizErrataAnime"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// non è in posizione LPA: mostro button x forzare...
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_nonPrel"), currUdcFrom);
|
||||
needForza_NoPosVLP = true;
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_giaConsumato"), currUdcFrom);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC sbagliato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_posizErrataAnime"), currUdcFrom);
|
||||
// indico AL NON attivo!
|
||||
lblMessaggi.Text = string.Format("Errore: AL KIT Anime NON ATTIVO: {0}", currAL_KA);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// indico UDC consumato!
|
||||
lblMessaggi.Text = string.Format("{0} {1}", traduci("UDC_giaConsumato"), currUdcFrom);
|
||||
// indico AL non KIT ANIME!
|
||||
lblMessaggi.Text = string.Format("Errore: AL NON KIT Anime: {0}", currAL_KA);
|
||||
pnlAll.CssClass = "stileComandoKo";
|
||||
}
|
||||
lblALSel.Text = "";
|
||||
#endif
|
||||
lblALSel.Text = "";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user