รวม code ส่งเข้า ZD

This commit is contained in:
Nakorn Rientrakrunchai
2020-02-29 17:51:41 +07:00
parent 56393561e7
commit 9fe55ebeea
65 changed files with 5045 additions and 136 deletions

View File

@@ -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