diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx index a71c12b..052d211 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx @@ -9,7 +9,20 @@ <% } %> - +
+ +
+ +
+
+
+ + + +
+
+
+
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs index 0c6ae5f..91e567f 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -28,7 +28,7 @@ namespace ETS_WS.WebUserControls { if (!Page.IsPostBack) { - showHideSubstFile(false); + showHideEditRecord(false); } mod_singleFileUpload1.tempArea = WebShipUtils.mng.UserTempPath; mod_singleFileUpload1.eh_fileUploaded += new EventHandler(mod_singleFileUpload1_eh_fileUploaded); @@ -171,17 +171,7 @@ namespace ETS_WS.WebUserControls } return answ; } - /// - /// fake selection: rimanda in realtà alla pagina di insert/upload, salvando in area temp il file selezionato (con il nome originale) - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // idxFile selezionato! - int idxFile = Convert.ToInt32(grView.SelectedDataKey["idxFile"]); - } - /// + /// /// gestione update ods /// /// @@ -204,8 +194,12 @@ namespace ETS_WS.WebUserControls /// protected void grView_RowEditing(object sender, GridViewEditEventArgs e) { + // fix riga in edit... + grView.SelectedIndex = e.NewEditIndex; + pnlRTUpdate.CssClass = "rltUpdate"; + WebShipUtils.mng.idxFileEdit = Convert.ToInt32(grView.SelectedDataKey["idxFile"]); // fix btn cambio file - showHideSubstFile(true); + showHideEditRecord(true); } /// /// nascondo button sostituzione file @@ -214,7 +208,9 @@ namespace ETS_WS.WebUserControls /// protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e) { - showHideSubstFile(false); + grView.SelectedIndex = -1; + pnlRTUpdate.CssClass = ""; + showHideEditRecord(false); } /// /// nascondo button sostituzione file @@ -223,15 +219,31 @@ namespace ETS_WS.WebUserControls /// protected void grView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { - showHideSubstFile(false); + grView.SelectedIndex = -1; + pnlRTUpdate.CssClass = ""; + showHideEditRecord(false); } /// /// mostra/nasconde controllo sostituzione file /// /// - private void showHideSubstFile(bool p) + private void showHideEditRecord(bool p) { mod_singleFileUpload1.btnEnabled = p; + cblTags.Visible = p; + if (p) + { + docMetaDataSet currData = WebShipUtils.mng.docMetaFromIdxFile(WebShipUtils.mng.idxFileEdit); + // calcolo i tags "da accendere"... + if (currData.tags.Count > 0) + { + cblTags.DataBind(); + foreach (string tag in currData.tags) + { + cblTags.Items.FindByValue(tag).Selected = true; + } + } + } } /// /// file caricato! effettuo sostituzione! @@ -248,7 +260,29 @@ namespace ETS_WS.WebUserControls // update gridview! grView.DataBind(); } - - + /// + /// update dei tags selezionati + /// + /// + /// + protected void cblTags_SelectedIndexChanged(object sender, EventArgs e) + { + // elimino i tags "vecchi" + utils.obj.taTags2Doc.deleteByIdxFile(WebShipUtils.mng.idxFileEdit); + // salvo nuovi tags associati + foreach (ListItem tag in cblTags.Items) + { + if (tag.Selected) + { + try + { + utils.obj.taTags2Doc.Insert(WebShipUtils.mng.idxFileEdit, Convert.ToInt32(tag.Value)); + } + catch + { } + } + } + } + } } \ No newline at end of file diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs index 9e3cd8f..b6e700f 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.designer.cs @@ -12,6 +12,15 @@ namespace ETS_WS.WebUserControls { public partial class mod_archivioDocumenti { + /// + /// pnlRTUpdate control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlRTUpdate; + /// /// mod_singleFileUpload1 control. /// @@ -21,6 +30,24 @@ namespace ETS_WS.WebUserControls { /// protected global::ETS_WS.WebUserControls.mod_singleFileUpload mod_singleFileUpload1; + /// + /// cblTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBoxList cblTags; + + /// + /// odsTags control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTags; + /// /// grView control. /// diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDati.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDati.ascx index 9fc4d18..19a6e8a 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDati.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDati.ascx @@ -5,11 +5,7 @@ <%@ Register Src="mod_inputDati.ascx" TagName="mod_inputDati" TagPrefix="uc2" %> <%--container principale--%>
- <%--testata protocollo--%> -
- <%----%> -
- <%--input dati--%> + <%--input dati--%>
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs index a44377b..1172216 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_inputDati.ascx.cs @@ -166,7 +166,7 @@ namespace ETS_WS.WebUserControls answ.oggetto = utils.cleanPathName(txtOggetto.Text); answ.dataDoc = Convert.ToDateTime(txtDataDoc.Text); answ.dataRic = Convert.ToDateTime(txtDataRic.Text); - answ.isRed = chkIsRed.Checked; + answ.isRed = chkIsRed.Checked; answ.path = WebShipUtils.mng.path(answ); // calcolo i tags... List tags = new List(); @@ -254,15 +254,5 @@ namespace ETS_WS.WebUserControls { updateVisual(); } -#if false - /// - /// ricarica da sessione dati x edit - /// - public void loadEditData() - { - // ricarico dati di editing - metaDatiDoc = WebShipUtils.mng.currMetaData; - } -#endif } } \ No newline at end of file diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs index 9e05be1..804eaa3 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs @@ -108,7 +108,6 @@ namespace ETS_WS.WebUserControls string body = string.Format("Commessa: {1}{0}Fase: {2}{0}Oggetto: {3}{0}prot. num: {4}", Environment.NewLine, docsData.commessa, docsData.fase, docsData.oggetto, protocollo); string newFileName = WebShipUtils.CreaEml(mittente, destinatario, subject, body, null, Server.MapPath(pathDest)); // sostituisco file appena creato con quello nuovo - //fileMover.obj.eliminaFile(fullPath); fileMover.obj.muoviFile(pathDest, pathDest, newFileName, WebShipUtils.nomeFileFullFromIdxFile(idxFile), true); } } diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll index 6f431e7..236569e 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 b8bf817..912b401 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-WS/ETS-WS/bin/css/BuildBlocks.css b/ETS-WS/ETS-WS/bin/css/BuildBlocks.css index fd5aeb8..c197edc 100644 --- a/ETS-WS/ETS-WS/bin/css/BuildBlocks.css +++ b/ETS-WS/ETS-WS/bin/css/BuildBlocks.css @@ -130,6 +130,13 @@ } /* end buttons! */ +/* update controls */ +.rltUpdate +{ + background-color: #FFFF33; +} +/* end */ + /* zona menù top */ .menuNav { diff --git a/ETS-WS/ETS-WS/css/BuildBlocks.css b/ETS-WS/ETS-WS/css/BuildBlocks.css index fd5aeb8..c197edc 100644 --- a/ETS-WS/ETS-WS/css/BuildBlocks.css +++ b/ETS-WS/ETS-WS/css/BuildBlocks.css @@ -130,6 +130,13 @@ } /* end buttons! */ +/* update controls */ +.rltUpdate +{ + background-color: #FFFF33; +} +/* end */ + /* zona menù top */ .menuNav { diff --git a/ETS_Data/DS_WebScip.Designer.cs b/ETS_Data/DS_WebScip.Designer.cs index c1ab676..cdf9a32 100644 --- a/ETS_Data/DS_WebScip.Designer.cs +++ b/ETS_Data/DS_WebScip.Designer.cs @@ -7793,17 +7793,23 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = [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 idxFile, idxTag FROM dbo.Tags2Doc"; 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_T2D_getByIdxFile"; + this._commandCollection[1].CommandText = "dbo.stp_T2D_deleteByIdxFile"; 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("@idxFile", 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_T2D_getByIdxFile"; + 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("@idxFile", 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()] @@ -7835,7 +7841,7 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual DS_WebScip.Tags2DocDataTable getByIdxFile(global::System.Nullable idxFile) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((idxFile.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(idxFile.Value)); } @@ -7954,6 +7960,34 @@ SELECT idxFase, codFase, descrizione, folderName FROM AnagFasi WHERE (idxFase = public virtual int Update(int Original_idxFile, int Original_idxTag) { return this.Update(Original_idxFile, Original_idxTag, Original_idxFile, Original_idxTag); } + + [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 deleteByIdxFile(global::System.Nullable idxFile) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((idxFile.HasValue == true)) { + command.Parameters[1].Value = ((int)(idxFile.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; + } } /// diff --git a/ETS_Data/DS_WebScip.xsd b/ETS_Data/DS_WebScip.xsd index 9135d49..e7416aa 100644 --- a/ETS_Data/DS_WebScip.xsd +++ b/ETS_Data/DS_WebScip.xsd @@ -706,6 +706,17 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i + + + + dbo.stp_T2D_deleteByIdxFile + + + + + + + @@ -727,7 +738,7 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - + @@ -799,7 +810,7 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - + @@ -967,7 +978,7 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - + @@ -995,7 +1006,7 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - + @@ -1009,7 +1020,7 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - + @@ -1043,8 +1054,8 @@ SELECT idxFile, idxTag FROM Tags2Doc WHERE (idxFile = @idxFile) AND (idxTag = @i - - + + \ No newline at end of file diff --git a/ETS_Data/DS_WebScip.xss b/ETS_Data/DS_WebScip.xss index 23ec3d8..58cfb7f 100644 --- a/ETS_Data/DS_WebScip.xss +++ b/ETS_Data/DS_WebScip.xss @@ -10,7 +10,7 @@ - +