no message

This commit is contained in:
Kittapath 2024-06-07 03:06:11 +07:00
parent 94980d9157
commit d47df139ed
9 changed files with 532 additions and 195 deletions

View file

@ -108,7 +108,7 @@ namespace BMA.EHR.Report.Service.Controllers
var tmpOc1 = string.Empty;
foreach (var profile in retire.GetType().GetProperty("profile").GetValue(retire))
{
var tmpOc2 = profile.GetType().GetProperty("oc").GetValue(profile);
var tmpOc2 = profile.GetType().GetProperty("root").GetValue(profile);
if (tmpOc1 != tmpOc2)
{
_count = 1;
@ -125,23 +125,31 @@ namespace BMA.EHR.Report.Service.Controllers
count = $"{_count.ToString().ToThaiNumber()}.",
no = $"{(_profileList.Count() + 1).ToString().ToThaiNumber()}.",
order = thaiOrder,
oc = string.IsNullOrEmpty(profile.GetType().GetProperty("oc").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("oc").GetValue(profile),
fullName = string.IsNullOrEmpty(profile.GetType().GetProperty("fullName").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("fullName").GetValue(profile),
position = string.IsNullOrEmpty(profile.GetType().GetProperty("position").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("position").GetValue(profile),
posNo = string.IsNullOrEmpty(profile.GetType().GetProperty("posNo").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("posNo").GetValue(profile),
organizationOrganization = string.IsNullOrEmpty(profile.GetType().GetProperty("organizationOrganization").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("organizationOrganization").GetValue(profile),
positionEmployeePosition = string.IsNullOrEmpty(profile.GetType().GetProperty("positionEmployeePosition").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("positionEmployeePosition").GetValue(profile),
posNoEmployee = string.IsNullOrEmpty(profile.GetType().GetProperty("posNoEmployee").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("posNoEmployee").GetValue(profile),
reason = string.IsNullOrEmpty(profile.GetType().GetProperty("reason").GetValue(profile)) ? string.Empty : profile.GetType().GetProperty("reason").GetValue(profile),
organizationOrganization = (profile.GetType().GetProperty("child4").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child4").GetValue(profile) + "/") +
(profile.GetType().GetProperty("child3").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child3").GetValue(profile) + "/") +
(profile.GetType().GetProperty("child2").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child2").GetValue(profile) + "/") +
(profile.GetType().GetProperty("child1").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child1").GetValue(profile) + "/") +
(profile.GetType().GetProperty("root").GetValue(profile) == null ? "" : profile.GetType().GetProperty("root").GetValue(profile)),
fullName = $"{profile.GetType().GetProperty("prefix").GetValue(profile)}{profile.GetType().GetProperty("firstName").GetValue(profile)} {profile.GetType().GetProperty("lastName").GetValue(profile)}",
position = profile.GetType().GetProperty("position").GetValue(profile),
posNo = profile.GetType().GetProperty("posMasterNo").GetValue(profile),
oc = profile.GetType().GetProperty("root").GetValue(profile),
positionEmployeePosition = profile.GetType().GetProperty("position").GetValue(profile),
posNoEmployee = profile.GetType().GetProperty("posMasterNo").GetValue(profile),
reason = profile.GetType().GetProperty("reason").GetValue(profile),
});
}
//Binding Data
if (report.ReportParameters["Type"].Value == "1")
{
report.ReportParameters["Year"].Value = string.IsNullOrEmpty(retire.GetType().GetProperty("Year").GetValue(retire)) ? string.Empty : retire.GetType().GetProperty("Year").GetValue(retire);
report.ReportParameters["Total"].Value = string.IsNullOrEmpty(retire.GetType().GetProperty("Total").GetValue(retire)) ? string.Empty : retire.GetType().GetProperty("Total").GetValue(retire);
report.ReportParameters["Detail"].Value = string.IsNullOrEmpty(retire.GetType().GetProperty("Detail").GetValue(retire)) ? string.Empty : retire.GetType().GetProperty("Detail").GetValue(retire);
report.DataSource = _profileList;
// report.ReportParameters["Year"].Value = retire.GetType().GetProperty("year").GetValue(retire);
// report.ReportParameters["Total"].Value = retire.GetType().GetProperty("total").GetValue(retire);
// report.ReportParameters["Detail"].Value = retire.GetType().GetProperty("detail").GetValue(retire);
// report.DataSource = _profileList;
report.DataSource = retire;
var tblProfile = (Telerik.Reporting.Table)report.Items["detailSection1"].Items["table1"];
tblProfile.DataSource = _profileList;
}
else
{
@ -149,6 +157,7 @@ namespace BMA.EHR.Report.Service.Controllers
var tblProfile = (Telerik.Reporting.Table)report.Items["detailSection1"].Items["table1"];
tblProfile.DataSource = _profileList;
}
// return Success(retire);
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
InstanceReportSource instanceReportSource = new InstanceReportSource()
{