diff --git a/ETS-WS/ETS-WS/GestioneDocumenti.aspx b/ETS-WS/ETS-WS/GestioneDocumenti.aspx index 526d89f..4778a6c 100644 --- a/ETS-WS/ETS-WS/GestioneDocumenti.aspx +++ b/ETS-WS/ETS-WS/GestioneDocumenti.aspx @@ -7,14 +7,13 @@ <%@ Register Src="WebUserControls/mod_gestioneDati.ascx" TagName="mod_gestioneDati" TagPrefix="uc2" %> <%@ Register Src="WebUserControls/mod_fileUpload.ascx" TagName="mod_fileUpload" TagPrefix="uc3" %> - +
- - -
-
+ +
+
- +
-
+
diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx index bb7e96e..db937a6 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx @@ -19,30 +19,51 @@ - - - - - - - - - + <%----%> + + + + + + + + + + + + + + + + <%----%> + + + + + + + + - - + + + <%-- + + + + + + + + + + + --%> - diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs index 77b12ba..955ea9a 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_archivioDocumenti.ascx.cs @@ -13,5 +13,85 @@ namespace ETS_WS.WebUserControls { } + /// + /// restituisce il nome di un icona (nel formato nome_icona.png) dal filetype (*.fileType) + /// + /// + /// + public string imgFromName(object nome) + { + string answ = "undef.png"; + string tipo = ""; + int posPunto = -1; + try + { + tipo = nome.ToString(); + posPunto = tipo.LastIndexOf("."); + tipo = tipo.Substring(posPunto, tipo.Length - posPunto).Replace(".", ""); + // ora faccio switch x "raggruppare" tipo di files + switch (tipo) + { + case "jpg": + case "png": + case "tif": + case "gif": + tipo = "image"; + break; + case "txt": + case "doc": + case "rtf": + case "docx": + case "odt": + case "xls": + case "xlsx": + case "ods": + case "ppt": + case "pptx": + case "odx": + tipo = "office"; + break; + case "zip": + case "rar": + case "7zip": + case "gz": + case "tgz": + tipo = "compress"; + break; + case "avi": + case "divx": + case "xvid": + tipo = "video"; + break; + case "eml": + tipo = "email"; + break; + case "exe": + case "msi": + tipo = "program"; + break; + case "pdf": + case "eps": + tipo = "pdf"; + break; + default: + tipo = "unknown"; + break; + } + answ = string.Format("{0}.png", tipo); + } + catch + { } + return string.Format(@"~\images\{0}", answ); + } + /// + /// accoda 2 oggetti in un unica stringa + /// + /// + /// + /// + public string accoda(object obj1, object obj2) + { + return string.Format("{0}{1}", obj1, obj2); + } } } \ No newline at end of file diff --git a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx index c6add21..e6d707f 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx +++ b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx @@ -11,16 +11,4 @@ <% } %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Src="mod_myTempFile.ascx" TagName="mod_myTempFile" TagPrefix="uc1" %> - - - - - - - - - - - - + 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 0bc79b0..372865a 100644 --- a/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs +++ b/ETS-WS/ETS-WS/WebUserControls/mod_gestioneDocumenti.ascx.designer.cs @@ -12,24 +12,6 @@ namespace ETS_WS.WebUserControls { public partial class mod_gestioneDocumenti { - /// - /// tcDocumenti control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.TabContainer tcDocumenti; - - /// - /// tblDocumenti control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.TabPanel tblDocumenti; - /// /// mod_archivioDocumenti1 control. /// @@ -38,23 +20,5 @@ namespace ETS_WS.WebUserControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::ETS_WS.WebUserControls.mod_archivioDocumenti mod_archivioDocumenti1; - - /// - /// tblMyDocs control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.TabPanel tblMyDocs; - - /// - /// mod_myTempFile1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ETS_WS.WebUserControls.mod_myTempFile mod_myTempFile1; } }