|
|
|
@ -101,11 +101,11 @@ namespace Shentun.WebPeis.QuestionAnswers |
|
|
|
public async Task CheckAndDeleteAsync(Guid QuestionAnswerId) |
|
|
|
{ |
|
|
|
|
|
|
|
var questionRegisterAnswerEnt = await _questionRegisterAnswerRepository.FirstOrDefaultAsync(m => m.QuestionAnswerId == QuestionAnswerId); |
|
|
|
if (questionRegisterAnswerEnt != null) |
|
|
|
{ |
|
|
|
throw new UserFriendlyException($"问卷答案已被人员登记使用,不能删除"); |
|
|
|
} |
|
|
|
//var questionRegisterAnswerEnt = await _questionRegisterAnswerRepository.FirstOrDefaultAsync(m => m.QuestionAnswerId == QuestionAnswerId);
|
|
|
|
//if (questionRegisterAnswerEnt != null)
|
|
|
|
//{
|
|
|
|
// throw new UserFriendlyException($"问卷答案已被人员登记使用,不能删除");
|
|
|
|
//}
|
|
|
|
|
|
|
|
await _questionAnswerRepository.DeleteAsync(d => d.QuestionAnswerId == QuestionAnswerId); |
|
|
|
|
|
|
|
|