ปรับไปหลายข้อ จนจำไม่ได้แล้ว

This commit is contained in:
LAPTOP-KB8JC2K2\acer
2021-04-11 20:58:48 +07:00
parent 08b0cbf291
commit 708c5173bb
17 changed files with 1443 additions and 1 deletions

View File

@@ -192,6 +192,10 @@ namespace TodoAPI2.Models
string noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + existingEntity.id.ToString();
bool need_noti = true;
string noti_message2 = "";
string noti_url2 = "";
int? noti_to_employee_id2 = null;
if (model.status_mode == "nextA")
{
existingEntity.status_self_a_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
@@ -227,6 +231,10 @@ namespace TodoAPI2.Models
noti_to_employee_id = existingEntity.chief;
noti_message = "กรุณาตรวจสอบแบบประเมินของ {0}";
noti_url = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
noti_to_employee_id2 = owner_eva_employee_id;
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
}
else if (model.status_mode == "next1")
{
@@ -252,6 +260,10 @@ namespace TodoAPI2.Models
{
existingEntity.status_supervisor_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
noti_to_employee_id = current_eva.supervisor1_id;
noti_to_employee_id2 = owner_eva_employee_id;
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
}
else if (model.status_mode == "back2")
{
@@ -265,6 +277,10 @@ namespace TodoAPI2.Models
{
existingEntity.status_supervisor1A_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
noti_to_employee_id = current_eva.supervisor2_id;
noti_to_employee_id2 = owner_eva_employee_id;
noti_message2 = "แบบประเมินของ {0} ได้ถูกส่งต่อไปยังขั้นตอนถัดไปแล้ว";
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
}
else if (model.status_mode == "back3")
{
@@ -277,6 +293,10 @@ namespace TodoAPI2.Models
else if (model.status_mode == "next4")
{
existingEntity.status_supervisor2A_click_date = MyHelper.RemoveTimeFromDate(DateTime.Now);
noti_to_employee_id2 = owner_eva_employee_id;
noti_message2 = "แบบประเมินของ {0} ได้รับการประเมินเรียบร้อยแล้ว";
noti_url2 = "/eva/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + existingEntity.id.ToString();
}
else if (model.status_mode == "back4")
{
@@ -291,6 +311,10 @@ namespace TodoAPI2.Models
{
SendNotification(noti_to_employee_id, owner_eva_employee_id, existingEntity.id, noti_message, noti_url);
}
if (noti_to_employee_id2.HasValue)
{
SendNotification(noti_to_employee_id2, owner_eva_employee_id, existingEntity.id, noti_message2, noti_url2);
}
var updated = _repository.Update(id, existingEntity);
return Get(updated.id);