diff --git a/GMW/WebUserControls/mod_PostLiq_DT.ascx b/GMW/WebUserControls/mod_PostLiq_DT.ascx index 0a24e0bd..783e69d1 100644 --- a/GMW/WebUserControls/mod_PostLiq_DT.ascx +++ b/GMW/WebUserControls/mod_PostLiq_DT.ascx @@ -82,12 +82,10 @@ <%: traduci("Note") %>
- +
-
- <%--OnClick="lbtGeneraAl_Click"--%> - <%: traduci("lbtGeneraAl") %> - <%: traduci("lbtGeneraUDC") %> +
+ <%: traduci("lbtGeneraUDC") %>
@@ -120,7 +118,7 @@ <%: traduci("Reset") %> - + @@ -157,7 +155,7 @@
- <%: traduci("addUDC") %> + <%: traduci("updateQty") %>
diff --git a/GMW/WebUserControls/mod_PostLiq_DT.ascx.cs b/GMW/WebUserControls/mod_PostLiq_DT.ascx.cs index 5dd989f7..0192ae06 100644 --- a/GMW/WebUserControls/mod_PostLiq_DT.ascx.cs +++ b/GMW/WebUserControls/mod_PostLiq_DT.ascx.cs @@ -26,6 +26,10 @@ namespace GMW.WebUserControls /// protected string flusso = "FI"; /// + /// flusso associato (hard coded) ad ancestor TT (Trattati) + /// + protected string flussoAnc = "TT"; + /// /// stato associato (hard coded) a UDC in OUT: Finito /// protected string statoUdcOut = "Fin"; @@ -225,17 +229,6 @@ namespace GMW.WebUserControls destAL = AlByCella; qta = 0; currUDC = ""; -#if false - if (sourceAL == "") - { - fixCssAL("warning"); - } - - currParticolare = ""; - fixTipoInput(); - fixCella(); - traduciObj(); -#endif } setVisibility(); checkBarcode(); @@ -412,6 +405,8 @@ namespace GMW.WebUserControls { // oppure lo creo... NewUDC = MagClass.magazzino.creaUdc(flusso, "", particolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoFiniti"), "U", MagClass.magazzino.CodSoggCurrUser, 0, 0, 0, adesso, 0, statoUdcOut, memLayer.ML.confReadInt("IdxPosizioneFinTemp"), "IdxPosizioneFinTemp", codEventoUdcOut, "", "", adesso.Year, Request.UserHostName); + // lo associo all'AL! + MagClass.magazzino.taAL2UDC.Insert(destAL, NewUDC, adesso, MagClass.magazzino.CodSoggCurrUser); } // se lo trovo chiamo procedura di spostamento Dtx tra UDC sorgente --> dest (con eventuale creazione dest) DataMatrix.mgr.taDtx2UDC.UpdateUDC(NewUDC, barcodeIn, statoUdcOut, DateTime.Now, MagClass.magazzino.CodSoggCurrUser); @@ -430,75 +425,7 @@ namespace GMW.WebUserControls Postazione.warningText = traduci("DtxNonTrovato"); Postazione.CssClass = "stileComandoKo"; } -#if false - // datamatrix ok: setto css e labels - Postazione.messaggiText = traduci("partSelected"); - Postazione.warningText = ""; - Postazione.CssClass = "stileComandoOk"; - // controllo il particolare da Dtx + check capienza celle - if (Postazione.currCodCella != "") - { - // calcolo aprticolare! - try - { - currParticolare = DataMatrix.mgr.taDecode.GetData(barcodeIn)[0].Particolare; - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Errore in decodifica particolare da DataMatrix:{0}dtx:{1}{0}Eccezione:{0}{2}", Environment.NewLine, barcodeIn, exc), tipoLog.EXCEPTION); - currParticolare = ""; - } - if (currParticolare != "") - { - // genera eventuale UDC del particolare su cella/posizione corrente - qta = 1; // tanto poi si ricalcola... - checkCreaUDC(); - /*----------------------------------------------- - * chiamo la stored che in blocco - * - associa Dtx a UDC - * - fa controllo, se ho almeno 2 Dtx ok associo tutti i Dtx compresi nell'intervallo min-MAX - *----------------------------------------------- - */ - DataMatrix.mgr.taDtx2UDC.RxSetDtx2Udc(barcodeIn, MagClass.magazzino.CodSoggCurrUser, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella); - } - } -#endif break; -#if false - case tipoCodiceBarcode.Particolare: - // imposto il particolare corrente - currParticolare = barcodeIn; - // controllo esista il particolare scansionato - if (DataProxy.obj.taAnagParticolari.getByParticolare(currParticolare).Rows.Count == 0) - { - currParticolare = ""; - Postazione.messaggiText = traduci("partNotFound"); - Postazione.CssClass = "stileComandoKo"; - } - else - { - Postazione.messaggiText = traduci("partSelected"); - Postazione.warningText = ""; - Postazione.CssClass = "stileComandoOk"; - } - // leggo la qta dell'ultimo UDC del particolare, SE C'E', e la imposto... - if (pezziUdc > 0) - { - qta = pezziUdc; - } - else // rimette default - { - qta = memLayer.ML.confReadInt("QtaImballoRX"); - } - break; - case tipoCodiceBarcode.PartNumber: - // SEGNALO che ho trovato un partnumber che è un possibile datamatrix, am ceh no è nell'elenco dei datamatrix acquisiti... - Postazione.warningText = traduci("partNumFoundNoDtx"); - Postazione.CssClass = "stileComandoWarn"; - // creo comunque UDC ed associo datamatrix... - - break; -#endif default: Postazione.warningText = traduci("CodNonRicon"); Postazione.CssClass = "stileComandoND"; @@ -574,6 +501,8 @@ namespace GMW.WebUserControls Postazione.CssClass = "stileComandoOk"; setVisibility(); doUpdate(); + // fisso focus su note! + txtNote.Focus(); } /// /// check dopo cancellazione @@ -583,7 +512,7 @@ namespace GMW.WebUserControls protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e) { #if false - // aggiorno le qta! + // aggiorno le qta! qta = pezziUdc; #endif } @@ -640,69 +569,92 @@ namespace GMW.WebUserControls private void verificaBtnStampa() { bool showBtnStampa = false; -#if false - // se ho ALMENO 1 UDC - DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga; - bool hasUdc = false; - try + // se ho selezionato udc... + if (currUDC != "") { - riga = MagClass.magazzino.taStatoCelle.getByIdxCella(Postazione.currIdxCella)[0]; - if (riga.UdcAssegnati > 0) hasUdc = true; - } - catch - { - } - if (hasUdc) - { - // se ho num cesta... - if (numCesta != "") - { - showBtnStampa = true; - } - } -#endif - divNote.Visible = showBtnStampa; - } - - - -#if false - /// - /// aggiorna visualizzazioen dati particolare - /// - private void updatePart() - { - if (currParticolare != "") - { - lblParticolareAttivo.Text = string.Format("{0} {1}", traduci("particSel"), currParticolare); - // aggiungo descrizione del particolare - string descr = ""; - string disegno = ""; + DS_magazzino.v_A2U2DRow riga; + int qtaUDC = 0; + int qtaDtx = 0; try { - DS_magazzino.AnagParticolariRow riga = MagClass.magazzino.taAnagPart.likeSearch(currParticolare, memLayer.ML.StringSessionObj("CodCS"))[0]; - descr = riga.DescParticolare; - disegno = string.Format("( {0} )", riga.DisegnoGrezzo); + riga = MagClass.magazzino.taA2U2D.getByUDC(currUDC)[0]; + qtaUDC = Convert.ToInt32(riga.Qta); + qtaDtx = riga.QtaDtx; } catch { } - lblDescrAttivo.Text = descr; - lblDisegno.Text = disegno; - } - else - { - lblParticolareAttivo.Text = "..."; - lblDescrAttivo.Text = ""; - lblDisegno.Text = ""; + if (qtaUDC > 0) + { + // se le qta voluta e dtx sono uguali... + if (qtaUDC == qtaDtx) + { + showBtnStampa = true; + } + } } + divNote.Visible = showBtnStampa; } /// - /// verifica se si debab mostrare un campo ricerca UDC attivo... + /// fornisce in output la corretta classe css x icona /// - private void fixCella() + /// + /// + /// + public string cssGlyphByQty(object _qta, object _qtaDtx) { - lblIdxCella.Text = Postazione.currIdxCella.ToString(); + string answ = "glyphicon glyphicon-pencil btn-lg"; + int qtaUDC = 0; + int qtaDtx = -1; + try + { + qtaUDC = Convert.ToInt32(_qta); + } + catch { } + try + { + qtaDtx = Convert.ToInt32(_qtaDtx); + } + catch { } + if (qtaUDC == qtaDtx) + { + answ = "glyphicon glyphicon-print btn-lg"; + } + return answ; } + /// + /// effettua processo di sistemazione UDC e stampa + /// + /// + /// + protected void lbtStampaUDC_Click(object sender, EventArgs e) + { + // in base ad AL sorgente e destinazione, fa le operazioni di update x UDC e poi lo stampa + bool fatto = false; + string noteTrim = txtNote.Text.Trim(); + try + { + // update UDC! + fatto = MagClass.magazzino.liquidiFullUpdate(sourceAL, flussoAnc, currUDC, noteTrim, MagClass.magazzino.CodSoggCurrUser); + } + catch + { } + if (fatto) + { + // lancio stampa + MagClass.magazzino.stampaAL(currUDC, Postazione.printer, tipoCartellino.cartFiniti, Request.UserHostName); + // registro creazione AL + MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, currUDC, currParticolare, "stampaUDC", string.Format("Stampato UDC Dtx {0} su linea {1}, note: {2} ", currUDC, Postazione.currCodLinea, noteTrim)); + Postazione.CssClass = "stileAttesa"; + Postazione.warningText = ""; + Postazione.messaggiText = traduci("cartAlStampato"); + // resetto... + grViewDest.SelectedIndex = -1; + qta = 0; + currUDC = ""; + } + doUpdate(); + } + /// /// udc da stampare /// @@ -713,217 +665,6 @@ namespace GMW.WebUserControls return memLayer.ML.StringSessionObj("udcSelSAO"); } } - /// - /// sistemo labels oggetti - /// - private void traduciObj() - { - - } - /// - /// effettua reset dati - /// - private void doResetData() - { - // resetto i dati QtaTot e particolare... - doChecks(); - } - /// - /// traduce gli header delle colonne - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) - { - if (grView.Rows.Count > 0) - { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) - { - try - { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); - } - catch - { } - } - int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); - lblNumRec.Text = string.Format("{0} / 6", totRecord); - } - else - { - lblNumRec.Text = ""; - } - } - /// - /// cambiato tipo di richeista di input - /// - /// - /// - protected void rblInputMode_SelectedIndexChanged(object sender, EventArgs e) - { - fixTipoInput(); - } - /// - /// creo il nuovo UDC da particolare corrente! - /// - /// - /// - protected void lbtAddUdc_Click(object sender, EventArgs e) - { - // controlli preliminari - if (Postazione.currCodCella != "") - { - if (currParticolare != "") - { - if (qta > 0) - { - checkCreaUDC(); - } - else - { - Postazione.warningText = traduci("ErroreNoQta"); - Postazione.CssClass = "stileComandoKo"; - } - } - else - { - Postazione.warningText = traduci("ErroreNoPart"); - Postazione.CssClass = "stileComandoKo"; - } - } - else - { - Postazione.warningText = traduci("ErroreNoSelLinea"); - Postazione.CssClass = "stileComandoKo"; - } - doUpdate(); - } - /// - /// crea eventualmente UDC per particolare - /// - /// - /// - private void checkCreaUDC() - { - string newUdcChild = ""; - string noteTrim = ""; - DateTime adesso = DateTime.Now; - // verifico se ho già quel particolare tra quelli inseriti in linea... - try - { - newUdcChild = DataProxy.obj.taCartellini.getByParticolareIdxPosIdxCella(currParticolare, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), Postazione.currIdxCella)[0].UDC; - } - catch - { - newUdcChild = ""; - } - if (newUdcChild == "") - { - // controllo NON ci siano troppi UDC in posizione... da capienza ed assegnati - DS_magazzino.V_statoCelleCapienzaAssegnatiRow riga; - bool piena = false; - try - { - riga = MagClass.magazzino.taStatoCelle.getByIdxCella(Postazione.currIdxCella)[0]; - if (riga.UdcAssegnati >= riga.Capienza) piena = true; - } - catch - { - } - if (!piena) - { - try - { - // forzo qta a 0 x generare nuovo UDC - qta = 0; - // creo nuovo UDC RX - newUdcChild = MagClass.magazzino.creaUdc(flusso, "", currParticolare, "", "", "", "", "", 0, memLayer.ML.confReadString("CodImballoRX"), "U", MagClass.magazzino.CodSoggCurrUser, qta, 0, 0, adesso, 0, statoUDC, memLayer.ML.confReadInt("IdxPosizioneRxTemp"), "IdxPosizioneRxTemp", codEventoUdc, noteTrim, "", adesso.Year, Request.UserHostName); - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Errore in creazione UDC temp RX: {0}{1}", Environment.NewLine, exc)); - } - } - else - { - Postazione.warningText = traduci("ErroreAL-Full"); - doUpdate(); - } - } - else - { - // aggiorno quantità! - MagClass.magazzino.taCartellini.updateQty(newUdcChild, MagClass.magazzino.CodSoggCurrUser, "U", codEventoUdc, qta); - } - if (newUdcChild != "") - { - // lo posiziono nella cella corrente... - MagClass.magazzino.spostaUDC(memLayer.ML.StringSessionObj("CodCS"), newUdcChild, Postazione.currIdxCella, memLayer.ML.confReadBool("spostaUdcResettaLdp"), Request.UserHostName); - Postazione.CssClass = "stileAttesa"; - Postazione.warningText = ""; - Postazione.messaggiText = traduci("partAdded"); - currParticolare = ""; - doUpdate(); - } - } - /// - /// Numero cesta inserito - /// - public string numCesta - { - get - { - return txtCesta.Text.Trim(); - } - set - { - txtCesta.Text = value; - } - } - /// - /// evento cambio num cesta/grappolo - /// - /// - /// - protected void txtCesta_TextChanged(object sender, EventArgs e) - { - txtCesta.Text = txtCesta.Text.ToUpper().Trim().PadLeft(4, '0').Substring(0, 4); - doUpdate(); - } - /// - /// genera e stampa AL - /// - /// - /// - protected void lbtGeneraAl_Click(object sender, EventArgs e) - { - /* generazione e stampa AL */ - string AL = ""; - string noteTrim = txtNote.Text.Trim(); - // creazione AL ed associazione UDC / spostamento... - try - { - AL = MagClass.magazzino.creaAssociaAlRxNt(tipoAL.AL_RxNt, Postazione.currCodCella, MagClass.magazzino.CodSoggCurrUser, DateTime.Now.Year, numCesta, noteTrim); - } - catch - { } - // lancio stampa - MagClass.magazzino.stampaAL(AL, Postazione.printer, tipoCartellino.cartAL, Request.UserHostName); - // registro creazione AL - MagClass.magazzino.taSAO.insertQuery(DateTime.Now, MagClass.magazzino.CodSoggCurrUser, Postazione.name, Postazione.IP, AL, "", "creaAL", string.Format("Creato AL RX su linea {0}, note: {1} ", Postazione.currCodLinea, noteTrim)); - Postazione.CssClass = "stileAttesa"; - Postazione.warningText = ""; - Postazione.messaggiText = traduci("cartAlStampato"); - txtCesta.Text = ""; - // resetto particolare... - currParticolare = ""; - doUpdate(); - } - -#endif } } \ No newline at end of file diff --git a/GMW/WebUserControls/mod_PostLiq_DT.ascx.designer.cs b/GMW/WebUserControls/mod_PostLiq_DT.ascx.designer.cs index bb309635..8a4ea1e7 100644 --- a/GMW/WebUserControls/mod_PostLiq_DT.ascx.designer.cs +++ b/GMW/WebUserControls/mod_PostLiq_DT.ascx.designer.cs @@ -148,22 +148,13 @@ namespace GMW.WebUserControls { protected global::System.Web.UI.WebControls.TextBox txtNote; /// - /// lbtGeneraAl control. + /// lbtStampaUDC control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.LinkButton lbtGeneraAl; - - /// - /// lbtGeneraUDC control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton lbtGeneraUDC; + protected global::System.Web.UI.WebControls.LinkButton lbtStampaUDC; /// /// lblDestAL control. diff --git a/GMW/bin/GMW.dll b/GMW/bin/GMW.dll index 71d76438..4a37f2b2 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 74684e3b..5bd4f3ff 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 2e938518..855c40e8 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 febab49f..68f36461 100644 Binary files a/GMW/bin/VersGen.dll and b/GMW/bin/VersGen.dll differ diff --git a/GMW_data/DS_magazzino.Designer.cs b/GMW_data/DS_magazzino.Designer.cs index ef1ff3ed..d8c790c8 100644 --- a/GMW_data/DS_magazzino.Designer.cs +++ b/GMW_data/DS_magazzino.Designer.cs @@ -22890,7 +22890,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[16]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[17]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT *\r\nFROM dbo.ElencoCartellini"; @@ -22987,30 +22987,41 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno this._commandCollection[12].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[13].Connection = this.Connection; - this._commandCollection[13].CommandText = "dbo.stp_UDC_updateIdxPosizione"; + this._commandCollection[13].CommandText = "dbo.stp_UDC_Liq_fullUpdate"; this._commandCollection[13].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SourceAL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TipoAlAnc", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Note", global::System.Data.SqlDbType.VarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataOra", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[13].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[14].Connection = this.Connection; - this._commandCollection[14].CommandText = "dbo.stp_UDC_updateNote"; + this._commandCollection[14].CommandText = "dbo.stp_UDC_updateIdxPosizione"; this._commandCollection[14].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IdxPosizione", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[14].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[15] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[15].Connection = this.Connection; - this._commandCollection[15].CommandText = "dbo.stp_UDC_updateQty"; + this._commandCollection[15].CommandText = "dbo.stp_UDC_updateNote"; this._commandCollection[15].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@note", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[15].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.NVarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[16].Connection = this.Connection; + this._commandCollection[16].CommandText = "dbo.stp_UDC_updateQty"; + this._commandCollection[16].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodSoggetto", global::System.Data.SqlDbType.VarChar, 17, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoDichiaraz", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodEvento", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[16].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Qta", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -23289,8 +23300,55 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_magazzino.ElencoCartelliniDataTable updateIdxPosizione(string UDC, global::System.Nullable IdxPosizione, string CodSoggetto) { + public virtual DS_magazzino.ElencoCartelliniDataTable UdcLiqFullUpdate(string SourceAL, string TipoAlAnc, string UDC, string Note, global::System.Nullable DataOra, string CodSoggetto) { this.Adapter.SelectCommand = this.CommandCollection[13]; + if ((SourceAL == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(SourceAL)); + } + if ((TipoAlAnc == null)) { + this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(TipoAlAnc)); + } + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(UDC)); + } + if ((Note == null)) { + this.Adapter.SelectCommand.Parameters[4].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[4].Value = ((string)(Note)); + } + if ((DataOra.HasValue == true)) { + this.Adapter.SelectCommand.Parameters[5].Value = ((System.DateTime)(DataOra.Value)); + } + else { + this.Adapter.SelectCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((CodSoggetto == null)) { + this.Adapter.SelectCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[6].Value = ((string)(CodSoggetto)); + } + DS_magazzino.ElencoCartelliniDataTable dataTable = new DS_magazzino.ElencoCartelliniDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_magazzino.ElencoCartelliniDataTable updateIdxPosizione(string UDC, global::System.Nullable IdxPosizione, string CodSoggetto) { + this.Adapter.SelectCommand = this.CommandCollection[14]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -23319,7 +23377,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_magazzino.ElencoCartelliniDataTable updateQty(string UDC, string CodSoggetto, string CodTipoDichiaraz, string CodEvento, global::System.Nullable Qta) { - this.Adapter.SelectCommand = this.CommandCollection[15]; + this.Adapter.SelectCommand = this.CommandCollection[16]; if ((UDC == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -24424,7 +24482,7 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int updateNote(string UDC, string note, string CodSoggetto) { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[14]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[15]; if ((UDC == null)) { command.Parameters[1].Value = global::System.DBNull.Value; } @@ -41034,7 +41092,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT AL, UDC, Particolare, Qta, QtaDtx FROM dbo.v_AL2UDC2DTX"; @@ -41045,6 +41103,12 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AL", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "dbo.stp_AUD_ByUDC"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UDC", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -41087,6 +41151,23 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat this.Adapter.Fill(dataTable); return dataTable; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual DS_magazzino.v_A2U2DDataTable getByUDC(string UDC) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((UDC == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(UDC)); + } + DS_magazzino.v_A2U2DDataTable dataTable = new DS_magazzino.v_A2U2DDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } } /// diff --git a/GMW_data/DS_magazzino.xsd b/GMW_data/DS_magazzino.xsd index a3927e58..ef4dce25 100644 --- a/GMW_data/DS_magazzino.xsd +++ b/GMW_data/DS_magazzino.xsd @@ -375,6 +375,22 @@ SELECT UDC, CodCS, CodCliente, RagSociale, Particolare, DescParticolare, Disegno + + + + dbo.stp_UDC_Liq_fullUpdate + + + + + + + + + + + + @@ -3951,6 +3967,17 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat + + + + dbo.stp_AUD_ByUDC + + + + + + + @@ -5055,7 +5082,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5112,7 +5139,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5144,7 +5171,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5166,7 +5193,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5193,7 +5220,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5242,14 +5269,14 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + - + @@ -5285,7 +5312,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5342,7 +5369,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5370,7 +5397,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5394,7 +5421,7 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - + @@ -5588,21 +5615,21 @@ SELECT Trattamento, AL, DataTrattEnd, Durezza, ProveMecc, HasDtx FROM ElencoTrat - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GMW_data/DS_magazzino.xss b/GMW_data/DS_magazzino.xss index 4ccf6dc0..f673f00c 100644 --- a/GMW_data/DS_magazzino.xss +++ b/GMW_data/DS_magazzino.xss @@ -4,9 +4,9 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + @@ -29,7 +29,7 @@ - + @@ -38,10 +38,10 @@ - - - - + + + + @@ -196,7 +196,7 @@ - + -39 @@ -220,7 +220,7 @@ - + -47 diff --git a/GMW_data/MagClass.cs b/GMW_data/MagClass.cs index aa88da12..c4831caa 100644 --- a/GMW_data/MagClass.cs +++ b/GMW_data/MagClass.cs @@ -43,6 +43,7 @@ namespace GMW_data public DS_magazzinoTableAdapters.ElencoAssiemiTableAdapter taEA; public DS_magazzinoTableAdapters.AL2UDCTableAdapter taAL2UDC; public DS_magazzinoTableAdapters.ElencoTrattamentiTableAdapter taET; + public DS_magazzinoTableAdapters.v_A2U2DTableAdapter taA2U2D; /// @@ -81,6 +82,7 @@ namespace GMW_data taEA = new DS_magazzinoTableAdapters.ElencoAssiemiTableAdapter(); taAL2UDC = new DS_magazzinoTableAdapters.AL2UDCTableAdapter(); taET = new DS_magazzinoTableAdapters.ElencoTrattamentiTableAdapter(); + taA2U2D = new DS_magazzinoTableAdapters.v_A2U2DTableAdapter(); } /// /// effettua setup dei connection strings da web.config delal singola applicazione @@ -118,6 +120,7 @@ namespace GMW_data taEA.Connection.ConnectionString = connString; taAL2UDC.Connection.ConnectionString = connString; taET.Connection.ConnectionString = connString; + taA2U2D.Connection.ConnectionString = connString; } #endregion @@ -309,7 +312,7 @@ namespace GMW_data default: break; } - // creo nuovo Assieme Logico ed associo UDC! + // creo nuovo Assieme Logico ed associo UDC! try { taEA.insertNewTT(SourceAL, TipoAL, DataRif, CodSoggetto, note, NumTratt, Durezza, ref AL); @@ -319,7 +322,7 @@ namespace GMW_data // loggo errore logger.lg.scriviLog(string.Format("ERRORE avanzamento AL TT: {0} procedura stp_UAL_insertNewTT, parametri: {1} | {2} | {3} | {4} | {5} | {6} | {0} {7}", Environment.NewLine, SourceAL, TipoAL, DataRif, CodSoggetto, CodEvento, note, exc), tipoLog.EXCEPTION); } - return AL; + return AL; } /// /// Crea un nuovo AL di tipo TL a partire da uno TT e sistema di conseguenza UDC ed eventuali Dtx @@ -353,7 +356,7 @@ namespace GMW_data catch (Exception exc) { // loggo errore - logger.lg.scriviLog(string.Format("ERRORE avanzamento AL TL: {0} procedura stp_UAL_insertNewTL, parametri: {1} | {2} | {3} | {4} | {0} {5}", Environment.NewLine, SourceAL, TipoAL, DataRif, CodSoggetto, exc), tipoLog.EXCEPTION); + logger.lg.scriviLog(string.Format("ERRORE avanzamento AL TL: {0} procedura stp_UAL_insertNewTL, parametri: {1} | {2} | {3} | {4} | {0} {5}", Environment.NewLine, SourceAL, TipoAL, DataRif, CodSoggetto, exc), tipoLog.EXCEPTION); } return AL; } @@ -547,6 +550,27 @@ namespace GMW_data return answ; } /// + /// Sistema il cartellino finito liquidi + /// + /// AL sorgente in postazione (ATL) + /// Tipo cart da legare (TT) + /// Cod UDC da processare + /// Note x cartellino + /// Cod soggetto + /// + public bool liquidiFullUpdate(string SourceAL, string TipoAlAnc, string UDC, string Note, string CodSoggetto) + { + bool answ = false; + try + { + DS_magazzino.ElencoCartelliniRow riga = taCartellini.UdcLiqFullUpdate(SourceAL, TipoAlAnc, UDC, Note, DateTime.Now, CodSoggetto)[0]; + if(riga.UDC==UDC) answ=true; + } + catch + { } + return answ; + } + /// /// verifica se l'UDC indicato sia valido, ovvero esistente /// /// diff --git a/VersGen/GMW.cs b/VersGen/GMW.cs index ac254782..4226e08f 100644 --- a/VersGen/GMW.cs +++ b/VersGen/GMW.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("2.5.627.1538")] -[assembly: AssemblyFileVersion("2.5.627.1538")] +[assembly: AssemblyVersion("2.5.628.1538")] +[assembly: AssemblyFileVersion("2.5.628.1538")] //[assembly: AssemblyCopyright("© Steamware 2007-2014")] //[assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/GMW.tt b/VersGen/GMW.tt index 96d86589..f8c13ec3 100644 --- a/VersGen/GMW.tt +++ b/VersGen/GMW.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("2.5.627.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("2.5.627.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("2.5.628.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("2.5.628.<#= this.RevisionNumber #>")] //[assembly: AssemblyCopyright("© Steamware 2007-<#= DateTime.Now.Year #>")] //[assembly: AssemblyCompany("Steamware")] <#+