เพิ่มตัวแปร hr_svc

This commit is contained in:
Nakorn Rientrakrunchai
2020-08-30 08:16:46 +07:00
parent 62cda08ea0
commit bd70021a1b
4 changed files with 23 additions and 7 deletions

View File

@@ -199,10 +199,23 @@ namespace TodoAPI2.Controllers
i.employee_position_level = p.employee_position_level;
i.employee_org = p.employee_org;
i.employee_position = p.employee_position;
//if (!string.IsNullOrEmpty(p.employee_profile_picture))
//{
// i.image_url = MyHelper.GetConfig(Configuration, "SiteInformation:mainsite") + "/api/image/" + p.employee_profile_picture;
//}
if (!string.IsNullOrEmpty(p.employee_profile_picture))
{
i.image_url = MyHelper.GetConfig(Configuration, "SiteInformation:hr_svc") + "/api/image/" + p.employee_profile_picture;
// Check if i.image_url exist
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(i.image_url);
request.Method = "HEAD";
try
{
request.GetResponse();
}
catch
{
i.image_url = null;
}
}
i.chief_fullname = p.chief_fullname;
i.chief_position = p.chief_position;
i.supervisor2_fullname = p.supervisor2_fullname;

View File

@@ -42,7 +42,8 @@
"modulesite": "http://tb320.zd.co.th/menu/evaluation",
"sitename": "เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์",
"modulename": "ระบบประวัติเงินเดือนและการเลื่อนเงินเดือน",
"hr_upload_api": "https://hrm.thethaibar.or.th/api/file/upload",
"hr_upload_api": "https://hrm.thethaibar.or.th/api/file/upload",
"hr_scv": "http://tb320.zd.co.th"
}
}

View File

@@ -40,7 +40,8 @@
"modulesite": "http://tb320.zd.co.th/menu/evaluation",
"sitename": "เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์",
"modulename": "ระบบประวัติเงินเดือนและการเลื่อนเงินเดือน",
"hr_upload_api": "http://tb-320.zd.co.th/api/file/upload"
"hr_upload_api": "http://tb-320.zd.co.th/api/file/upload",
"hr_scv": "http://tb320.zd.co.th"
}
}

View File

@@ -40,7 +40,8 @@
"modulesite": "http://tb320dev.zd.co.th/menu/evaluation",
"sitename": "เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์",
"modulename": "ระบบประวัติเงินเดือนและการเลื่อนเงินเดือน",
"hr_upload_api": "http://tb-320.zd.co.th/api/file/upload"
"hr_upload_api": "http://tb-320.zd.co.th/api/file/upload",
"hr_scv": "http://tb320.zd.co.th"
}
}