diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs index 33b528bfe..bc0e21325 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EvaluationTeach/Controllers/Eval_MainController.cs @@ -249,6 +249,8 @@ namespace Learun.Application.Web.Areas.EvaluationTeach.Controllers [AjaxOnly] public ActionResult SubmitForm(string keyValue) { + if (ask_MainIBLL.HasEnabled(keyValue)) + return Fail("操作失败!仅允许启用一条数据。"); ask_MainIBLL.ChangeFormStatus(keyValue, true); return Success("操作成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs index 0871ff27e..1eeb3c705 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainBLL.cs @@ -86,11 +86,11 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach } } - public Eval_MainEntity GetEval_MainEntityAndQuestionsResult(string keyValue, string stuno,string EmpNo,string LessonNo) + public Eval_MainEntity GetEval_MainEntityAndQuestionsResult(string keyValue, string stuno, string EmpNo, string LessonNo) { try { - return ask_MainService.GetEval_MainEntityAndQuestionsResult(keyValue, stuno,EmpNo, LessonNo); + return ask_MainService.GetEval_MainEntityAndQuestionsResult(keyValue, stuno, EmpNo, LessonNo); } catch (Exception ex) { @@ -378,6 +378,25 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach } } + public bool HasEnabled(string keyValue) + { + try + { + return ask_MainService.HasEnabled(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs index 15d1e07b9..e92005214 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainIBLL.cs @@ -80,5 +80,6 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach List GetMuiltyResults(string vid, string LessonNo, string EmpNo, string StuNo,string QID); void DeleteQestionResult(string RID); + bool HasEnabled(string keyValue); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs index 6672147d5..f5ab9e4e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs @@ -689,5 +689,29 @@ where 1=1 and iscore>100 order by IScore desc"; } + public bool HasEnabled(string keyValue) + { + try + { + bool result = false; + var list = BaseRepository().FindList("select * from Eval_Main where Status=1 and vid<>'" + keyValue + "'"); + if (list.Count() > 0) + { + result = true; + } + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue new file mode 100644 index 000000000..1422b7176 --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/EvaluationTeach/single.vue @@ -0,0 +1,292 @@ + + + + + \ No newline at end of file