รวม code แก้ไข OP 3138, 3141, 2736, 2654
This commit is contained in:
@@ -46,5 +46,20 @@ namespace TodoAPI2.Models
|
||||
|
||||
[MaxLength(255)]
|
||||
public string target_score5 { get; set; }
|
||||
|
||||
public string behavior_fix
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(behavior))
|
||||
{
|
||||
if (behavior.Split(' ').Count() > 1)
|
||||
{
|
||||
return behavior.Replace(behavior.Split(' ')[0], "");
|
||||
}
|
||||
}
|
||||
return behavior;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,13 +57,23 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
|
||||
if(entity.behavior != entity.behavior_fix)
|
||||
{
|
||||
entity.behavior = entity.behavior_fix;
|
||||
}
|
||||
|
||||
return GetDto(entity);
|
||||
}
|
||||
public eva_evaluation_behaviorWithSelectionViewModel GetWithSelection(int id)
|
||||
{
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<eva_evaluation_behaviorWithSelectionViewModel>(entity);
|
||||
|
||||
if (entity.behavior != entity.behavior_fix)
|
||||
{
|
||||
entity.behavior = entity.behavior_fix;
|
||||
}
|
||||
|
||||
var i = Mapper.Map<eva_evaluation_behaviorWithSelectionViewModel>(entity);
|
||||
|
||||
return i;
|
||||
}
|
||||
@@ -101,7 +111,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
id = m_eva_evaluation_behavior.id,
|
||||
create_evaluation_detail_id = m_eva_evaluation_behavior.create_evaluation_detail_id,
|
||||
behavior = m_eva_evaluation_behavior.behavior,
|
||||
behavior = m_eva_evaluation_behavior.behavior_fix,
|
||||
weight = m_eva_evaluation_behavior.weight,
|
||||
target_score1 = m_eva_evaluation_behavior.target_score1,
|
||||
target_score2 = m_eva_evaluation_behavior.target_score2,
|
||||
|
||||
@@ -32,5 +32,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
public int? create_evaluation_detail_id_eva_create_evaluation_detail_create_evaluation_id { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user