Fix doppio step: creazione report + download
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
<div class="col-3">
|
||||
<h3 class="card-title text-uppercase"><%: traduci("ReportCompleto") %></h3>
|
||||
<asp:HiddenField runat="server" ID="hfIdxDossier" />
|
||||
<asp:LinkButton runat="server" ID="lbtExportWithAttach" CssClass="btn btn-sm btn-warning btn-block" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaReportCompletoAllegati") %>' OnClick="lbtExportWithAttach_Click"><%: traduci("ReportCompletoAllegati") %> <i class="fa fa-download" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtExportWithAttach" CssClass="btn btn-sm btn-warning btn-block" OnClientClick='<%# SteamWare.jsUtils.getCBE("confermaReportCompletoAllegati") %>' OnClick="lbtExportWithAttach_Click"><%: traduci("PrepareReportCompletoAllegati") %> <i class="fa fa-gears" aria-hidden="true"></i></asp:LinkButton>
|
||||
<asp:HyperLink runat="server" ID="hlDownloadPdf" Target="_blank" Visible="false" CssClass="btn btn-sm btn-success btn-block"><%: traduci("DownloadReportCompletoAllegati") %> <i class="fa fa-download" aria-hidden="true"></i></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<b>Fase</b>
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace CMS_SC
|
||||
private void fixFullReportVisibility()
|
||||
{
|
||||
lbtExportWithAttach.Visible = devicesAuthProxy.stObj.userHasRight("ReportFullPdf") || devicesAuthProxy.stObj.userHasRight("CapoOfficina");
|
||||
hlDownloadPdf.Visible = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -142,7 +143,12 @@ namespace CMS_SC
|
||||
string outFile = $"{Server.MapPath(currOutPath)}\\ReportFull_{idxDossier}.pdf";
|
||||
pdfUtils.mergePdfFiles(outFile, elencoPdf);
|
||||
// step 5: chiamo pagina x download nuovo file composto...
|
||||
Response.Redirect($"downloadReport?baseDir={currOutPath}&fileName=ReportFull_{idxDossier}.pdf&cType=pdf");
|
||||
// aggiorno button!
|
||||
lbtExportWithAttach.Visible = false;
|
||||
hlDownloadPdf.NavigateUrl = $"downloadReport?baseDir={currOutPath}&fileName=ReportFull_{idxDossier}.pdf&cType=pdf";
|
||||
hlDownloadPdf.Visible = true;
|
||||
//Response.Redirect($"downloadReport?baseDir={currOutPath}&fileName=ReportFull_{idxDossier}.pdf&cType=pdf");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+9
@@ -32,6 +32,15 @@ namespace CMS_SC
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtExportWithAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo hlDownloadPdf.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink hlDownloadPdf;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo ddlFase.
|
||||
/// </summary>
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace CMS_SC
|
||||
{
|
||||
Response.ContentType = $"application/{cType}";
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename={fileName}");
|
||||
Response.AddHeader("Refresh", $"3; url={user_std.pagPrecedente}");
|
||||
Response.TransmitFile(file2download);
|
||||
Response.End();
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user