diff --git a/GMW-RT/bin/GMW-RT.dll b/GMW-RT/bin/GMW-RT.dll index ac360ee6..d215867e 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 004951e8..f4950ecb 100644 Binary files a/GMW-RT/bin/GMW_data.dll and b/GMW-RT/bin/GMW_data.dll differ diff --git a/GMW-RT/bin/SteamWare.dll b/GMW-RT/bin/SteamWare.dll index 8115f0b5..201457b7 100644 Binary files a/GMW-RT/bin/SteamWare.dll and b/GMW-RT/bin/SteamWare.dll differ diff --git a/GMW/GMW.csproj b/GMW/GMW.csproj index 834edf97..1b9528ad 100644 --- a/GMW/GMW.csproj +++ b/GMW/GMW.csproj @@ -2254,7 +2254,7 @@ True 57804 / - http://localhost:55555 + http://localhost:55554 False False diff --git a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs index 6d58da85..05318f3a 100644 --- a/GMW/WebUserControls/mod_sterrTaglio.ascx.cs +++ b/GMW/WebUserControls/mod_sterrTaglio.ascx.cs @@ -377,36 +377,63 @@ namespace GMW.WebUserControls { // calcolo nuovo particolare string newPart = DataProxy.obj.taCartellini.stp_getByUdc(barcodeIn)[0].Particolare; + string udcDest = ""; // imposto particolare! currParticolare = newPart; // controllo SE esista già UDC in AL dest... altrimenti CREO!!! - checkCreaUDC(); + udcDest = checkCreaUDC(); // verifico per eventuale consumo vecchio UDC + // cerco nella posizione + DS_magazzino.v_UdcDetailDataTable tabUdcDet = null; try { // cerco nella posizione - DS_magazzino.v_UdcDetailDataTable tabUdcDet= MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(idxCella); - // cerco se ci sia l'UDC letto... - if (tabUdcDet.Select(string.Format("UDC = '{0}'")).Length > 0) - { - // non faccio nulla - } - else - { - // consumo!!! - // !!!FARE!!! - } + tabUdcDet = MagClass.magazzino.taDettUDC.getUdcDetailByIdxCella(idxCella); } catch { } + // carico UDC letto in cella... + DateTime adesso = DateTime.Now; + string noteTrim = Postazione.currNomeLinea; + // cerco se NON ci sia l'UDC letto... + if (tabUdcDet.Select(string.Format("UDC = '{0}'", barcodeIn)).Length == 0) + { + string oldUdc = ""; + try + { + oldUdc = ((DS_magazzino.v_UdcDetailRow)tabUdcDet.Select(string.Format("Particolare = '{0}'", currParticolare))[0]).UDC; + } + catch + { } + // se trovo un altro UDC dello stesso particolare... + if (oldUdc != "") + { + // consumo UDC + consumaUdc(oldUdc); + } + + // se ho cod cella sposto UDC in nuova posizione! + MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), barcodeIn, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName); + // registro spostamento UDC + 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"; + // associo UDC con quello di destinazione + MagClass.magazzino.associaUdcParent(udcDest, barcodeIn, true); } } } + // update gridview origine e dest + grView.DataBind(); + grViewDest.DataBind(); break; default: Postazione.messaggiText += " - codice non riconosciuto!"; @@ -422,6 +449,19 @@ namespace GMW.WebUserControls } txtBarcode.Focus(); } + /// + /// effettua consumo UDC + /// + /// + private void consumaUdc(string oldUdc) + { + // se è consumabile (IdxPosizione > 0)... + if (MagClass.magazzino.udcMpIsConsumabile(oldUdc)) + { + // consumo UDC + MagClass.magazzino.scaricaUdcMpWip(oldUdc, Request.UserHostName); + } + } /// /// crea eventualmente UDC per particolare in AL di destinazione e restituisce codice UDC diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 5a4cbc98..ea6000b1 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 004951e8..f4950ecb 100644 Binary files a/GMW/bin/GMW_data.dll and b/GMW/bin/GMW_data.dll differ diff --git a/GMW/bin/SteamWare.dll b/GMW/bin/SteamWare.dll index 8115f0b5..201457b7 100644 Binary files a/GMW/bin/SteamWare.dll and b/GMW/bin/SteamWare.dll differ diff --git a/GMW/bin/VersGen.dll b/GMW/bin/VersGen.dll index 2238d76d..7de2c6d4 100644 Binary files a/GMW/bin/VersGen.dll and b/GMW/bin/VersGen.dll differ