ok show & download files allegati...
This commit is contained in:
@@ -76,8 +76,8 @@ public class WebGimUtils
|
||||
// ipotesi: folder bilanciate andando a mettere MAX 1000 files x folder, quindi fodler 0 --> 0...999, 1000 --> 1000...1999, etc
|
||||
int maxFiles = 1000;
|
||||
int numDir = numInt / maxFiles;
|
||||
string BaseDir = "Files";
|
||||
return string.Format(@"{0}\{1}\{2}", BaseDir, numDir*maxFiles, numInt);
|
||||
string uploadDir = memLayer.ML.CRS("uploadDir");
|
||||
return string.Format(@"{0}\{1}\{2}", uploadDir, numDir*maxFiles, numInt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -118,6 +118,8 @@
|
||||
<!--selezioni default-->
|
||||
<add key="defPriorMtzPred" value="2" />
|
||||
<add key="defCauMtzPred" value="59" />
|
||||
<!--file upload-->
|
||||
<add key="uploadDir" value="~/Files" />
|
||||
<!--(Macro) Moduli abilitati-->
|
||||
<add key="enModMag" value="true" />
|
||||
<!--abilitazione mod-->
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_fileUpload.ascx.cs" Inherits="GIM_site.WebUserControls.mod_fileUpload" %>
|
||||
|
||||
|
||||
<div runat="server" id="divOpenNew" class="bg-info" style="text-align: center; margin: auto; font-size:2.5em;">
|
||||
<b><asp:HyperLink runat="server" ID="hlOpenNew" NavigateUrl="~/showFile" Target="_blank"><%: numAllegati %>Allegati</asp:HyperLink></b>
|
||||
<div runat="server" id="divOpenNew" class="bg-info" style="text-align: center; margin: auto; font-size: 1.5em;">
|
||||
<b>
|
||||
<asp:HyperLink runat="server" ID="hlOpenNew" NavigateUrl="~/showFile" Target="_blank"><%: numAllegati %> files allegati</asp:HyperLink></b>
|
||||
</div>
|
||||
|
||||
<div runat="server" id="divNormal">
|
||||
@@ -38,9 +39,9 @@
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="lnkDownload" runat="server" OnClick="DownloadFile" CommandArgument='<%# Eval("Nome") %>'>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Nome") %>' />
|
||||
</asp:LinkButton>
|
||||
<asp:HyperLink runat="server" ID="hlFile" Target="_blank" NavigateUrl='<%# fileUrl(Eval("Nome")) %>'>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# Eval("Nome") %>' />
|
||||
</asp:HyperLink>
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label CssClass="flLeft" ID="lblDataMod" runat="server" Text='<%# Eval("dataCreaz","{0:yyyy-MM-dd HH:mm}") %>' Font-Size="0.7em" />
|
||||
|
||||
@@ -115,6 +115,11 @@ namespace GIM_site.WebUserControls
|
||||
Response.Redirect(Request.Url.AbsoluteUri);
|
||||
}
|
||||
|
||||
public string fileUrl(object name)
|
||||
{
|
||||
return string.Format("{0}//{1}", WebGimUtils.dirPathIntMtz(numIntMtz), name);
|
||||
}
|
||||
|
||||
protected void DownloadFile(object sender, EventArgs e)
|
||||
{
|
||||
byte[] bytes;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user