เพิ่ม api รายงานประกาศเกษียณข้าราชการ/ move old template

This commit is contained in:
Harid Promsri (Bright) 2023-08-23 13:50:44 +07:00
parent c179b14839
commit 24bc852341
88 changed files with 39 additions and 29 deletions

View file

@ -3,8 +3,6 @@ using BMA.EHR.Domain.Extensions;
using BMA.EHR.Domain.Models.Retirement;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
//using Telerik.Reporting;
//using Telerik.Reporting.Processing;
namespace BMA.EHR.Application.Repositories.Reports
{
@ -123,27 +121,6 @@ namespace BMA.EHR.Application.Repositories.Reports
return new { retire.Id, retire.CreatedAt, Year = retire.Year.ToThaiYear().ToString().ToThaiNumber(), retire.Round, retire.Type, retire.TypeReport, Total = profile_retire.Count.ToString().ToThaiNumber(), profile = profile_retire };
}
//Report
//var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"32-ประกาศเกษียณลูกจ้างประจำ.trdp");
//ReportPackager reportPacker = new ReportPackager();
//Telerik.Reporting.Report? report = null;
//using (var sourceStream = System.IO.File.OpenRead(rptFile))
//{
// report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
//}
//System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
//InstanceReportSource instanceReportSource = new InstanceReportSource()
//{
// ReportDocument = report,
//};
//ReportProcessor reportProcessor = new ReportProcessor(_configuration);
//RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo);
//var content = result.DocumentBytes;
//return File(content, "application/pdf", $"ประกาศเกษียณลูกจ้างประจำ_{null}.pdf");
}
#endregion