Merge branch 'develop' into work
This commit is contained in:
commit
15054de97f
19 changed files with 37 additions and 5 deletions
|
|
@ -589,6 +589,18 @@
|
|||
<None Update="Reports\13-แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\21-คำร้องขอโอน-1.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\21-คำร้องขอโอน-2.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\21-คำร้องขอโอน-3.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\21-คำร้องขอโอน-4.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\22-หนังสือแจ้งสำนักงานการเจ้าหน้าที่-1.trdp">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData2Transfer(id);
|
||||
//var data = await _service.GetData2Transfer(id);
|
||||
var mimeType = "";
|
||||
switch (exportType.Trim().ToLower())
|
||||
{
|
||||
|
|
@ -69,27 +69,47 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
|
||||
}
|
||||
|
||||
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"22-หนังสือแจ้งสำนักงานการเจ้าหน้าที่-1.trdp");
|
||||
var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"21-คำร้องขอโอน-1.trdp");
|
||||
var rptFile2 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"21-คำร้องขอโอน-2.trdp");
|
||||
var rptFile3 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"21-คำร้องขอโอน-3.trdp");
|
||||
var rptFile4 = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"21-คำร้องขอโอน-4.trdp");
|
||||
|
||||
ReportPackager reportPacker = new ReportPackager();
|
||||
Telerik.Reporting.Report? report = null;
|
||||
Telerik.Reporting.Report? report2 = null;
|
||||
Telerik.Reporting.Report? report3 = null;
|
||||
Telerik.Reporting.Report? report4 = null;
|
||||
|
||||
using (var sourceStream = System.IO.File.OpenRead(rptFile))
|
||||
using (var sourceStream2 = System.IO.File.OpenRead(rptFile2))
|
||||
using (var sourceStream3 = System.IO.File.OpenRead(rptFile3))
|
||||
using (var sourceStream4 = System.IO.File.OpenRead(rptFile4))
|
||||
{
|
||||
report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
|
||||
report2 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream2);
|
||||
report3 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream3);
|
||||
report4 = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream4);
|
||||
|
||||
}
|
||||
|
||||
report.DataSource = data;
|
||||
//report.DataSource = data;
|
||||
|
||||
var reportBook = new ReportBook();
|
||||
reportBook.Reports.Add(report);
|
||||
reportBook.Reports.Add(report2);
|
||||
reportBook.Reports.Add(report3);
|
||||
reportBook.Reports.Add(report4);
|
||||
|
||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
{
|
||||
ReportDocument = report,
|
||||
ReportDocument = reportBook,
|
||||
};
|
||||
|
||||
ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||
RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
||||
var content = result.DocumentBytes;
|
||||
return File(content, mimeType, $"หนังสือแจ้งสำนักงานการเจ้าหน้าที่.{exportType.Trim().ToLower()}");
|
||||
return File(content, mimeType, $"แบบคำร้องขอโอน.{exportType.Trim().ToLower()}");
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-1.trdp
Normal file
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-1.trdp
Normal file
Binary file not shown.
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-2.trdp
Normal file
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-2.trdp
Normal file
Binary file not shown.
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-3.trdp
Normal file
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-3.trdp
Normal file
Binary file not shown.
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-4.trdp
Normal file
BIN
BMA.EHR.Report.Service/Reports/21-คำร้องขอโอน-4.trdp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue