รวม code ส่งเข้า ZD
This commit is contained in:
@@ -141,6 +141,7 @@ namespace TodoAPI2.Models
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_behavior
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
if (current_sum + model.weight > 100)
|
||||
@@ -156,6 +157,7 @@ namespace TodoAPI2.Models
|
||||
public eva_evaluation_behaviorViewModel Update(int id, eva_evaluation_behaviorInputModel model)
|
||||
{
|
||||
var current_sum = (from i in _repository.Context.eva_evaluation_behavior
|
||||
where i.create_evaluation_detail_id == model.create_evaluation_detail_id
|
||||
select i.weight).Sum();
|
||||
|
||||
var current_item_weight = (from i in _repository.Context.eva_evaluation_behavior
|
||||
|
||||
Reference in New Issue
Block a user