comment repository

This commit is contained in:
Harid Promsri (Bright) 2023-08-26 20:34:46 +07:00
parent 61e5e4cbd2
commit 97ea0e37d8

View file

@ -25,7 +25,7 @@ namespace BMA.EHR.Report.Service.Controllers
private readonly IWebHostEnvironment _hostingEnvironment; private readonly IWebHostEnvironment _hostingEnvironment;
private readonly IConfiguration _configuration; private readonly IConfiguration _configuration;
private readonly ProbationReportRepository _repository; //private readonly ProbationReportRepository _repository;
private readonly GenericReportGenerator _reportGenerator; private readonly GenericReportGenerator _reportGenerator;
@ -33,12 +33,12 @@ namespace BMA.EHR.Report.Service.Controllers
#region " Constuctor and Destructor " #region " Constuctor and Destructor "
public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration, ProbationReportRepository repository, GenericReportGenerator reportGenerator) public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration,/* ProbationReportRepository repository*/ GenericReportGenerator reportGenerator)
{ {
_hostingEnvironment = hostingEnvironment; _hostingEnvironment = hostingEnvironment;
_configuration = configuration; _configuration = configuration;
_repository = repository; //_repository = repository;
_reportGenerator = reportGenerator; _reportGenerator = reportGenerator;
} }
@ -95,7 +95,7 @@ namespace BMA.EHR.Report.Service.Controllers
case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break; case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
} }
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"13-แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ-2.trdp");// var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"13-แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ.trdp");
var contentData = _reportGenerator.GenerateReport(rptFile, exportType); var contentData = _reportGenerator.GenerateReport(rptFile, exportType);
return File(contentData, mimeType, $"probation.{exportType.Trim().ToLower()}"); return File(contentData, mimeType, $"probation.{exportType.Trim().ToLower()}");