ปรับปรุงการมองเห็นของ หัวหน้าแผนก
This commit is contained in:
@@ -254,7 +254,10 @@ namespace TodoAPI2.Models
|
||||
var entity = GetEntity(model);
|
||||
entity.id = GetNewPrimaryKey();
|
||||
|
||||
|
||||
if (!entity.work_period.HasValue)
|
||||
{
|
||||
entity.work_period = 6;
|
||||
}
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
@@ -277,6 +280,11 @@ namespace TodoAPI2.Models
|
||||
existingEntity.help_org_id = model.help_org_id;
|
||||
existingEntity.remark = model.remark;
|
||||
|
||||
if (!existingEntity.work_period.HasValue)
|
||||
{
|
||||
existingEntity.work_period = 6;
|
||||
}
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user