+
diff --git a/ETS-WS/ETS-WS/GestioneDocumenti.aspx.cs b/ETS-WS/ETS-WS/GestioneDocumenti.aspx.cs
index 0b55605..e9964e3 100644
--- a/ETS-WS/ETS-WS/GestioneDocumenti.aspx.cs
+++ b/ETS-WS/ETS-WS/GestioneDocumenti.aspx.cs
@@ -11,7 +11,9 @@ namespace ETS_WS
{
protected void Page_Load(object sender, EventArgs e)
{
-
+ if (!Page.IsPostBack)
+ {
+ }
}
}
}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/GestioneDocumenti.aspx.designer.cs b/ETS-WS/ETS-WS/GestioneDocumenti.aspx.designer.cs
index dc755f5..f69716c 100644
--- a/ETS-WS/ETS-WS/GestioneDocumenti.aspx.designer.cs
+++ b/ETS-WS/ETS-WS/GestioneDocumenti.aspx.designer.cs
@@ -13,13 +13,13 @@ namespace ETS_WS {
public partial class GestioneDocumenti {
///
- /// mod_gestioneDati1 control.
+ /// mod_fileUpload1 control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::ETS_WS.WebUserControls.mod_gestioneDati mod_gestioneDati1;
+ protected global::ETS_WS.WebUserControls.mod_fileUpload mod_fileUpload1;
///
/// mod_gestioneDocumenti1 control.
@@ -29,5 +29,14 @@ namespace ETS_WS {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::ETS_WS.WebUserControls.mod_gestioneDocumenti mod_gestioneDocumenti1;
+
+ ///
+ /// mod_gestioneDati1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::ETS_WS.WebUserControls.mod_gestioneDati mod_gestioneDati1;
}
}
diff --git a/ETS-WS/ETS-WS/Web.config b/ETS-WS/ETS-WS/Web.config
index f4e7733..79ea9d3 100644
--- a/ETS-WS/ETS-WS/Web.config
+++ b/ETS-WS/ETS-WS/Web.config
@@ -28,8 +28,9 @@
-
+
+
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx
new file mode 100644
index 0000000..49c9fff
--- /dev/null
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx
@@ -0,0 +1,18 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_fileUpload.ascx.cs"
+ Inherits="ETS_WS.WebUserControls.mod_fileUpload" %>
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<% if (false)
+ { %>
+
+
+
+
+
+<% } %>
+
+
+ Upload File
+
+
+
Caricamento files in area personale per catalogazione
+
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.cs
new file mode 100644
index 0000000..1bc2df9
--- /dev/null
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+using NLog;
+using ETS_Data;
+
+namespace ETS_WS.WebUserControls
+{
+ public partial class mod_fileUpload : System.Web.UI.UserControl
+ {
+ public event EventHandler eh_fileCaricato;
+ protected Logger lg;
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ lg = LogManager.GetCurrentClassLogger();
+ }
+ ///
+ /// completato upload file
+ ///
+ ///
+ ///
+ protected void fileUpload_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
+ {
+ // salvo!
+ string path = "";
+ // prima il path
+ try
+ {
+ path = string.Format("{0}/{1}", utils.obj.confReadString("tempUplDir"), utils.obj.currUser_FS);
+ utils.obj.checkDir(path);
+ }
+ catch(Exception exc)
+ {
+ lg.Info("errore check directory: {0}", exc);
+ }
+ // opra il file...
+ try
+ {
+ if(path!="")
+ {
+ path = string.Format("{0}/{1}",path, e.FileName);
+ fileUpload.SaveAs(MapPath(path));
+ lg.Info("salvato file: {0}, {1} Kb", path, e.FileSize / 1024);
+ if (eh_fileCaricato != null)
+ {
+ eh_fileCaricato(this, new EventArgs());
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ lg.Info("errore salvataggio: {0}", exc);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.designer.cs b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.designer.cs
new file mode 100644
index 0000000..365186c
--- /dev/null
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_fileUpload.ascx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ETS_WS.WebUserControls {
+
+
+ public partial class mod_fileUpload {
+
+ ///
+ /// fileUpload control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.AjaxFileUpload fileUpload;
+ }
+}
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx
index d07cfbc..4dffb06 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx
@@ -1,23 +1,16 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestioneDocumenti.ascx.cs"
Inherits="ETS_WS.WebUserControls.mod_gestioneDocumenti" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
-<%@ Register Src="mod_fileInOut.ascx" TagName="mod_fileInOut" TagPrefix="uc1" %>
-
-
-
- Gestione Documenti
-
+
+
- tutti i documenti
-
-
-
- My uploads
-
-
- i miei docs temporanei
-
+ tutti i documenti
-
+
+
+ i miei docs temporanei CARICATI da sistemare
+
+
+
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs
index 61d77df..04892cc 100644
--- a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs
+++ b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs
@@ -38,14 +38,5 @@ namespace ETS_WS.WebUserControls {
/// To modify move field declaration from designer file to code-behind file.
///
protected global::AjaxControlToolkit.TabPanel tblMyDocs;
-
- ///
- /// mod_fileInOut1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ETS_WS.WebUserControls.mod_fileInOut mod_fileInOut1;
}
}
diff --git a/ETS-WS/ETS-WS/bin/ETS-WS.dll b/ETS-WS/ETS-WS/bin/ETS-WS.dll
index cd068dc..3c20f95 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 3df2602..27930fa 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/obj/Release/ETS-WS.dll b/ETS-WS/ETS-WS/obj/Release/ETS-WS.dll
index cd068dc..68ed9a6 100644
Binary files a/ETS-WS/ETS-WS/obj/Release/ETS-WS.dll and b/ETS-WS/ETS-WS/obj/Release/ETS-WS.dll differ
diff --git a/ETS-WS/ETS-WS/test.aspx b/ETS-WS/ETS-WS/test.aspx
new file mode 100644
index 0000000..a49acef
--- /dev/null
+++ b/ETS-WS/ETS-WS/test.aspx
@@ -0,0 +1,22 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="ETS_WS.test" %>
+
+
+
+<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
+<%@ Register src="WebUserControls/mod_fileUpload.ascx" tagname="mod_fileUpload" tagprefix="uc1" %>
+
+
+
+
+
+
+
+
diff --git a/ETS-WS/ETS-WS/test.aspx.cs b/ETS-WS/ETS-WS/test.aspx.cs
new file mode 100644
index 0000000..e1aa527
--- /dev/null
+++ b/ETS-WS/ETS-WS/test.aspx.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.IO;
+using NLog;
+
+namespace ETS_WS
+{
+ public partial class test : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/test.aspx.designer.cs b/ETS-WS/ETS-WS/test.aspx.designer.cs
new file mode 100644
index 0000000..0229603
--- /dev/null
+++ b/ETS-WS/ETS-WS/test.aspx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ETS_WS {
+
+
+ public partial class test {
+
+ ///
+ /// form1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// ScriptManager1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.ScriptManager ScriptManager1;
+
+ ///
+ /// mod_fileUpload1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::ETS_WS.WebUserControls.mod_fileUpload mod_fileUpload1;
+ }
+}
diff --git a/ETS-WS/ETS-WS/testMast.aspx b/ETS-WS/ETS-WS/testMast.aspx
new file mode 100644
index 0000000..bc1893d
--- /dev/null
+++ b/ETS-WS/ETS-WS/testMast.aspx
@@ -0,0 +1,5 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimpleFull.Master" AutoEventWireup="true" CodeBehind="testMast.aspx.cs" Inherits="ETS_WS.testMast" %>
+<%@ Register src="WebUserControls/mod_fileUpload.ascx" tagname="mod_fileUpload" tagprefix="uc1" %>
+
+
+
diff --git a/ETS-WS/ETS-WS/testMast.aspx.cs b/ETS-WS/ETS-WS/testMast.aspx.cs
new file mode 100644
index 0000000..4f3e737
--- /dev/null
+++ b/ETS-WS/ETS-WS/testMast.aspx.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace ETS_WS
+{
+ public partial class testMast : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/ETS-WS/ETS-WS/testMast.aspx.designer.cs b/ETS-WS/ETS-WS/testMast.aspx.designer.cs
new file mode 100644
index 0000000..6a0257e
--- /dev/null
+++ b/ETS-WS/ETS-WS/testMast.aspx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ETS_WS {
+
+
+ public partial class testMast {
+
+ ///
+ /// mod_fileUpload1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::ETS_WS.WebUserControls.mod_fileUpload mod_fileUpload1;
+ }
+}
diff --git a/ETS_Data/obj/Release/TempPE/DS_applicazione.Designer.cs.dll b/ETS_Data/obj/Release/TempPE/DS_applicazione.Designer.cs.dll
index 4de8154..a2329c1 100644
Binary files a/ETS_Data/obj/Release/TempPE/DS_applicazione.Designer.cs.dll and b/ETS_Data/obj/Release/TempPE/DS_applicazione.Designer.cs.dll differ
diff --git a/ETS_Data/obj/Release/TempPE/DS_utils.Designer.cs.dll b/ETS_Data/obj/Release/TempPE/DS_utils.Designer.cs.dll
index df3027a..bcbcbc0 100644
Binary files a/ETS_Data/obj/Release/TempPE/DS_utils.Designer.cs.dll and b/ETS_Data/obj/Release/TempPE/DS_utils.Designer.cs.dll differ
diff --git a/ETS_Data/utils.cs b/ETS_Data/utils.cs
index 1ba0ea9..eb73880 100644
--- a/ETS_Data/utils.cs
+++ b/ETS_Data/utils.cs
@@ -1,12 +1,7 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using System.Configuration;
using System.Web;
-using System.Web.UI;
-using System.Configuration;
-using System.Collections.Generic;
+using System.IO;
namespace ETS_Data
{
@@ -61,6 +56,10 @@ namespace ETS_Data
///
public static utils obj = new utils();
+ #endregion
+
+ #region area user
+
///
/// utente correntemente connesso (Formato dominio\username)
///
@@ -81,7 +80,16 @@ namespace ETS_Data
return answ;
}
}
-
+ ///
+ /// utente correntemente connesso per utilizzo FileSystem (Formato dominio.username)
+ ///
+ public string currUser_FS
+ {
+ get
+ {
+ return currUserAD.Replace(@"\", ".");
+ }
+ }
///
/// utente correntemente connesso (Formato Cognome, nome)
///
@@ -102,6 +110,10 @@ namespace ETS_Data
}
}
+ #endregion
+
+ #region area Session
+
///
/// carica dalla sessione un dato di tipo object generico
///
@@ -206,5 +218,79 @@ namespace ETS_Data
}
#endregion
+
+ #region gestione file config
+
+ ///
+ /// legge dalla config un valore bool
+ ///
+ ///
+ ///
+ public bool confReadBool(string nomeParam)
+ {
+ bool answ = false;
+ try
+ {
+ answ = (bool)configAppSetReader.GetValue(nomeParam, typeof(bool));
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ ///
+ /// legge dalla config un valore string
+ ///
+ ///
+ ///
+ public string confReadString(string nomeParam)
+ {
+ string answ = "";
+ try
+ {
+ answ = (string)configAppSetReader.GetValue(nomeParam, typeof(string));
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ ///
+ /// legge dalla config un valore int
+ ///
+ ///
+ ///
+ public int confReadInt(string nomeParam)
+ {
+ int answ = -1;
+ try
+ {
+ answ = (int)configAppSetReader.GetValue(nomeParam, typeof(int));
+ }
+ catch
+ { }
+ return answ;
+ }
+
+ #endregion
+
+ #region area file/dir
+
+ ///
+ /// verifica esistenza directory, eventualmente crea e restituisce controllo DirectoryInfo
+ ///
+ ///
+ ///
+ public DirectoryInfo checkDir(string dirPath)
+ {
+ DirectoryInfo _di = new DirectoryInfo(System.Web.HttpContext.Current.Server.MapPath(dirPath));
+ if (!_di.Exists)
+ {
+ _di.Create();
+ }
+ return _di;
+ }
+
+ #endregion
}
}