Modifica x gestione corretta files archiviati
This commit is contained in:
@@ -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" %>
|
||||
<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<div class="clearDiv divSx" style="min-width: 320px; width: 25%;">
|
||||
|
||||
<uc2:mod_gestioneDati ID="mod_gestioneDati1" runat="server" />
|
||||
</div>
|
||||
<div class="divSx" style="min-width: 640px; width: 75%;">
|
||||
<uc2:mod_gestioneDati ID="mod_gestioneDati1" runat="server" />
|
||||
</div>
|
||||
<div class="divSx fontPiccolo"" style="min-width: 640px; width: 75%;">
|
||||
<div style="width: 100%">
|
||||
<uc1:mod_gestioneDocumenti ID="mod_gestioneDocumenti1" runat="server" />
|
||||
<uc1:mod_gestioneDocumenti ID="mod_gestioneDocumenti1" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</asp:content>
|
||||
</asp:Content>
|
||||
|
||||
@@ -19,30 +19,51 @@
|
||||
<HeaderStyle CssClass="ctrHeaderPager" ForeColor="White" Font-Bold="True" />
|
||||
<EmptyDataRowStyle CssClass="ctrRowStyle" />
|
||||
<Columns>
|
||||
<asp:CommandField ShowSelectButton="True" />
|
||||
<asp:BoundField DataField="idxFile" HeaderText="idxFile" ReadOnly="True"
|
||||
SortExpression="idxFile" />
|
||||
<asp:BoundField DataField="tempName" HeaderText="tempName"
|
||||
SortExpression="tempName" />
|
||||
<asp:BoundField DataField="fullName" HeaderText="fullName"
|
||||
SortExpression="fullName" />
|
||||
<asp:BoundField DataField="userId" HeaderText="userId"
|
||||
SortExpression="userId" />
|
||||
<asp:BoundField DataField="DataRic" HeaderText="DataRic"
|
||||
SortExpression="DataRic" />
|
||||
<asp:BoundField DataField="DataDoc" HeaderText="DataDoc"
|
||||
SortExpression="DataDoc" />
|
||||
<asp:BoundField DataField="NumeroCommessa" HeaderText="NumeroCommessa"
|
||||
SortExpression="NumeroCommessa" />
|
||||
<asp:BoundField DataField="AnnoCommessa" HeaderText="AnnoCommessa"
|
||||
SortExpression="AnnoCommessa" />
|
||||
<%--<asp:BoundField DataField="idxFile" HeaderText="idxFile" ReadOnly="True" SortExpression="idxFile"
|
||||
InsertVisible="False" />--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Image runat="server" ID="lblFileType" Width="32" Height="32" ImageUrl='<%# imgFromName(Eval("Nome")) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nome" SortExpression="Nome">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="hlFile" Text='<%# Eval("Nome") %>' ToolTip='<%# accoda(Eval("fullPath"),Eval("Nome")) %>'
|
||||
Target="_blank" NavigateUrl='<%# accoda(Eval("fullPath"),Eval("Nome"))%>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nome" SortExpression="Nome">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ImageUrl="~/images/folder_l.png" Text="folder" ToolTip='<%# Eval("fullPath") %>'
|
||||
Target="_blank" NavigateUrl='<%# Eval("fullPath")%>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="fullPath" HeaderText="fullPath" SortExpression="fullPath" />--%>
|
||||
<asp:BoundField DataField="userId" HeaderText="userId" SortExpression="userId" />
|
||||
<asp:BoundField DataField="NrProtocollo" HeaderText="NrProtocollo" SortExpression="NrProtocollo" />
|
||||
<asp:BoundField DataField="Numero" HeaderText="Numero" SortExpression="Numero" />
|
||||
<asp:BoundField DataField="Anno" HeaderText="Anno" SortExpression="Anno" />
|
||||
<asp:BoundField DataField="DataRic" HeaderText="DataRic" SortExpression="DataRic" />
|
||||
<asp:BoundField DataField="DataDoc" HeaderText="DataDoc" SortExpression="DataDoc" />
|
||||
<asp:BoundField DataField="NumeroCommessa" HeaderText="NumeroCommessa" SortExpression="NumeroCommessa" />
|
||||
<asp:BoundField DataField="AnnoCommessa" HeaderText="AnnoCommessa" SortExpression="AnnoCommessa" />
|
||||
<asp:BoundField DataField="Fase" HeaderText="Fase" SortExpression="Fase" />
|
||||
<asp:BoundField DataField="Mittente" HeaderText="Mittente"
|
||||
SortExpression="Mittente" />
|
||||
<asp:BoundField DataField="Oggetto" HeaderText="Oggetto"
|
||||
SortExpression="Oggetto" />
|
||||
<asp:BoundField DataField="Fonte" HeaderText="Fonte" SortExpression="Fonte" />
|
||||
<asp:BoundField DataField="Oggetto" HeaderText="Oggetto" SortExpression="Oggetto" />
|
||||
<asp:BoundField DataField="InOut" HeaderText="InOut" SortExpression="InOut" />
|
||||
<%--<asp:BoundField DataField="Tipologia" HeaderText="Tipologia" SortExpression="Tipologia" />
|
||||
<asp:BoundField DataField="Riferimenti" HeaderText="Riferimenti" SortExpression="Riferimenti" />
|
||||
<asp:BoundField DataField="Attivita" HeaderText="Attivita" SortExpression="Attivita" />
|
||||
<asp:BoundField DataField="Autore" HeaderText="Autore" SortExpression="Autore" />
|
||||
<asp:BoundField DataField="SA" HeaderText="SA" SortExpression="SA" />
|
||||
<asp:BoundField DataField="Redattore" HeaderText="Redattore" SortExpression="Redattore" />
|
||||
<asp:BoundField DataField="SR" HeaderText="SR" SortExpression="SR" />
|
||||
<asp:BoundField DataField="Annotazioni" HeaderText="Annotazioni" SortExpression="Annotazioni" />
|
||||
<asp:BoundField DataField="LegUtente" HeaderText="LegUtente" SortExpression="LegUtente" />
|
||||
<asp:BoundField DataField="NoteSystemManager" HeaderText="NoteSystemManager" SortExpression="NoteSystemManager" />
|
||||
<asp:BoundField DataField="Spunta" HeaderText="Spunta" SortExpression="Spunta" />
|
||||
<asp:BoundField DataField="Num_Fattura" HeaderText="Num_Fattura" SortExpression="Num_Fattura" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="ETS_Data.DS_WebScipTableAdapters.tmpFileUtTableAdapter"
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="ETS_Data.DS_WebScipTableAdapters.tbDocumentiTableAdapter"
|
||||
OldValuesParameterFormatString="Original_{0}"></asp:ObjectDataSource>
|
||||
|
||||
@@ -13,5 +13,85 @@ namespace ETS_WS.WebUserControls
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// restituisce il nome di un icona (nel formato nome_icona.png) dal filetype (*.fileType)
|
||||
/// </summary>
|
||||
/// <param name="nome"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// accoda 2 oggetti in un unica stringa
|
||||
/// </summary>
|
||||
/// <param name="obj1"></param>
|
||||
/// <param name="obj2"></param>
|
||||
/// <returns></returns>
|
||||
public string accoda(object obj1, object obj2)
|
||||
{
|
||||
return string.Format("{0}{1}", obj1, obj2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,16 +11,4 @@
|
||||
<% } %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Src="mod_myTempFile.ascx" TagName="mod_myTempFile" TagPrefix="uc1" %>
|
||||
<asp:tabcontainer id="tcDocumenti" runat="server" tabstripplacement="Top" width="100%"
|
||||
activetabindex="1">
|
||||
<asp:tabpanel runat="server" id="tblDocumenti" headertext="Gestione Documenti" tabindex="0">
|
||||
<contenttemplate>
|
||||
<uc2:mod_archivioDocumenti ID="mod_archivioDocumenti1" runat="server" />
|
||||
</contenttemplate>
|
||||
</asp:tabpanel>
|
||||
<asp:tabpanel runat="server" id="tblMyDocs" headertext="My uploads" tabindex="0">
|
||||
<contenttemplate>
|
||||
<uc1:mod_myTempFile ID="mod_myTempFile1" runat="server" />
|
||||
</contenttemplate>
|
||||
</asp:tabpanel>
|
||||
</asp:tabcontainer>
|
||||
<uc2:mod_archivioDocumenti ID="mod_archivioDocumenti1" runat="server" />
|
||||
|
||||
@@ -12,24 +12,6 @@ namespace ETS_WS.WebUserControls {
|
||||
|
||||
public partial class mod_gestioneDocumenti {
|
||||
|
||||
/// <summary>
|
||||
/// tcDocumenti control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabContainer tcDocumenti;
|
||||
|
||||
/// <summary>
|
||||
/// tblDocumenti control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel tblDocumenti;
|
||||
|
||||
/// <summary>
|
||||
/// mod_archivioDocumenti1 control.
|
||||
/// </summary>
|
||||
@@ -38,23 +20,5 @@ namespace ETS_WS.WebUserControls {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ETS_WS.WebUserControls.mod_archivioDocumenti mod_archivioDocumenti1;
|
||||
|
||||
/// <summary>
|
||||
/// tblMyDocs control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::AjaxControlToolkit.TabPanel tblMyDocs;
|
||||
|
||||
/// <summary>
|
||||
/// mod_myTempFile1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ETS_WS.WebUserControls.mod_myTempFile mod_myTempFile1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user