diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx index 78daa59..8be3516 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx @@ -123,8 +123,8 @@ - + <%--EnableCaching="true" CacheDuration="5" SortParameterName="SortExpression" --%> @@ -138,4 +138,17 @@ + + + + + + + + + + + + + diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs index 782d8d6..b16c083 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -205,5 +205,21 @@ namespace ETS_WS.WebUserControls Response.Redirect("~/MyDocs.aspx"); #endif } + /// + /// gestione update ods + /// + /// + /// + protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e) + { + // completo set di parametri x update... + e.InputParameters["userId"] = utils.obj.currUserAD; + // calcolo dati commessa + string commessa = e.InputParameters["Commessa"].ToString(); + e.InputParameters["NumeroCommessa"] = commessa.Substring(0, commessa.IndexOf("-")); + e.InputParameters["AnnoCommessa"] = commessa.Substring(commessa.IndexOf("-") + 1); + // tolgo commessa che non c'รจ su query + e.InputParameters.Remove("Commessa"); + } } } \ No newline at end of file diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll index 4264239..559095f 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ diff --git a/ETS-WS/ETS-WS/bin/ETS_Data.dll b/ETS-WS/ETS-WS/bin/ETS_Data.dll index 9ecee69..e6d4fdc 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS_Data.dll and b/ETS-WS/ETS-WS/bin/ETS_Data.dll differ diff --git a/ETS_Data/DS_WebScip.Designer.cs b/ETS_Data/DS_WebScip.Designer.cs index 856d539..56027fe 100644 --- a/ETS_Data/DS_WebScip.Designer.cs +++ b/ETS_Data/DS_WebScip.Designer.cs @@ -5016,7 +5016,7 @@ SELECT idxFile, Nome, fullPath, userId, NrProtocollo, Numero, Anno, DataRic, Dat [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[7]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[9]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = @"SELECT idxFile, NomeFile, Nome, fullPath, userId, isRed, NrProtocollo, Numero, Anno, DataRic, DataDoc, Commessa, NumeroCommessa, AnnoCommessa, Fase, @@ -5096,7 +5096,7 @@ FROM tbDocumenti"; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -5104,6 +5104,31 @@ FROM tbDocumenti"; this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Redattore", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@newIdxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.InputOutput, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[7].Connection = this.Connection; + this._commandCollection[7].CommandText = "dbo.stp_tbDocs_updateFile"; + this._commandCollection[7].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[7].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[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@nome", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[7].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fullPath", global::System.Data.SqlDbType.NVarChar, 500, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[8].Connection = this.Connection; + this._commandCollection[8].CommandText = "dbo.stp_tbDocs_update"; + this._commandCollection[8].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[8].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[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxFile", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@userId", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataRic", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataDoc", global::System.Data.SqlDbType.DateTime, 8, global::System.Data.ParameterDirection.Input, 23, 3, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@NumeroCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AnnoCommessa", global::System.Data.SqlDbType.NVarChar, 4, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fase", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Fonte", global::System.Data.SqlDbType.NVarChar, 100, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Oggetto", global::System.Data.SqlDbType.NVarChar, 250, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@InOut", global::System.Data.SqlDbType.NVarChar, 3, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[8].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@isRed", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 1, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -6575,6 +6600,140 @@ FROM tbDocumenti"; } 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 updateFile(global::System.Nullable Original_idxFile, string userId, string nome, string fullPath) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[7]; + if ((Original_idxFile.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxFile.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((userId == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(userId)); + } + if ((nome == null)) { + command.Parameters[3].Value = global::System.DBNull.Value; + } + else { + command.Parameters[3].Value = ((string)(nome)); + } + if ((fullPath == null)) { + command.Parameters[4].Value = global::System.DBNull.Value; + } + else { + command.Parameters[4].Value = ((string)(fullPath)); + } + 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 updateQuery(global::System.Nullable Original_idxFile, string userId, global::System.Nullable DataRic, global::System.Nullable DataDoc, string NumeroCommessa, string AnnoCommessa, string Fase, string Fonte, string Oggetto, string InOut, global::System.Nullable isRed) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[8]; + if ((Original_idxFile.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxFile.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + if ((userId == null)) { + command.Parameters[2].Value = global::System.DBNull.Value; + } + else { + command.Parameters[2].Value = ((string)(userId)); + } + if ((DataRic.HasValue == true)) { + command.Parameters[3].Value = ((System.DateTime)(DataRic.Value)); + } + else { + command.Parameters[3].Value = global::System.DBNull.Value; + } + if ((DataDoc.HasValue == true)) { + command.Parameters[4].Value = ((System.DateTime)(DataDoc.Value)); + } + else { + command.Parameters[4].Value = global::System.DBNull.Value; + } + if ((NumeroCommessa == null)) { + command.Parameters[5].Value = global::System.DBNull.Value; + } + else { + command.Parameters[5].Value = ((string)(NumeroCommessa)); + } + if ((AnnoCommessa == null)) { + command.Parameters[6].Value = global::System.DBNull.Value; + } + else { + command.Parameters[6].Value = ((string)(AnnoCommessa)); + } + if ((Fase == null)) { + command.Parameters[7].Value = global::System.DBNull.Value; + } + else { + command.Parameters[7].Value = ((string)(Fase)); + } + if ((Fonte == null)) { + command.Parameters[8].Value = global::System.DBNull.Value; + } + else { + command.Parameters[8].Value = ((string)(Fonte)); + } + if ((Oggetto == null)) { + command.Parameters[9].Value = global::System.DBNull.Value; + } + else { + command.Parameters[9].Value = ((string)(Oggetto)); + } + if ((InOut == null)) { + command.Parameters[10].Value = global::System.DBNull.Value; + } + else { + command.Parameters[10].Value = ((string)(InOut)); + } + if ((isRed.HasValue == true)) { + command.Parameters[11].Value = ((bool)(isRed.Value)); + } + else { + command.Parameters[11].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; + } } /// diff --git a/ETS_Data/DS_WebScip.xsd b/ETS_Data/DS_WebScip.xsd index 27d6b67..81b63fc 100644 --- a/ETS_Data/DS_WebScip.xsd +++ b/ETS_Data/DS_WebScip.xsd @@ -447,7 +447,7 @@ SELECT idxFile, NomeFile, Nome, fullPath, userId, isRed, NrProtocollo, Numero, A - + @@ -459,6 +459,41 @@ SELECT idxFile, NomeFile, Nome, fullPath, userId, isRed, NrProtocollo, Numero, A + + + + dbo.stp_tbDocs_updateFile + + + + + + + + + + + + + + dbo.stp_tbDocs_update + + + + + + + + + + + + + + + + + diff --git a/ETS_Data/DS_WebScip.xss b/ETS_Data/DS_WebScip.xss index 75c65ad..23ec3d8 100644 --- a/ETS_Data/DS_WebScip.xss +++ b/ETS_Data/DS_WebScip.xss @@ -7,7 +7,7 @@ - +