diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs index 1c4036b..639a587 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -204,9 +204,6 @@ namespace ETS_WS.WebUserControls /// protected void grView_RowEditing(object sender, GridViewEditEventArgs e) { - // setto selezione=edit - //grView.SelectedIndex = grView.EditIndex; - //WebShipUtils.mng.idxFileEdit = Convert.ToInt32(grView.SelectedDataKey["idxFile"]); // fix btn cambio file showHideSubstFile(true); } @@ -243,22 +240,27 @@ namespace ETS_WS.WebUserControls /// void mod_singleFileUpload1_eh_fileUploaded(object sender, EventArgs e) { - lg.Info("Caricato file {0} per sostituzione", mod_singleFileUpload1.newFileName); + // setto selezione=edit + grView.SelectedIndex = grView.EditIndex; + WebShipUtils.mng.idxFileEdit = Convert.ToInt32(grView.SelectedDataKey["idxFile"]); + string nomeFile = mod_singleFileUpload1.newFileName; + lg.Info("Caricato file {0} per sostituzione", nomeFile); int idxFile = WebShipUtils.mng.idxFileEdit; // effettuo operazioni sostituzione file! docMetaDataSet docsData = WebShipUtils.mng.docMetaFromIdxFile(idxFile); string path = docsData.path; if (path != "") { - string nomeFile = mod_singleFileUpload1.newFileName; // calcolo path path = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path); // elimino file vecchio fileMover.obj.eliminaFile(path, WebShipUtils.mng.nomeFileFromIdxFile(idxFile)); // sposto file fileMover.obj.muoviFile(WebShipUtils.mng.UserTempPath, path, nomeFile); + lg.Info("Spostato file {0} per sostituzione", nomeFile); // aggiorno su DB utils.obj.taDoc.updateFile(WebShipUtils.mng.idxFileEdit, utils.obj.currUserAD, nomeFile, path); + lg.Info("Aggiornato in db nome file {0} per sostituzione", nomeFile); // update gridview! grView.DataBind(); } diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll index 835c90d..0402565 100644 Binary files a/ETS-WS/ETS-WS/bin/ETS-WS.dll and b/ETS-WS/ETS-WS/bin/ETS-WS.dll differ