diff --git a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx index f4f90179..02a1b2d3 100644 --- a/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx +++ b/GMW/GMW/WebUserControls/mod_elencoListePrelievo.ascx @@ -56,7 +56,7 @@ - +
@@ -64,7 +64,8 @@ ToolTip='<%# tooltipTipo(Eval("CodTipoLista")) %>' />
- + +
diff --git a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs index b521e210..9213b357 100644 --- a/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_nuovaListaPrelievo.ascx.cs @@ -119,11 +119,13 @@ namespace GMW.WebUserControls // controllo se qta != 0... decimal qta = 0; string destinatario = ""; + string destinatarioDescr = ""; try { // calcolo il dato del destinatario... GMW_data.DS_Utility.v_selDestinatariListePrelievoRow riga = utils.obj.taDestListePre.getByValue(ddlDestinatario.SelectedValue)[0]; - destinatario = string.Format("[{0}] {1}", riga.value, riga.label); + destinatario = riga.value.Trim(); + destinatarioDescr = riga.label.Trim(); } catch { } @@ -135,7 +137,7 @@ namespace GMW.WebUserControls { } if (qta > 0 && destinatario != "") { - MagClass.magazzino.creaListaPrelievo(memLayer.ML.confReadString("CodCS"), ddlTipoLista.SelectedValue, txtParticolare.Text.Trim(), ddlEsponente.SelectedValue, ddlFigura.SelectedValue, qta, ddlImballo.SelectedValue, destinatario); + MagClass.magazzino.creaListaPrelievo(memLayer.ML.confReadString("CodCS"), ddlTipoLista.SelectedValue, txtParticolare.Text.Trim(), ddlEsponente.SelectedValue, ddlFigura.SelectedValue, qta, ddlImballo.SelectedValue, destinatario, destinatarioDescr); // sollevo evento nuovo valore... if (eh_nuovoValore != null) { diff --git a/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx.cs b/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx.cs index 95fc8af3..c86259ca 100644 --- a/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx.cs +++ b/GMW/GMW/WebUserControls/mod_statoMagLogico.ascx.cs @@ -146,8 +146,17 @@ namespace GMW.WebUserControls base.OnInit(e); _idxGridView = "IdxBlocco"; mod_filtroMag.eh_selValore += new EventHandler(mod_filtroMag_eh_selValore); + } + + protected override void Page_Load(object sender, EventArgs e) + { + base.Page_Load(sender, e); if (!Page.IsPostBack) { + if (_paginaPrecedente == "DettaglioBlocco.aspx") + { + svuotaVariabili(); + } mod_filtroMag.ods = odsFiltroMag; // imposto corretto valore x filtro Mag if (memLayer.ML.isInSessionObject("CodMagLogico_sel")) @@ -271,6 +280,7 @@ namespace GMW.WebUserControls /// protected void grView_SelectedIndexChanged(object sender, EventArgs e) { + svuotaVariabili(); // salvo in session il valore selezionato... SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, true); // salvo anche codMag... @@ -283,7 +293,19 @@ namespace GMW.WebUserControls eh_selValore(this, new EventArgs()); } } - + /// + /// effettua svuotamento delle variabili pre-caricate + /// + private static void svuotaVariabili() + { + // svuoto altre variabili... + memLayer.ML.emptySessionVal("IdxCellaMag"); + memLayer.ML.emptySessionVal("Particolare_sel"); + memLayer.ML.emptySessionVal("DescStato_sel"); + memLayer.ML.emptySessionVal("Esponente_sel"); + memLayer.ML.emptySessionVal("CodMagLogico_sel"); + memLayer.ML.emptySessionVal("CodMag_sel"); + } #endregion } diff --git a/GMW/GMW/bin/GMW.dll b/GMW/GMW/bin/GMW.dll index 7949d051..022ab197 100644 Binary files a/GMW/GMW/bin/GMW.dll and b/GMW/GMW/bin/GMW.dll differ diff --git a/GMW/GMW/bin/GMW_data.dll b/GMW/GMW/bin/GMW_data.dll index 2f6da48c..874c103d 100644 Binary files a/GMW/GMW/bin/GMW_data.dll and b/GMW/GMW/bin/GMW_data.dll differ diff --git a/GMW/GMW/obj/Debug/GMW.dll b/GMW/GMW/obj/Debug/GMW.dll index 53543534..ac20b317 100644 Binary files a/GMW/GMW/obj/Debug/GMW.dll and b/GMW/GMW/obj/Debug/GMW.dll differ diff --git a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache index 9436d503..02a37816 100644 Binary files a/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW/obj/Release/GMW.dll b/GMW/GMW/obj/Release/GMW.dll index 7949d051..022ab197 100644 Binary files a/GMW/GMW/obj/Release/GMW.dll and b/GMW/GMW/obj/Release/GMW.dll differ diff --git a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache index 3e534642..98788eb4 100644 Binary files a/GMW/GMW/obj/Release/ResolveAssemblyReference.cache and b/GMW/GMW/obj/Release/ResolveAssemblyReference.cache differ diff --git a/GMW/GMW_data/DS_magazzino.Designer.cs b/GMW/GMW_data/DS_magazzino.Designer.cs index 72f4413a..70d66d2a 100644 --- a/GMW/GMW_data/DS_magazzino.Designer.cs +++ b/GMW/GMW_data/DS_magazzino.Designer.cs @@ -6093,6 +6093,8 @@ namespace GMW_data { private global::System.Data.DataColumn columnDestinatario; + private global::System.Data.DataColumn columnDestinatarioDescrizione; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public ElencoListePrelievoDataTable() { this.TableName = "ElencoListePrelievo"; @@ -6242,6 +6244,13 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn DestinatarioDescrizioneColumn { + get { + return this.columnDestinatarioDescrizione; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Browsable(false)] public int Count { @@ -6288,7 +6297,8 @@ namespace GMW_data { int CodStatoLista, decimal Prelevato, string Figura, - string Destinatario) { + string Destinatario, + string DestinatarioDescrizione) { ElencoListePrelievoRow rowElencoListePrelievoRow = ((ElencoListePrelievoRow)(this.NewRow())); object[] columnValuesArray = new object[] { CodLista, @@ -6307,7 +6317,8 @@ namespace GMW_data { CodStatoLista, Prelevato, Figura, - Destinatario}; + Destinatario, + DestinatarioDescrizione}; if ((parentTipoListaPrelievoRowByFK_ElencoListePrelievo_TipoListaPrelievo11 != null)) { columnValuesArray[1] = parentTipoListaPrelievoRowByFK_ElencoListePrelievo_TipoListaPrelievo11[0]; } @@ -6353,6 +6364,7 @@ namespace GMW_data { this.columnPrelevato = base.Columns["Prelevato"]; this.columnFigura = base.Columns["Figura"]; this.columnDestinatario = base.Columns["Destinatario"]; + this.columnDestinatarioDescrizione = base.Columns["DestinatarioDescrizione"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6391,6 +6403,8 @@ namespace GMW_data { base.Columns.Add(this.columnFigura); this.columnDestinatario = new global::System.Data.DataColumn("Destinatario", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnDestinatario); + this.columnDestinatarioDescrizione = new global::System.Data.DataColumn("DestinatarioDescrizione", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDestinatarioDescrizione); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnCodLista}, true)); this.columnCodLista.AllowDBNull = false; @@ -6416,6 +6430,8 @@ namespace GMW_data { this.columnPrelevato.ReadOnly = true; this.columnFigura.MaxLength = 4; this.columnDestinatario.MaxLength = 50; + this.columnDestinatarioDescrizione.ReadOnly = true; + this.columnDestinatarioDescrizione.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12628,6 +12644,22 @@ namespace GMW_data { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string DestinatarioDescrizione { + get { + try { + return ((string)(this[this.tableElencoListePrelievo.DestinatarioDescrizioneColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DestinatarioDescrizione\' in table \'ElencoListePrelievo\' is " + + "DBNull.", e); + } + } + set { + this[this.tableElencoListePrelievo.DestinatarioDescrizioneColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public TipoListaPrelievoRow TipoListaPrelievoRow { get { @@ -12728,6 +12760,16 @@ namespace GMW_data { this[this.tableElencoListePrelievo.DestinatarioColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsDestinatarioDescrizioneNull() { + return this.IsNull(this.tableElencoListePrelievo.DestinatarioDescrizioneColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetDestinatarioDescrizioneNull() { + this[this.tableElencoListePrelievo.DestinatarioDescrizioneColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public RigheListePrelievoRow[] GetRigheListePrelievoRows() { if ((this.Table.ChildRelations["FK_RigheListePrelievo_ElencoListePrelievo11"] == null)) { @@ -22864,6 +22906,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co tableMapping.ColumnMappings.Add("Prelevato", "Prelevato"); tableMapping.ColumnMappings.Add("Figura", "Figura"); tableMapping.ColumnMappings.Add("Destinatario", "Destinatario"); + tableMapping.ColumnMappings.Add("DestinatarioDescrizione", "DestinatarioDescrizione"); this._adapter.TableMappings.Add(tableMapping); } @@ -22925,6 +22968,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodImballo", global::System.Data.SqlDbType.NVarChar, 15, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@QtaTot", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 10, 2, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Destinatario", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DestinatarioDescrizione", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[6].Connection = this.Connection; this._commandCollection[6].CommandText = "dbo.stp_LP_exportToAs400"; @@ -23020,7 +23064,23 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] - public virtual DS_magazzino.ElencoListePrelievoDataTable InsertQuery(string Anno, string Mese, string CodTipoLista, string CodCS, string CodCliente, string RagSociale, string CodSoggetto, string Particolare, string DescParticolare, string DisegnoGrezzo, string Esponente, string Figura, string CodImballo, global::System.Nullable QtaTot, string Destinatario) { + public virtual DS_magazzino.ElencoListePrelievoDataTable InsertQuery( + string Anno, + string Mese, + string CodTipoLista, + string CodCS, + string CodCliente, + string RagSociale, + string CodSoggetto, + string Particolare, + string DescParticolare, + string DisegnoGrezzo, + string Esponente, + string Figura, + string CodImballo, + global::System.Nullable QtaTot, + string Destinatario, + string DestinatarioDescrizione) { this.Adapter.SelectCommand = this.CommandCollection[5]; if ((Anno == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; @@ -23112,6 +23172,12 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co else { this.Adapter.SelectCommand.Parameters[15].Value = ((string)(Destinatario)); } + if ((DestinatarioDescrizione == null)) { + this.Adapter.SelectCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[16].Value = ((string)(DestinatarioDescrizione)); + } DS_magazzino.ElencoListePrelievoDataTable dataTable = new DS_magazzino.ElencoListePrelievoDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/GMW/GMW_data/DS_magazzino.xsd b/GMW/GMW_data/DS_magazzino.xsd index 73e6edd7..023f6196 100644 --- a/GMW/GMW_data/DS_magazzino.xsd +++ b/GMW/GMW_data/DS_magazzino.xsd @@ -1848,6 +1848,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + @@ -1916,6 +1917,7 @@ SELECT CodLista, UDC, Qta, Proposto, Prelevato FROM RigheListePrelievo WHERE (Co + @@ -2536,274 +2538,127 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - + - + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2818,18 +2673,18 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - - - - - - - - + + + + + + + + - + @@ -2839,7 +2694,154 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2853,99 +2855,99 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - + - + - + - + - - - + + + - - + + - - + + - + - + - - - - - + + + + + - + - + - + @@ -2956,6 +2958,343 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2972,351 +3311,21 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -3329,131 +3338,131 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - - + + - + - - + + - - - + + + - + - - + + - - + + - + - - - + + + - - - + + + - + - + - + - - + + - - + + - + - + @@ -3473,8 +3482,8 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - - + + @@ -3487,74 +3496,74 @@ SELECT Particolare, CodCS, CodCliente, DisegnoGrezzo, CodFamiglia, DescParticola - - - + + + - + - - + + - - + + - + - + - + - + - + - + diff --git a/GMW/GMW_data/DS_magazzino.xss b/GMW/GMW_data/DS_magazzino.xss index e6f9f61c..7ff48fca 100644 --- a/GMW/GMW_data/DS_magazzino.xss +++ b/GMW/GMW_data/DS_magazzino.xss @@ -4,32 +4,32 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - + + + - - + + - + - + - - + + - - - - - + + + + + @@ -132,11 +132,11 @@ 735 - 981 + 977 - 693 - 981 + 661 + 977 @@ -156,7 +156,7 @@ - + 1007 diff --git a/GMW/GMW_data/GMW_data.csproj b/GMW/GMW_data/GMW_data.csproj index ae74891f..25dd175a 100644 --- a/GMW/GMW_data/GMW_data.csproj +++ b/GMW/GMW_data/GMW_data.csproj @@ -161,6 +161,7 @@ SettingsSingleFileGenerator Settings.Designer.cs + diff --git a/GMW/GMW_data/MagClass.cs b/GMW/GMW_data/MagClass.cs index 6da60ef3..2def0d23 100644 --- a/GMW/GMW_data/MagClass.cs +++ b/GMW/GMW_data/MagClass.cs @@ -654,8 +654,9 @@ namespace GMW_data /// /// /// + /// /// - public string creaListaPrelievo(string CodCS, string TipoListaPrelievo, string Particolare, string Esponente, string Figura, decimal QtaTot, string CodImballo, string Destinatario) + public string creaListaPrelievo(string CodCS, string TipoListaPrelievo, string Particolare, string Esponente, string Figura, decimal QtaTot, string CodImballo, string Destinatario, string DestinatarioDescrizione) { /* * - ordini gli UDC per data dal + vecchio (data fusione? direi di si!) @@ -729,7 +730,7 @@ namespace GMW_data try { // eseguo soltanto la query (meglio con try catch così se non c'è non dà errore...) - DS_magazzino.ElencoListePrelievoDataTable tabellaElencoListe = taElencoListePrelievo.InsertQuery(string.Format("{0:yy}", adesso), string.Format("{0:MM}", adesso), TipoListaPrelievo, memLayer.ML.confReadString("CodCS"), codCliente, RagioneSociale, codSoggetto, Particolare, descParticolare, disegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, Destinatario); + DS_magazzino.ElencoListePrelievoDataTable tabellaElencoListe = taElencoListePrelievo.InsertQuery(string.Format("{0:yy}", adesso), string.Format("{0:MM}", adesso), TipoListaPrelievo, memLayer.ML.confReadString("CodCS"), codCliente, RagioneSociale, codSoggetto, Particolare, descParticolare, disegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, Destinatario, DestinatarioDescrizione); // ricavo prima (e unica) riga dalla select DS_magazzino.ElencoListePrelievoRow rigaElencoListe = tabellaElencoListe[0]; @@ -1034,7 +1035,7 @@ namespace GMW_data DataProxy.obj.taCartellini.stp_rettMovAs400(Particolare, UDC, IdxPosizione.ToString(), Quantita, "UDC_NOQTY"); } } - } + } } // segna come scaricata la lista prelievo taElencoListePrelievo.updateStato(CodSoggetto, CodLista, (int)statoLista.scaricata); diff --git a/GMW/GMW_data/SqlScripts/GMW_00326.sql b/GMW/GMW_data/SqlScripts/GMW_00326.sql new file mode 100644 index 00000000..39b6fa8d --- /dev/null +++ b/GMW/GMW_data/SqlScripts/GMW_00326.sql @@ -0,0 +1,305 @@ +set xact_abort on +go + +begin transaction +go + +alter table ElencoListePrelievo add + DestinatarioDescrizione nvarchar(50) +go + +set ANSI_NULLS on +go + +/*************************************** +* STORED stp_creaListaPrelievo +* +* crea un nuovo record nella ElencoListePrelievo e restituisce il codice ID appena creato +* +* Steamware, S.E.L. 8 (FROM Stintino) +* mod: 2010.07.30 +* +************************************/ +alter PROCEDURE stp_creaListaPrelievo +( + @Anno NVARCHAR(2), + @Mese NVARCHAR(2), + @CodTipoLista NVARCHAR(10), + @CodCS NCHAR(2), + @CodCliente NVARCHAR(6), + @RagSociale NVARCHAR(35), + @CodSoggetto NCHAR(17), + @Particolare NVARCHAR(15), + @DescParticolare NVARCHAR(30), + @DisegnoGrezzo NVARCHAR(30), + @Esponente NVARCHAR(6), + @Figura NVARCHAR(4), + @CodImballo NVARCHAR(15), + @QtaTot DECIMAL(10,2), + @Destinatario NVARCHAR(50), + @DestinatarioDescrizione NVARCHAR(50) +) +AS + +-- Dichiarazioni iniziali +DECLARE @CodLista AS NVARCHAR(12) +DECLARE @numLista AS INT +DECLARE @temp AS INT +DECLARE @ora AS DATETIME + +------------------------------------------------------------------------------------------------------ +-- codice lista di prelievo KAAMM00000 - K = start char, AA = anno, MM = mese, 00000 = progressivo +------------------------------------------------------------------------------------------------------ +-- controllo se ci sia già una lista di prelievo per company / flusso anno +BEGIN TRAN + -- cerco nella tab contatori liste prelievo l'ultimo valido + SET @numLista = ( + SELECT COUNT(*) + FROM ContatoriListePrelievo + WHERE CodCS = @CodCS + AND Anno = @Anno + AND Mese = @Mese + ) + -- controllo se record c'è... + IF(@numLista > 0) + BEGIN + -- se c'è incremento di 1 in tab + UPDATE ContatoriListePrelievo + SET LastIdx = LastIdx + 1 + WHERE CodCS = @CodCS + AND Anno = @Anno + AND Mese = @Mese + + END + ELSE + BEGIN + -- lo creo! + INSERT INTO ContatoriListePrelievo(CodCS, Anno, Mese, LastIdx) + VALUES (@CodCS, @Anno, @Mese, 1) + END + -- aggiorno numero lista prelievo + SET @numLista = ( + SELECT LastIdx + FROM ContatoriListePrelievo + WHERE CodCS = @CodCS + AND Anno = @Anno + AND Mese = @Mese + + ) +COMMIT TRAN +------------------------------------------------------------------------------------------------------ + +BEGIN TRAN + + ------------------------------------------------------------------------------------------------------ + -- Ciclo principale x inserimento nuovo record + ------------------------------------------------------------------------------------------------------ + -- ottengo il nuovo codice lista di prelievo completo + SET @CodLista = 'K' + @CodCS + @Anno + dbo.f_padLeft(CAST(@Mese AS NVARCHAR(2)), 2, '0') + + dbo.f_padLeft(CAST(@numLista AS NVARCHAR(5)), 5, '0') + + INSERT INTO ElencoListePrelievo + (CodLista, CodTipoLista, CodCS, DataCreaz, CodCliente, RagSociale, CodSoggetto, Particolare, DescParticolare, DisegnoGrezzo, Esponente, Figura, CodImballo, QtaTot, CodStatoLista, Destinatario, DestinatarioDescrizione) + VALUES (@CodLista, @CodTipoLista, @CodCS, GETDATE(), @CodCliente, @RagSociale, @CodSoggetto, @Particolare, @DescParticolare, @DisegnoGrezzo, @Esponente,@Figura, @CodImballo, @QtaTot, 0, @Destinatario, @DestinatarioDescrizione) + +COMMIT TRAN + +SELECT * FROM V_elencoListePrelievo WHERE CodLista = @CodLista; + +RETURN +go + +alter VIEW V_elencoListePrelievo +AS +SELECT TOP (100) PERCENT dbo.ElencoListePrelievo.CodLista, dbo.ElencoListePrelievo.CodTipoLista, dbo.ElencoListePrelievo.CodCS, dbo.ElencoListePrelievo.DataCreaz, + dbo.ElencoListePrelievo.CodCliente, dbo.ElencoListePrelievo.RagSociale, dbo.ElencoListePrelievo.CodSoggetto, dbo.ElencoListePrelievo.Particolare, + dbo.ElencoListePrelievo.DescParticolare, dbo.ElencoListePrelievo.DisegnoGrezzo, dbo.ElencoListePrelievo.Esponente, dbo.ElencoListePrelievo.Figura, + dbo.ElencoListePrelievo.CodImballo, dbo.ElencoListePrelievo.QtaTot, dbo.ElencoListePrelievo.CodStatoLista, ISNULL(dbo.v_righePrelevate.TotQta, 0) AS Prelevato, + dbo.ElencoListePrelievo.Destinatario, ISNULL(dbo.ElencoListePrelievo.DestinatarioDescrizione, N'nd') AS DestinatarioDescrizione +FROM dbo.ElencoListePrelievo LEFT OUTER JOIN + dbo.v_righePrelevate ON dbo.ElencoListePrelievo.CodLista = dbo.v_righePrelevate.CodLista +ORDER BY dbo.ElencoListePrelievo.DataCreaz DESC +go + +exec sp_updateextendedproperty 'MS_DiagramPane1', '[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00] +Begin DesignProperties = + Begin PaneConfigurations = + Begin PaneConfiguration = 0 + NumPanes = 4 + Configuration = "(H (1[40] 4[20] 2[20] 3) )" + End + Begin PaneConfiguration = 1 + NumPanes = 3 + Configuration = "(H (1 [50] 4 [25] 3))" + End + Begin PaneConfiguration = 2 + NumPanes = 3 + Configuration = "(H (1 [50] 2 [25] 3))" + End + Begin PaneConfiguration = 3 + NumPanes = 3 + Configuration = "(H (4 [30] 2 [40] 3))" + End + Begin PaneConfiguration = 4 + NumPanes = 2 + Configuration = "(H (1 [56] 3))" + End + Begin PaneConfiguration = 5 + NumPanes = 2 + Configuration = "(H (2 [66] 3))" + End + Begin PaneConfiguration = 6 + NumPanes = 2 + Configuration = "(H (4 [50] 3))" + End + Begin PaneConfiguration = 7 + NumPanes = 1 + Configuration = "(V (3))" + End + Begin PaneConfiguration = 8 + NumPanes = 3 + Configuration = "(H (1[56] 4[18] 2) )" + End + Begin PaneConfiguration = 9 + NumPanes = 2 + Configuration = "(H (1 [75] 4))" + End + Begin PaneConfiguration = 10 + NumPanes = 2 + Configuration = "(H (1[66] 2) )" + End + Begin PaneConfiguration = 11 + NumPanes = 2 + Configuration = "(H (4 [60] 2))" + End + Begin PaneConfiguration = 12 + NumPanes = 1 + Configuration = "(H (1) )" + End + Begin PaneConfiguration = 13 + NumPanes = 1 + Configuration = "(V (4))" + End + Begin PaneConfiguration = 14 + NumPanes = 1 + Configuration = "(V (2))" + End + ActivePaneConfig = 0 + End + Begin DiagramPane = + Begin Origin = + Top = 0 + Left = 0 + End + Begin Tables = + Begin Table = "ElencoListePrelievo" + Begin Extent = + Top = 6 + Left = 38 + Bottom = 350 + Right = 208 + End + DisplayFlags = 280 + TopColumn = 1 + End + Begin Table = "v_righePrelevate" + Begin Extent = + Top = 6 + Left = 454 + Bottom = 118 + Right = 624 + End + DisplayFlags = 280 + TopColumn = 0 + End + End + End + Begin SQLPane = + End + Begin DataPane = + Begin ParameterDefaults = "" + End + Begin ColumnWidths = 19 + Width = 284 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + Width = 1500 + End + End + Begin CriteriaPane = + Begin ColumnWidths = 11 + Column = 1440 + Alias = 900 + Table = 1170 + Output = 720 + Append = 1400 + NewValue = 1170 + SortType = 1350 + SortOrder = 1410 + GroupBy = 1350 + Filter = 1350 + Or = 1350 + Or = 1350 + Or = 1350 + End + End +End +', 'SCHEMA', 'dbo', 'VIEW', 'V_elencoListePrelievo' +go + +/*************************************** +* STORED stp_RLP_sbloccaNonPrelevate +* +* sblocca righe liste di prelievo ATTIVE x UDC non prelevati +* +* Steamware, S.E.L. +* mod: 2010.08.31 +* +****************************************/ +alter PROCEDURE stp_RLP_sbloccaNonPrelevate +( + @CodLista NVARCHAR(12), + @UDC NVARCHAR(50) +) +AS + +-- creo una CTE x le righe liste prelievo ATTIVE (escludo bozze e liste scaricate) - candidate per sblocco che NON fanno aprte della lista di prelievo attuale +WITH cteUdcRigheAttive AS ( + SELECT RLP.CodLista, RLP.UDC, RLP.Prelevato + FROM RigheListePrelievo AS RLP INNER JOIN ElencoListePrelievo AS ELP + ON RLP.CodLista = ELP.CodLista + WHERE (ELP.CodStatoLista BETWEEN 1 AND 3) AND RLP.Prelevato = 1 AND ELP.CodLista <> @CodLista + ) + +-- effettua "sblocco" delle righe liste prelievo che danno UDC prelevati ma che NON risultano +UPDATE cteUdcRigheAttive + SET Prelevato = 0 + WHERE UDC = @UDC + +RETURN +go + +commit +go + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(326, GETDATE()) +GO diff --git a/GMW/GMW_data/bin/Debug/GMW_data.dll b/GMW/GMW_data/bin/Debug/GMW_data.dll index 57d7056e..e93eca10 100644 Binary files a/GMW/GMW_data/bin/Debug/GMW_data.dll and b/GMW/GMW_data/bin/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/bin/Release/GMW_data.dll b/GMW/GMW_data/bin/Release/GMW_data.dll index 2f6da48c..874c103d 100644 Binary files a/GMW/GMW_data/bin/Release/GMW_data.dll and b/GMW/GMW_data/bin/Release/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/GMW_data.dll b/GMW/GMW_data/obj/Debug/GMW_data.dll index 57d7056e..e93eca10 100644 Binary files a/GMW/GMW_data/obj/Debug/GMW_data.dll and b/GMW/GMW_data/obj/Debug/GMW_data.dll differ diff --git a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll index 293a956d..90fe1c1d 100644 Binary files a/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll and b/GMW/GMW_data/obj/Debug/TempPE/DS_magazzino.Designer.cs.dll differ diff --git a/GMW/GMW_data/obj/Release/GMW_data.dll b/GMW/GMW_data/obj/Release/GMW_data.dll index 2f6da48c..874c103d 100644 Binary files a/GMW/GMW_data/obj/Release/GMW_data.dll and b/GMW/GMW_data/obj/Release/GMW_data.dll differ diff --git a/GMW/GMW_installer/GMW_installer.vdproj b/GMW/GMW_installer/GMW_installer.vdproj index 1745e34f..b9de4f0d 100644 --- a/GMW/GMW_installer/GMW_installer.vdproj +++ b/GMW/GMW_installer/GMW_installer.vdproj @@ -349,14 +349,14 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:GMW" - "ProductCode" = "8:{B0F7CD84-CA6C-4739-B558-85065DF74E2F}" - "PackageCode" = "8:{73CDDE34-EA02-4BAE-8B63-A30FC6EA2EB9}" + "ProductCode" = "8:{C0AEED31-261D-4C90-9760-7B1DF9950427}" + "PackageCode" = "8:{F01142FE-83CD-4527-98C6-7B3427A5CF6A}" "UpgradeCode" = "8:{C9BC0732-DC92-4336-BAC9-A05A5D2A97C0}" "RestartWWWService" = "11:TRUE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.325" + "ProductVersion" = "8:1.0.326" "Manufacturer" = "8:SteamWare s.r.l." "ARPHELPTELEPHONE" = "8:+39-035460560" "ARPHELPLINK" = "8:http://www.steamware.net" diff --git a/GMW/GMW_installer/Release/GMW_installer.msi b/GMW/GMW_installer/Release/GMW_installer.msi index d297a092..6ba77192 100644 Binary files a/GMW/GMW_installer/Release/GMW_installer.msi and b/GMW/GMW_installer/Release/GMW_installer.msi differ