diff --git a/CMS-SC-Data/CMS-SC-Data.csproj b/CMS-SC-Data/CMS-SC-Data.csproj index 6754611..e8cf151 100644 --- a/CMS-SC-Data/CMS-SC-Data.csproj +++ b/CMS-SC-Data/CMS-SC-Data.csproj @@ -90,8 +90,8 @@ ..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.3.5.1911.699\lib\net462\SteamWare.dll + + ..\packages\SteamWare.3.5.1911.700\lib\net462\SteamWare.dll diff --git a/CMS-SC-Data/packages.config b/CMS-SC-Data/packages.config index e8449d3..9cc473d 100644 --- a/CMS-SC-Data/packages.config +++ b/CMS-SC-Data/packages.config @@ -17,7 +17,7 @@ - + diff --git a/CMS_SC/CMS_SC.csproj b/CMS_SC/CMS_SC.csproj index cf3cd4a..7342ab2 100644 --- a/CMS_SC/CMS_SC.csproj +++ b/CMS_SC/CMS_SC.csproj @@ -179,8 +179,8 @@ ..\packages\StackExchange.Redis.StrongName.1.2.6\lib\net46\StackExchange.Redis.StrongName.dll - - ..\packages\SteamWare.3.5.1911.699\lib\net462\SteamWare.dll + + ..\packages\SteamWare.3.5.1911.700\lib\net462\SteamWare.dll diff --git a/CMS_SC/ReportCompleto.aspx b/CMS_SC/ReportCompleto.aspx index 31a1960..d03bfa1 100644 --- a/CMS_SC/ReportCompleto.aspx +++ b/CMS_SC/ReportCompleto.aspx @@ -16,6 +16,7 @@ <%: traduci("PrepareReportCompletoAllegati") %> <%: traduci("DownloadReportCompletoAllegati") %> +
Fase diff --git a/CMS_SC/ReportCompleto.aspx.cs b/CMS_SC/ReportCompleto.aspx.cs index aead090..2e739ee 100644 --- a/CMS_SC/ReportCompleto.aspx.cs +++ b/CMS_SC/ReportCompleto.aspx.cs @@ -128,6 +128,9 @@ namespace CMS_SC /// protected void lbtExportWithAttach_Click(object sender, EventArgs e) { + bool allDone = false; + int numFilesDone = 0; + int allFiles = 0; // effettua merge Report Completo + allegati: registro in primis la richiesta! var tabDoss = DtProxy.man.taED.getByDossier(idxDossier); if (tabDoss.Count > 0) @@ -154,20 +157,40 @@ namespace CMS_SC foreach (var item in tabDati) { pdfInFullPath = ""; - if (!elencoPdf.Contains(item.Path)) + // controllo SE HO un pdf... + if (!string.IsNullOrEmpty(item.Path)) { - pdfInFullPath = Server.MapPath(string.Format(urlSchede, item.Path)); - elencoPdf.Add(pdfInFullPath); + allFiles++; + try + { + if (!elencoPdf.Contains(item.Path)) + { + + pdfInFullPath = Server.MapPath(string.Format(urlSchede, item.Path)); + elencoPdf.Add(pdfInFullPath); + } + } + catch + { } } } // step 4: MERGE di tutti i pdf nel file di output string outFilePath = $"ReportAndSpec_{idxDossier}.pdf"; string outFilePathMapped = $"{Server.MapPath(currOutPath)}\\{outFilePath}"; - SteamWare.pdfUtils.mergePdfFiles(outFilePathMapped, elencoPdf); + numFilesDone = pdfUtils.mergePdfFiles(outFilePathMapped, elencoPdf); + allDone = (numFilesDone == allFiles && allFiles > 0); // step 5: chiamo pagina x download nuovo file composto... aggiornando hyperLink button x scaricare in target "_blank" il report creato... - lbtExportWithAttach.Visible = false; - hlDownloadPdf.Visible = true; - hlDownloadPdf.NavigateUrl = $"downloadReport?baseDir={currOutPath}&fileName={outFilePath}&cType=pdf"; + lbtExportWithAttach.Visible = !allDone; + hlDownloadPdf.Visible = allDone; + lblOutMessage.Visible = !allDone; + if (allDone) + { + hlDownloadPdf.NavigateUrl = $"downloadReport?baseDir={currOutPath}&fileName={outFilePath}&cType=pdf"; + } + else + { + lblOutMessage.Text = $"Attenzione: non รจ stato possibile trovare tutti i files richiesti({numFilesDone}/{allFiles}), verificare i pdf"; + } // refresh finale report mostrato (ho usaro reportviewer x export pdf...) fixSelReport(); } diff --git a/CMS_SC/ReportCompleto.aspx.designer.cs b/CMS_SC/ReportCompleto.aspx.designer.cs index 3366bd6..5b13158 100644 --- a/CMS_SC/ReportCompleto.aspx.designer.cs +++ b/CMS_SC/ReportCompleto.aspx.designer.cs @@ -41,6 +41,15 @@ namespace CMS_SC /// protected global::System.Web.UI.WebControls.HyperLink hlDownloadPdf; + /// + /// Controllo lblOutMessage. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblOutMessage; + /// /// Controllo ddlFase. /// diff --git a/CMS_SC/packages.config b/CMS_SC/packages.config index 4cdbc58..d4663da 100644 --- a/CMS_SC/packages.config +++ b/CMS_SC/packages.config @@ -52,7 +52,7 @@ - +