Commit 2b1af9b0 authored by 吴春's avatar 吴春

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents e34d7a8a 722180a2
...@@ -585,16 +585,26 @@ namespace Edu.Module.Exam ...@@ -585,16 +585,26 @@ namespace Edu.Module.Exam
/// <param name="QuestionTypeId">问题类型编号</param> /// <param name="QuestionTypeId">问题类型编号</param>
/// <returns></returns> /// <returns></returns>
[TransactionCallHandler] [TransactionCallHandler]
public bool RemoveExamnationGroupModule(int GId, int QuestionTypeId) public bool RemoveExamnationGroupModule(int GId, int QuestionTypeId,int PaperId)
{ {
var flag = true; var flag = true;
if (GId > 0) if (GId > 0)
{ {
flag = examination_GroupRepository.DeleteOne(new WhereHelper(nameof(RB_Examination_Group_ViewModel.GId), GId)); List<WhereHelper> gList = new List<WhereHelper>()
{
new WhereHelper(nameof(RB_Examination_Group_ViewModel.GId), GId),
new WhereHelper(nameof(RB_Examination_Group_ViewModel.PaperId), PaperId),
};
flag = examination_GroupRepository.Delete(gList);
} }
if (flag && QuestionTypeId > 0) if (flag && QuestionTypeId > 0)
{ {
examination_DetailsRepository.DeleteOne(new WhereHelper(nameof(RB_Examination_Details_ViewModel.QuestionTypeId), QuestionTypeId)); List<WhereHelper> dList = new List<WhereHelper>()
{
new WhereHelper(nameof(RB_Examination_Details_ViewModel.QuestionTypeId), QuestionTypeId),
new WhereHelper(nameof(RB_Examination_Details_ViewModel.PaperId), PaperId),
};
examination_DetailsRepository.Delete(dList);
} }
return flag; return flag;
} }
......
...@@ -356,7 +356,8 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -356,7 +356,8 @@ namespace Edu.WebApi.Controllers.Exam
{ {
var GId = base.ParmJObj.GetInt("GId"); var GId = base.ParmJObj.GetInt("GId");
var QuestionTypeId = base.ParmJObj.GetInt("QuestionTypeId"); var QuestionTypeId = base.ParmJObj.GetInt("QuestionTypeId");
var flag = paperModule.RemoveExamnationGroupModule(GId, QuestionTypeId); var PaperId = base.ParmJObj.GetInt("PaperId");
var flag = paperModule.RemoveExamnationGroupModule(GId, QuestionTypeId, PaperId);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment