diff --git a/.gitignore b/.gitignore
index 36ca503..3cac2cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
/ETS_Data/obj/Release
/ETS_Data/obj/WinLab
/ETS-WS/ETS-WS/ArchivioDocs/*
+/ETS-WS/ETS-WS/ArchivioDocsRed/*
/ETS-WS/ETS-WS/logs/*.log
*.suo
diff --git a/ETS-WS/ETS-WS/ETS-WS.csproj b/ETS-WS/ETS-WS/ETS-WS.csproj
index 12e40e3..3f09cca 100644
--- a/ETS-WS/ETS-WS/ETS-WS.csproj
+++ b/ETS-WS/ETS-WS/ETS-WS.csproj
@@ -158,6 +158,8 @@
+
+
@@ -648,7 +650,6 @@
-
diff --git a/ETS-WS/ETS-WS/Web.config b/ETS-WS/ETS-WS/Web.config
index 4141769..85ee402 100644
--- a/ETS-WS/ETS-WS/Web.config
+++ b/ETS-WS/ETS-WS/Web.config
@@ -4,59 +4,60 @@
http://go.microsoft.com/fwlink/?LinkId=169433
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/WebShipUtils.cs b/ETS-WS/ETS-WS/WebShipUtils.cs
index fa3b856..d8abd37 100644
--- a/ETS-WS/ETS-WS/WebShipUtils.cs
+++ b/ETS-WS/ETS-WS/WebShipUtils.cs
@@ -38,6 +38,7 @@ namespace ETS_WS
{
// calcolo valori data e red
string aammgg = metaDati.dataDoc.ToString("yyMMdd");
+#if false
string comPath = "";
if (!metaDati.isRed)
{
@@ -48,7 +49,10 @@ namespace ETS_WS
comPath = "comunicazioni_red";
}
// calcolo
- answ = string.Format("/{0}/{1}/{2}/{3}/{4}/{5}/", metaDati.commessa, comPath, metaDati.fase, metaDati.InOut, metaDati.fonte, aammgg);
+ answ = string.Format("/{0}/{1}/{2}/{3}/{4}/{5}/", metaDati.commessa, comPath, metaDati.fase, metaDati.InOut, metaDati.fonte, aammgg);
+#endif
+ // calcolo
+ answ = string.Format("/{0}/{1}/{2}/{3}/{4}/", metaDati.commessa, metaDati.fase, metaDati.InOut, metaDati.fonte, aammgg);
}
catch
{ }
@@ -228,6 +232,22 @@ namespace ETS_WS
return answ;
}
///
+ /// statored/pubblico da idx DB
+ ///
+ ///
+ ///
+ public static bool isRedFromIdxFile(int idxFile)
+ {
+ bool answ = false;
+ try
+ {
+ answ = utils.obj.taDoc.getByIdxFile(idxFile)[0].isRed;
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
/// fornisce email dato codice fornitore
///
///
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
index 91e567f..3a1c91e 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs
@@ -171,7 +171,7 @@ namespace ETS_WS.WebUserControls
}
return answ;
}
- ///
+ ///
/// gestione update ods
///
///
@@ -186,6 +186,38 @@ namespace ETS_WS.WebUserControls
e.InputParameters["AnnoCommessa"] = commessa.Substring(commessa.IndexOf("-") + 1);
// tolgo commessa che non c'è su query
e.InputParameters.Remove("Commessa");
+ // controllo se è cambiata la directory red/non red e nel caso sposto file!
+ bool isRed_Original = false;
+ bool isRed = false;
+ try
+ {
+ isRed_Original = WebShipUtils.isRedFromIdxFile(WebShipUtils.mng.idxFileEdit);
+ isRed = Convert.ToBoolean(e.InputParameters["isRed"]);
+ }
+ catch (Exception exc)
+ {
+ lg.Info("Errore recupero stato red old/new", exc);
+ }
+ if (isRed != isRed_Original)
+ {
+ // dati del file originale..
+ docMetaDataSet docsData = WebShipUtils.mng.docMetaFromIdxFile(WebShipUtils.mng.idxFileEdit);
+ // calcolo nuovo path
+ string fromPath = "";
+ string destPath = "";
+ if (isRed)
+ {
+ fromPath = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path);
+ destPath = string.Format("{0}{1}", utils.obj.confReadString("archiveDirRed"), docsData.path);
+ }
+ else
+ {
+ fromPath = string.Format("{0}{1}", utils.obj.confReadString("archiveDirRed"), docsData.path);
+ destPath = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path);
+ }
+ // sposto file a nuova dest...
+ fileMover.obj.muoviFile(fromPath, destPath, WebShipUtils.nomeFileFullFromIdxFile(WebShipUtils.mng.idxFileEdit));
+ }
}
///
/// mostro button x sostituzione file
@@ -279,10 +311,10 @@ namespace ETS_WS.WebUserControls
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_myTempFile.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs
index 33eb6f7..2044232 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_myTempFile.ascx.cs
@@ -204,12 +204,22 @@ namespace ETS_WS.WebUserControls
// verifico path presente
if (pathDest != "")
{
- // aggiunto al path cartella archivio...
- pathDest = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path);
+ // verifico se è comunicazione red = riservata
+ string comPath = "";
+ if (!docsData.isRed)
+ {
+ comPath = utils.obj.confReadString("archiveDir");
+ }
+ else
+ {
+ comPath = utils.obj.confReadString("archiveDirRed");
+ }
+ // aggiunto al path cartella archivio corretta...
+ pathDest = string.Format("{0}{1}", comPath, docsData.path);
// verifico path valido o creo...
fileMover.checkDir(pathDest);
string nomeFile = "";
- string redattore = utils.obj.currUserCognomeNome; // usa utente corrente
+ string redattore = utils.obj.currUserNomeCognome; // usa utente corrente
// sposto i files selezionati secondo i dati in sessione
foreach (GridViewRow riga in grView.Rows)
{
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs
index 804eaa3..f082d98 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_pathAndDocs.ascx.cs
@@ -83,7 +83,19 @@ namespace ETS_WS.WebUserControls
string pathDest = docsData.path;
if (pathDest != "")
{
- pathDest = string.Format("{0}{1}", utils.obj.confReadString("archiveDir"), docsData.path);
+ // verifico se è comunicazione red = riservata
+ string comPath = "";
+ if (!docsData.isRed)
+ {
+ comPath = utils.obj.confReadString("archiveDir");
+ }
+ else
+ {
+ comPath = utils.obj.confReadString("archiveDirRed");
+ }
+ // aggiunto al path cartella archivio corretta...
+ pathDest = string.Format("{0}{1}", comPath, docsData.path);
+ // fix redattore
string redattore = utils.obj.currUserCognomeNome; // usa utente corrente
idxFile = WebShipUtils.archiviaFile(docsData, WebShipUtils.mng.UserTempPath, pathDest, nomeTemplate, redattore);
// recupero dati documento
diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll
index edc2cc8..a3b6163 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 6b155d7..f697ab1 100644
Binary files a/ETS-WS/ETS-WS/bin/ETS_Data.dll and b/ETS-WS/ETS-WS/bin/ETS_Data.dll differ