แก้ op 3 ข้อ

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-04-18 15:51:18 +07:00
parent f480ac9f35
commit 5bc18ea003
2 changed files with 12 additions and 12 deletions

View File

@@ -197,9 +197,9 @@ namespace TodoAPI2.Models
existingEntity.total_salary_limit_rounded = model.total_salary_limit_rounded;
existingEntity.remark = model.remark;
int j = 1;
foreach (var y in from z in _repository.Context.eva_limit_frame_employee where z.frame_group_guid == model.id orderby z.order_of_data select z)
{
int j = 1;
{
if (y.help_org_id.HasValue)
{
var theemp = (from q in all_all_emp where q.id == y.employee_id select q).FirstOrDefault();
@@ -207,7 +207,7 @@ namespace TodoAPI2.Models
var help_at = (from s in mapping_dept where s.id == thedetail.place select s).FirstOrDefault();
if (theemp != null && thedetail != null && help_at != null)
{
if (model.remark != "") existingEntity.remark += "\n";
if (existingEntity.remark != "") existingEntity.remark += "\n";
existingEntity.remark += $"{j}.ในลำดับที่ {y.order_of_data} {theemp.fullname} ตำแหน่ง{theemp.position_name} {theemp.department_name} \nมาช่วยปฏิบัติงานที่{help_at.department_name} ตั้งแต่วันที่ {MyHelper.GetDateStringForReport(thedetail.start_date)} - {MyHelper.GetDateStringForReport(thedetail.end_date)} \nตาม{thedetail.subject}";
}
j++;