Browse Source

问卷

master
wxd 1 year ago
parent
commit
bb880a0cdf
  1. 10
      src/Shentun.WebPeis.Domain/QuestionAnswers/QuestionAnswerManager.cs

10
src/Shentun.WebPeis.Domain/QuestionAnswers/QuestionAnswerManager.cs

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

Loading…
Cancel
Save