Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
1a85dbf81a
|
@ -47,8 +47,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Type="radio",
|
Type="radio",
|
||||||
QuestionGenre=TableQuestionType.Dictionary,
|
QuestionGenre=TableQuestionType.Dictionary,
|
||||||
DataSource=DataSources.ManualEntry,
|
DataSource=DataSources.ManualEntry,
|
||||||
ShowQuestion=ShowQuestion.Show
|
ShowQuestion=ShowQuestion.Show,
|
||||||
|
|
||||||
|
|
||||||
|
IsAdditional=true
|
||||||
} }
|
} }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -610,6 +610,13 @@ namespace IRaCIS.Core.Application
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput> SetTrialCriterionAdditionalAssessment(List<AddOrUpdateTrialCriterionAdditional> updateList)
|
public async Task<IResponseOutput> SetTrialCriterionAdditionalAssessment(List<AddOrUpdateTrialCriterionAdditional> updateList)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (updateList.Count == 0)
|
||||||
|
{
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
var trialId= _readingQuestionTrialRepository.Where(t=>t.ReadingQuestionCriterionTrialId==updateList.First().TrialReadingCriterionId).Select(t=>t.TrialId).FirstOrDefault();
|
||||||
foreach (var updateItem in updateList)
|
foreach (var updateItem in updateList)
|
||||||
{
|
{
|
||||||
if (updateItem.IsSelected == true)
|
if (updateItem.IsSelected == true)
|
||||||
|
@ -622,6 +629,9 @@ namespace IRaCIS.Core.Application
|
||||||
{
|
{
|
||||||
foreach (var question in addType.AdditionalQuestionList)
|
foreach (var question in addType.AdditionalQuestionList)
|
||||||
{
|
{
|
||||||
|
question.ReadingQuestionCriterionTrialId = updateItem.TrialReadingCriterionId;
|
||||||
|
question.TrialId = trialId;
|
||||||
|
|
||||||
await _readingQuestionTrialRepository.AddAsync(question);
|
await _readingQuestionTrialRepository.AddAsync(question);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue