diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index 98a7b538..3d55a87a 100644 Binary files a/GMW-RT/bin/GMW-RT.dll and b/GMW-RT/bin/GMW-RT.dll differ diff --git a/GMW-RT/bin/GMW_data.dll b/GMW-RT/bin/GMW_data.dll index 9b44b745..d0d4e507 100644 Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ diff --git a/GMW-UT/bin/GMW-UT.dll b/GMW-UT/bin/GMW-UT.dll index 30611e83..59834b9d 100644 Binary files a/GMW-UT/bin/GMW-UT.dll and b/GMW-UT/bin/GMW-UT.dll differ diff --git a/GMW-UT/bin/GMW_data.dll b/GMW-UT/bin/GMW_data.dll index 9b44b745..d0d4e507 100644 Binary files a/GMW-UT/bin/GMW_data.dll and b/GMW-UT/bin/GMW_data.dll differ diff --git a/GMW/WebUserControls/mod_consumoFusi.ascx.cs b/GMW/WebUserControls/mod_consumoFusi.ascx.cs index 751dd133..a549030e 100644 --- a/GMW/WebUserControls/mod_consumoFusi.ascx.cs +++ b/GMW/WebUserControls/mod_consumoFusi.ascx.cs @@ -184,8 +184,8 @@ namespace GMW.WebUserControls // procedo solo se UDC esistente if (MagClass.magazzino.checkUDC(barcodeIn)) { - // controlo se NON ci siano NC "pending" - if (MagClass.magazzino.checkUDC_NC(barcodeIn)) + // controllo se NON ci siano NC "pending" + if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc) { // cerco di recuperare riga UDC try @@ -203,6 +203,12 @@ namespace GMW.WebUserControls { scaricaUdcFrom(); } + // controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG... + if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc) + { + Postazione.CssClass = "stileComandoKo"; + Postazione.messaggiText += traduci("ERR-NC-001"); + } } else { diff --git a/GMW/WebUserControls/mod_lavMeccIN.ascx.cs b/GMW/WebUserControls/mod_lavMeccIN.ascx.cs index f9418838..b0b9d115 100644 --- a/GMW/WebUserControls/mod_lavMeccIN.ascx.cs +++ b/GMW/WebUserControls/mod_lavMeccIN.ascx.cs @@ -254,8 +254,8 @@ namespace GMW.WebUserControls // procedo solo se UDC esistente if (MagClass.magazzino.checkUDC(barcodeIn)) { - // controlo se NON ci siano NC "pending" - if (MagClass.magazzino.checkUDC_NC(barcodeIn)) + // controllo se NON ci siano NC "pending" + if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc) { // controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x trattati (pre lavorazioni meccaniche) int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione; @@ -309,6 +309,13 @@ namespace GMW.WebUserControls Postazione.messaggiText += " - Attenzione, UDC NON VALIDO!"; Postazione.CssClass = "stileComandoKo"; } + + // controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG... + if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc) + { + Postazione.CssClass = "stileComandoKo"; + Postazione.messaggiText += traduci("ERR-NC-001"); + } } else { diff --git a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs index 2f9361be..daf68de3 100644 --- a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs +++ b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs @@ -373,17 +373,17 @@ namespace GMW.WebUserControls // procedo solo se UDC esistente if (MagClass.magazzino.checkUDC(barcodeIn)) { - // controlo se NON ci siano NC "pending" - if (MagClass.magazzino.checkUDC_NC(barcodeIn)) + // controllo se NON ci siano NC "pending" + if (MagClass.magazzino.checkUDC_NC(barcodeIn) != checkUdcNc.HasNc) { - /******************************************************************** - * procedo per UDC in ingresso: - * - deve essere di tipo IN - * - se NON c'è UDC in AL dest a parti particolare LO CREO - * - se c'era già UDC per lo stesso particolare --> consumo (il vecchio) - * - associo UDC letto ad UDC in AL dest a pari particolare - * - ********************************************************************/ + /******************************************************************** + * procedo per UDC in ingresso: + * - deve essere di tipo IN + * - se NON c'è UDC in AL dest a parti particolare LO CREO + * - se c'era già UDC per lo stesso particolare --> consumo (il vecchio) + * - associo UDC letto ad UDC in AL dest a pari particolare + * + ********************************************************************/ // controllo IdxPosizione dell'UDC e confronto con posizione in webconfig x fusi (pre sterratura/taglio) int IdxPosizione = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].IdxPosizione; @@ -483,11 +483,16 @@ namespace GMW.WebUserControls MagClass.magazzino.taSAO.insertQuery(adesso, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, barcodeIn, currParticolare, "spostaUDC", string.Format("Caricato UDC Fusi su linea {2}, qta: {0} {1} ", qta, noteTrim, Postazione.currCodLinea)); } - Postazione.CssClass = "stileComandoOk"; } } } + // controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG... + if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc) + { + Postazione.CssClass = "stileComandoKo"; + Postazione.messaggiText += traduci("ERR-NC-001"); + } } else { diff --git a/GMW/WebUserControls/mod_trattamenti.ascx.cs b/GMW/WebUserControls/mod_trattamenti.ascx.cs index 7235c47c..0da65616 100644 --- a/GMW/WebUserControls/mod_trattamenti.ascx.cs +++ b/GMW/WebUserControls/mod_trattamenti.ascx.cs @@ -318,8 +318,8 @@ namespace GMW.WebUserControls // procedo solo se UDC esistente if (MagClass.magazzino.checkUDC(barcodeIn)) { - // controlo se NON ci siano NC "pending" - if (MagClass.magazzino.checkUDC_NC(barcodeIn)) + // 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")) @@ -366,6 +366,13 @@ namespace GMW.WebUserControls Postazione.messaggiText += " - UDC in posizione non corretta!"; Postazione.CssClass = "stileComandoKO"; } + + // controllo SE PER CASO ci fosse NC e ci sia stata deroga, cambio MSG... + if (MagClass.magazzino.checkUDC_NC(barcodeIn) == checkUdcNc.ChkDis_HasNc) + { + Postazione.CssClass = "stileComandoKo"; + Postazione.messaggiText += traduci("ERR-NC-001"); + } } else { diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 32f49a6d..2d27f3c5 100644 Binary files a/GMW/bin/GMW.dll and b/GMW/bin/GMW.dll differ diff --git a/GMW/bin/GMW_data.dll b/GMW/bin/GMW_data.dll index 9b44b745..d0d4e507 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW/bin/NLog.dll b/GMW/bin/NLog.dll index 464e2ffd..67302657 100644 Binary files a/GMW/bin/NLog.dll and b/GMW/bin/NLog.dll differ diff --git a/GMW/bin/VersGen.dll b/GMW/bin/VersGen.dll index 5de17c80..80f1a748 100644 Binary files a/GMW/bin/VersGen.dll and b/GMW/bin/VersGen.dll differ diff --git a/GMW_DB/GMW_DB.sqlproj.user b/GMW_DB/GMW_DB.sqlproj.user index ace9a86a..3144143e 100644 --- a/GMW_DB/GMW_DB.sqlproj.user +++ b/GMW_DB/GMW_DB.sqlproj.user @@ -1,3 +1,7 @@  + + (Blank) + StartNone + \ No newline at end of file diff --git a/GMW_data/MagClass.cs b/GMW_data/MagClass.cs index eb38e843..df8e1d6e 100644 --- a/GMW_data/MagClass.cs +++ b/GMW_data/MagClass.cs @@ -675,27 +675,45 @@ namespace GMW_data /// verifica se l'UDC indicato sia ESENTE DA NC attive (ovvero senza deroga DC) /// /// - /// true = OK nessuna NC, false = ha delle NC - public bool checkUDC_NC(string UDC) + /// restituisce esito controllo + public checkUdcNc checkUDC_NC(string UDC) { - bool answ = false; + /// default caso pessimo... + checkUdcNc answ = checkUdcNc.HasNc; + bool hasNc = false; + try + { + hasNc = (DataProxy.obj.taUDC2NC.getNcPending(UDC, "DC", "NC").Rows.Count == 0); + } + catch + { } // se richiesto faccio verifica if (memLayer.ML.CRB("checkUDC_NC")) { - try + if(hasNc) { - answ = (DataProxy.obj.taUDC2NC.getNcPending(UDC, "DC", "NC").Rows.Count == 0); + answ = checkUdcNc.HasNc; + } + else + { + answ = checkUdcNc.NoNc; } - catch - { } } - // altrimenti è ok di default + // altrimenti NON E' richiesta verifica else { - answ = true; + if (hasNc) + { + answ = checkUdcNc.ChkDis_HasNc; + } + else + { + answ = checkUdcNc.ChkDis_NoNc; + } } return answ; } + /// /// verifica se l'UDC indicato POSSA ESSERE MOVIMENTATO (ovvero NON in LDP in stato "bloccato") /// @@ -2853,6 +2871,28 @@ public enum statoLista completata, scaricata } +/// +/// esito verifica NC su UDC +/// +public enum checkUdcNc +{ + /// + /// NESSUNA NC + /// + NoNc, + /// + /// controllo disabilitato/non bloccate, NC NON presenti + /// + ChkDis_NoNc, + /// + /// controllo disabilitato/non bloccate, NC presenti + /// + ChkDis_HasNc, + /// + /// ci sono NC, bloccante + /// + HasNc +} /// /// Tipologia assieme logico @@ -2860,7 +2900,7 @@ public enum statoLista public enum tipoAL { /// - /// Non specificato + /// non definito /// ND, ///