ปรับปรุงหน้าจอ ประวัติการแก้ไข
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
{
|
||||
return ("<br/><a href='javascript:window_open({0}../eva_create_evaluation_detail_historyView/eva_create_evaluation_detail_history?id=" + id.ToString() + "{0});'>ดูประวัติ</a>").Replace("{0}", '"'.ToString());
|
||||
return ("<br/><a href='javascript:openHistory({0}../eva_create_evaluation_detail_historyView/eva_create_evaluation_detail_history?id=" + id.ToString() + "{0});'>ดูประวัติ</a>").Replace("{0}", '"'.ToString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
+3
-1
@@ -27,8 +27,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? action_emp_id { get; set; }
|
||||
|
||||
public int? history_group { get; set; } // 1 = ข้อตกลง ,2 = การประเมินจริง
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
|
||||
public void SetAutoField(DataContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -18,6 +18,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? evaluation_detail_id { get; set; }
|
||||
|
||||
public int? history_group { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -115,7 +115,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
where
|
||||
1 == 1
|
||||
&& (!model.evaluation_detail_id.HasValue || m_eva_create_evaluation_detail_history.evaluation_detail_id == model.evaluation_detail_id)
|
||||
&& m_eva_create_evaluation_detail_history.evaluation_detail_id == model.evaluation_detail_id
|
||||
&& model.history_group == m_eva_create_evaluation_detail_history.history_group
|
||||
|
||||
orderby m_eva_create_evaluation_detail_history.action_dt
|
||||
select new eva_create_evaluation_detail_historyViewModel()
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? action_dt { get; set; }
|
||||
|
||||
public string txt_action_dt { get { return MyHelper.GetDateStringForReport(this.action_dt); } }
|
||||
public string txt_action_dt { get { return MyHelper.GetDateStringForReport(this.action_dt) + " " + MyHelper.GetTimeStringFromDate(this.action_dt); } }
|
||||
|
||||
public string action_detail { get; set; }
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
if (!string.IsNullOrEmpty(s))
|
||||
{
|
||||
return ("<br/><a href='javascript:window_open({0}../eva_create_evaluation_detail_historyView/eva_create_evaluation_detail_history?id=" + id.ToString() + "{0});'>ดูประวัติ</a>").Replace("{0}", '"'.ToString());
|
||||
return ("<br/><a href='javascript:openHistory({0}../eva_create_evaluation_detail_historyView/eva_create_evaluation_detail_history?id=" + id.ToString() + "{0});'>ดูประวัติ</a>").Replace("{0}", '"'.ToString());
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
+14
-13
@@ -162,7 +162,7 @@ namespace TodoAPI2.Models
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
private void add_history(DateTime? dt, string action, int? action_user_id, int? detail_id)
|
||||
private void add_history(DateTime? dt, string action, int? action_user_id, int? detail_id, int? group)
|
||||
{
|
||||
int? newkey = 0;
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace TodoAPI2.Models
|
||||
n.action_dt = dt;
|
||||
n.action_emp_id = action_user_id;
|
||||
n.evaluation_detail_id = detail_id;
|
||||
n.history_group = group;
|
||||
_repository.Context.Add(n);
|
||||
}
|
||||
|
||||
@@ -225,7 +226,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ส่งข้อตกลงการประเมิน", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ส่งข้อตกลงการประเมิน", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "backB")
|
||||
{
|
||||
@@ -234,7 +235,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "nextB")
|
||||
{
|
||||
@@ -248,7 +249,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
}
|
||||
need_noti = false;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id);
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "next0")
|
||||
{
|
||||
@@ -260,7 +261,7 @@ namespace TodoAPI2.Models
|
||||
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();
|
||||
add_history(DateTime.Now, "ส่งแบบประเมิน", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ส่งแบบประเมิน", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next1")
|
||||
{
|
||||
@@ -279,9 +280,9 @@ namespace TodoAPI2.Models
|
||||
existingEntity.status_chief_click_date = DateTime.Now;
|
||||
existingEntity.status_self_click_date = null;
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_message = "แบบประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ โดยผู้ประเมิน", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ โดยผู้ประเมิน", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next2")
|
||||
{
|
||||
@@ -291,7 +292,7 @@ namespace TodoAPI2.Models
|
||||
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();
|
||||
add_history(DateTime.Now, "ผู้ประเมินสูงสุด อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้ประเมินสูงสุด อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back2")
|
||||
{
|
||||
@@ -300,7 +301,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมิน ถูกตีกลับ โดยผู้ประเมินสูงสุด", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมิน ถูกตีกลับ โดยผู้ประเมินสูงสุด", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next3")
|
||||
{
|
||||
@@ -310,7 +311,7 @@ namespace TodoAPI2.Models
|
||||
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();
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back3")
|
||||
{
|
||||
@@ -319,7 +320,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "next4")
|
||||
{
|
||||
@@ -328,7 +329,7 @@ namespace TodoAPI2.Models
|
||||
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();
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด) อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด) อนุมัติแบบประเมินแล้ว", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
else if (model.status_mode == "back4")
|
||||
{
|
||||
@@ -337,7 +338,7 @@ namespace TodoAPI2.Models
|
||||
noti_to_employee_id = current_eva.supervisor1_id;
|
||||
noti_message = "แบบประเมินของ {0} ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_agreementView/eva_create_evaluation_detail_agreement_d2?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id);
|
||||
add_history(DateTime.Now, "แบบประเมินถูกตีกลับ โดย ผู้บังคับบัญชาการเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)", model.employee_id, existingEntity.id, 2);
|
||||
}
|
||||
|
||||
if (need_noti)
|
||||
|
||||
Reference in New Issue
Block a user