แก้บั้กการ select ข้อมูล

This commit is contained in:
Suphonchai Phoonsawat 2023-05-11 12:03:55 +07:00
parent 39cebf60fa
commit 66371c7927
2 changed files with 7 additions and 4 deletions

View file

@ -88,8 +88,8 @@ namespace BMA.EHR.Report.Service.Controllers
ps.PositionSalaryAmount
}).ToList();
var profile = (from p in _context.Profiles.ToList()
join pf in _context.Prefixes.ToList() on p.PrefixId equals pf.Id
var profile = (from p in _context.Profiles
join pf in _context.Prefixes on p.PrefixId equals pf.Id
where p.Id == id
select new
@ -493,7 +493,7 @@ namespace BMA.EHR.Report.Service.Controllers
OcFullPath = profile2.OcFullPath
}).ToList();
while (salary.Count < 1)
while (salary.Count < 30)
{
salary.Add(new
{
@ -519,7 +519,10 @@ namespace BMA.EHR.Report.Service.Controllers
{
report2 = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
}
report2.DataSource = salary;
report2.ReportParameters["FullName"].Value = profile2.FullName;
report2.ReportParameters["OcFullPath"].Value = profile2.OcFullPath;
// binding to table
var tblSalary = (Telerik.Reporting.Table)report2.Items["detailSection1"].Items["tblSalary"];
tblSalary.DataSource = salary;

Binary file not shown.