переустановила мигра док, работает сохранение файла в пдф
This commit is contained in:
parent
3f0ea55aad
commit
68c704f47c
@ -9,7 +9,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
|
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
||||||
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
|
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.9" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -425,8 +425,10 @@ namespace PolyclinicWebAppSuretor.Controllers
|
|||||||
_suretorReportLogic.SaveProceduresToPdfFile(reportBindingModel);
|
_suretorReportLogic.SaveProceduresToPdfFile(reportBindingModel);
|
||||||
|
|
||||||
// ×òåíèå ñãåíåðèðîâàííîãî ôàéëà
|
// ×òåíèå ñãåíåðèðîâàííîãî ôàéëà
|
||||||
var fileBytes = System.IO.File.ReadAllBytes(reportBindingModel.FileName);
|
//var fileBytes = System.IO.File.ReadAllBytes(reportBindingModel.FileName);
|
||||||
var fileName = "ProceduresReport.pdf";
|
var fileName = "ProceduresReport.pdf";
|
||||||
|
var filePath = Path.Combine(Directory.GetCurrentDirectory(), fileName);
|
||||||
|
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath);
|
||||||
|
|
||||||
// Âîçâðàùàåì ôàéë â âèäå ñêà÷èâàåìîãî êîíòåíòà
|
// Âîçâðàùàåì ôàéë â âèäå ñêà÷èâàåìîãî êîíòåíòà
|
||||||
return File(fileBytes, "application/pdf", fileName);
|
return File(fileBytes, "application/pdf", fileName);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@using PolyclinicContracts.ViewModels
|
@using PolyclinicContracts.ViewModels
|
||||||
@model List<ReportProceduresViewModel>
|
@model List<ReportProceduresViewModel>
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "ProceduresReport";
|
ViewData["Title"] = "Отчет по процедурам";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
@ -53,13 +53,9 @@
|
|||||||
<td>@item.DateStopProcedure?.ToShortDateString()</td>
|
<td>@item.DateStopProcedure?.ToShortDateString()</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|
||||||
@* <td>@string.Join("<br/>", item.MedicamentSymptom.Select(ms => ms.medicamentName))</td>
|
|
||||||
<td>@string.Join("<br/>", item.MedicamentSymptom.Select(ms => ms.symptomName))</td> *@
|
|
||||||
</tr>
|
</tr>
|
||||||
@foreach (var ms in item.MedicamentSymptom)
|
@foreach (var ms in item.MedicamentSymptom)
|
||||||
{
|
{
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -68,9 +64,7 @@
|
|||||||
<td>@ms.medicamentName</td>
|
<td>@ms.medicamentName</td>
|
||||||
<td>@ms.symptomName</td>
|
<td>@ms.symptomName</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user