comment repository
This commit is contained in:
parent
61e5e4cbd2
commit
97ea0e37d8
1 changed files with 4 additions and 4 deletions
|
|
@ -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()}");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue