diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs index c3c8263..a9a7fc7 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs +++ b/Projects/WebGIM/GIM_data/DS_applicazione.Designer.cs @@ -16284,7 +16284,7 @@ ORDER BY numIntMtz DESC"; [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 idxIntPro, idxMacchina, codMacchina, nomeMacchina, inizio, codFrequenz" + @@ -16293,17 +16293,23 @@ ORDER BY numIntMtz DESC"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_MtzProg_insert"; + this._commandCollection[1].CommandText = "dbo.stp_MtzProg_delete"; 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("@idxMacchina", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codFrequenza", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cadenza", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descrizione", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPriorita", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isFermo", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxTipo", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxIntPro", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 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_MtzProg_insert"; + 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("@idxMacchina", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@inizio", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@codFrequenza", global::System.Data.SqlDbType.NChar, 2, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cadenza", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@descrizione", global::System.Data.SqlDbType.NVarChar, 2500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxPriorita", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isFermo", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idxTipo", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -16333,8 +16339,36 @@ ORDER BY numIntMtz DESC"; [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")] - public virtual int insertQuery(global::System.Nullable idxMacchina, global::System.Nullable inizio, string codFrequenza, global::System.Nullable cadenza, string descrizione, global::System.Nullable idxPriorita, global::System.Nullable isFermo, global::System.Nullable idxTipo) { + public virtual int deleteQuery(global::System.Nullable Original_idxIntPro) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_idxIntPro.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxIntPro.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + + [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")] + public virtual int insertQuery(global::System.Nullable idxMacchina, global::System.Nullable inizio, string codFrequenza, global::System.Nullable cadenza, string descrizione, global::System.Nullable idxPriorita, global::System.Nullable isFermo, global::System.Nullable idxTipo) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[2]; if ((idxMacchina.HasValue == true)) { command.Parameters[1].Value = ((int)(idxMacchina.Value)); } diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xsd b/Projects/WebGIM/GIM_data/DS_applicazione.xsd index 58d56d3..ae74122 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xsd +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xsd @@ -939,6 +939,17 @@ FROM v_mtzProgExp + + + + dbo.stp_MtzProg_delete + + + + + + + @@ -2191,20 +2202,20 @@ WHERE (idxCausale = @Original_idxCausale) - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Projects/WebGIM/GIM_data/DS_applicazione.xss b/Projects/WebGIM/GIM_data/DS_applicazione.xss index 538112c..de0307b 100644 --- a/Projects/WebGIM/GIM_data/DS_applicazione.xss +++ b/Projects/WebGIM/GIM_data/DS_applicazione.xss @@ -4,29 +4,29 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - + - - + + - - + + - - - - - - - - + + + + + + + + @@ -141,7 +141,7 @@ - + 1017 @@ -157,7 +157,7 @@ - + 1362 @@ -173,7 +173,7 @@ - + 922 @@ -185,7 +185,7 @@ - + 1328 @@ -197,7 +197,7 @@ - + 754 diff --git a/Projects/WebGIM/GIM_data/bin/GIM_data.dll b/Projects/WebGIM/GIM_data/bin/GIM_data.dll index dff85a0..ae368ad 100644 Binary files a/Projects/WebGIM/GIM_data/bin/GIM_data.dll and b/Projects/WebGIM/GIM_data/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_data/bin/SteamWare.dll b/Projects/WebGIM/GIM_data/bin/SteamWare.dll index f654dd8..a03032c 100644 Binary files a/Projects/WebGIM/GIM_data/bin/SteamWare.dll and b/Projects/WebGIM/GIM_data/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/GIM_site.csproj b/Projects/WebGIM/GIM_site/GIM_site.csproj index b400d6b..12b933a 100644 --- a/Projects/WebGIM/GIM_site/GIM_site.csproj +++ b/Projects/WebGIM/GIM_site/GIM_site.csproj @@ -176,6 +176,7 @@ + diff --git a/Projects/WebGIM/GIM_site/Web.config b/Projects/WebGIM/GIM_site/Web.config index ff16da0..7c27340 100644 --- a/Projects/WebGIM/GIM_site/Web.config +++ b/Projects/WebGIM/GIM_site/Web.config @@ -103,7 +103,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/WebUserControls/mod_elencoMtzProg.ascx b/Projects/WebGIM/GIM_site/WebUserControls/mod_elencoMtzProg.ascx index 6705fc2..5c44638 100644 --- a/Projects/WebGIM/GIM_site/WebUserControls/mod_elencoMtzProg.ascx +++ b/Projects/WebGIM/GIM_site/WebUserControls/mod_elencoMtzProg.ascx @@ -102,7 +102,7 @@ + PageSize="20" OnRowUpdating="grView_RowUpdating" onpageindexchanged="grView_PageIndexChanged" onrowdeleted="grView_RowDeleted"> @@ -172,10 +172,10 @@ - + DeleteMethod="deleteQuery" InsertMethod="Insert" UpdateMethod="Update"> protected void btnShowNew_Click(object sender, EventArgs e) { - if (btnShowNew.Text == traduci("btnHideNew")) + modoInsertMtzPrg = !modoInsertMtzPrg; + if (modoInsertMtzPrg) { - btnShowNew.Text = traduci("btnShowNew"); + btnShowNew.Text = traduci("btnHideNew"); } else { - btnShowNew.Text = traduci("btnHideNew"); + btnShowNew.Text = traduci("btnShowNew"); } // chiamo evento if (eh_newReq != null) @@ -220,6 +221,7 @@ public partial class mod_elencoMtzProg : ApplicationUserControl { hlExportExcel.Text = traduci("hlExportExcel"); hlExportExcel.NavigateUrl = "~/ExcelExportMtzPrev.aspx"; + modoInsertMtzPrg = false; } base.OnInit(e); _idxGridView = "idxIntPro"; @@ -229,7 +231,20 @@ public partial class mod_elencoMtzProg : ApplicationUserControl btnShowNew.Enabled = isWritable(); btnMassEdit.Enabled = isWritable(); } - + /// + /// modalità insert mtz prog + /// + public bool modoInsertMtzPrg + { + get + { + return memLayer.ML.BoolSessionObj("modoInserMtzPrg"); + } + set + { + memLayer.ML.setSessionVal("modoInserMtzPrg", value); + } + } void mod_filtroMacchina_eh_selValore(object sender, EventArgs e) { // chiamo procedura ricostruzione ods con filtri... @@ -458,5 +473,14 @@ public partial class mod_elencoMtzProg : ApplicationUserControl { doUpdate(); } + /// + /// update post delete + /// + /// + /// + protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) + { + doUpdate(); + } } diff --git a/Projects/WebGIM/GIM_site/bin/GIM_data.dll b/Projects/WebGIM/GIM_site/bin/GIM_data.dll index dff85a0..ae368ad 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_data.dll and b/Projects/WebGIM/GIM_site/bin/GIM_data.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/GIM_site.dll b/Projects/WebGIM/GIM_site/bin/GIM_site.dll index 3f8efe6..faa214e 100644 Binary files a/Projects/WebGIM/GIM_site/bin/GIM_site.dll and b/Projects/WebGIM/GIM_site/bin/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/bin/SteamWare.dll b/Projects/WebGIM/GIM_site/bin/SteamWare.dll index f654dd8..a03032c 100644 Binary files a/Projects/WebGIM/GIM_site/bin/SteamWare.dll and b/Projects/WebGIM/GIM_site/bin/SteamWare.dll differ diff --git a/Projects/WebGIM/GIM_site/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/Projects/WebGIM/GIM_site/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 850e760..acf4393 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache and b/Projects/WebGIM/GIM_site/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Projects/WebGIM/GIM_site/obj/Release/GIM_site.csprojResolveAssemblyReference.cache b/Projects/WebGIM/GIM_site/obj/Release/GIM_site.csprojResolveAssemblyReference.cache index 99cc935..51efbb1 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Release/GIM_site.csprojResolveAssemblyReference.cache and b/Projects/WebGIM/GIM_site/obj/Release/GIM_site.csprojResolveAssemblyReference.cache differ diff --git a/Projects/WebGIM/GIM_site/obj/Release/GIM_site.dll b/Projects/WebGIM/GIM_site/obj/Release/GIM_site.dll index 111ecf6..9f98e99 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Release/GIM_site.dll and b/Projects/WebGIM/GIM_site/obj/Release/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/original/Web.config b/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/original/Web.config index 936596f..ed799ea 100644 --- a/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/original/Web.config +++ b/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/original/Web.config @@ -103,7 +103,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/transformed/Web.config b/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/transformed/Web.config index 7c9dffe..01ecbf0 100644 --- a/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/transformed/Web.config +++ b/Projects/WebGIM/GIM_site/obj/Somaschini/CSAutoParameterize/transformed/Web.config @@ -103,7 +103,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/DesignTimeResolveAssemblyReferencesInput.cache b/Projects/WebGIM/GIM_site/obj/Somaschini/DesignTimeResolveAssemblyReferencesInput.cache index df3bd2c..5bb15c7 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Somaschini/DesignTimeResolveAssemblyReferencesInput.cache and b/Projects/WebGIM/GIM_site/obj/Somaschini/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.csprojResolveAssemblyReference.cache b/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.csprojResolveAssemblyReference.cache index ed40750..9c3bc35 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.csprojResolveAssemblyReference.cache and b/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.csprojResolveAssemblyReference.cache differ diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.dll b/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.dll index 3f8efe6..faa214e 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.dll and b/Projects/WebGIM/GIM_site/obj/Somaschini/GIM_site.dll differ diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/Package/WebGIM.zip b/Projects/WebGIM/GIM_site/obj/Somaschini/Package/WebGIM.zip index f7abc5e..7dc3187 100644 Binary files a/Projects/WebGIM/GIM_site/obj/Somaschini/Package/WebGIM.zip and b/Projects/WebGIM/GIM_site/obj/Somaschini/Package/WebGIM.zip differ diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/original/Web.config b/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/original/Web.config index c985a39..fdaef85 100644 --- a/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/original/Web.config +++ b/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/original/Web.config @@ -103,7 +103,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/transformed/Web.config b/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/transformed/Web.config index 936596f..ed799ea 100644 --- a/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/transformed/Web.config +++ b/Projects/WebGIM/GIM_site/obj/Somaschini/TransformWebConfig/transformed/Web.config @@ -103,7 +103,7 @@ - + diff --git a/Projects/WebGIM/GIM_site/sql/Applicazione/GIM_0211.sql b/Projects/WebGIM/GIM_site/sql/Applicazione/GIM_0211.sql new file mode 100644 index 0000000..472e67c --- /dev/null +++ b/Projects/WebGIM/GIM_site/sql/Applicazione/GIM_0211.sql @@ -0,0 +1,38 @@ +set xact_abort on; +go + +begin transaction; +go + +set ANSI_NULLS on; +go + +/********************************************************************************* +* STORED stp_MtzProg_delete +* +* delete riga MtzProg +* +**********************************************************************************/ +create PROCEDURE stp_MtzProg_delete +( + @Original_idxIntPro INT +) +AS + +DELETE +FROM MtzProgrammata +WHERE idxIntPro = @Original_idxIntPro + +RETURN +go + +commit; +go + + + + + +-- registro versione... +INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(211, GETDATE()) +GO \ No newline at end of file