แก้ไข OP 2651
This commit is contained in:
@@ -202,10 +202,14 @@ namespace TodoAPI2.Models
|
||||
where k.id == existingEntity.create_evaluation_detail_id
|
||||
select k).FirstOrDefault();
|
||||
|
||||
var current_eva = (from k in _repository.Context.eva_create_evaluation
|
||||
where k.id == current_detail.create_evaluation_id
|
||||
select k).FirstOrDefault();
|
||||
|
||||
if (current_detail.status_chief == "Y")
|
||||
{
|
||||
throw new Exception("ผู้ประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
|
||||
}
|
||||
}
|
||||
|
||||
if (existingEntity != null)
|
||||
{
|
||||
@@ -214,8 +218,18 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.weight = i.weight;
|
||||
existingEntity.score = i.score;
|
||||
existingEntity.sumary = i.sumary;
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
|
||||
if(current_eva.employee_id == current_detail.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
{
|
||||
existingEntity.score2 = i.score;
|
||||
existingEntity.sumary2 = i.sumary;
|
||||
}
|
||||
//else // เป็นคนละคน (แต่ดึงค่า default ไปใส่ให้)
|
||||
//{
|
||||
// existingEntity.score2 = i.score;
|
||||
// existingEntity.sumary2 = i.sumary;
|
||||
//}
|
||||
|
||||
existingEntity.target_score1 = i.target_score1;
|
||||
existingEntity.target_score2 = i.target_score2;
|
||||
existingEntity.target_score3 = i.target_score3;
|
||||
|
||||
Reference in New Issue
Block a user