From e22b598f4e090f9008f3fc4a4949f3ad4ed8ae79 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 23 May 2022 11:09:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=20=20=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E9=80=89=E8=AF=BE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenLessonPlanOfElectiveController.cs | 9 +++++++++ .../MergeIndex.cshtml | 3 ++- .../OpenLessonPlanOfElective/MergeIndex.js | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index 294664cc0..78252d0e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -764,6 +764,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("报名成功"); } + + /// + /// 初始化学生选课记录 + /// + /// + public ActionResult InitStuMajor() + { + return Success("初始化成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml index 569f8f870..7fe801d6b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml @@ -35,8 +35,9 @@
-  新增 + @* 新增*@  管理选课专业 + @* 初始化学生选课记录*@  设置人数  异动
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index de816bfd6..7aa1b0f41 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -171,6 +171,25 @@ var bootstrap = function ($, learun) { }); } }); + + //初始化学生选课记录 + $('#lr_stuMajor').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + //选课专业 + var ElectiveMajorList = $('#gridtable').jfGridValue('ElectiveMajorList'); + if (ElectiveMajorList.length <= 0) { + return learun.alert.warning("请先管理选课专业!"); + } + learun.layerConfirm('是否确认初始化学生选课记录!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/InitStuMajor', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { From db7be2b000df24727c82188edec2785acd5020fe Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 23 May 2022 15:00:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E7=A8=8B=20?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=AD=A6=E7=94=9F=E9=80=89=E8=AF=BE?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenLessonPlanOfElectiveController.cs | 5 ++-- .../MergeIndex.cshtml | 2 +- .../OpenLessonPlanOfElective/MergeIndex.js | 4 ++-- .../OpenLessonPlanOfElectiveBLL.cs | 18 +++++++++++++++ .../OpenLessonPlanOfElectiveIBLL.cs | 2 ++ .../OpenLessonPlanOfElectiveService.cs | 23 +++++++++++++++++++ 6 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index 78252d0e9..a2ff405f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -769,9 +769,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers /// 初始化学生选课记录 /// /// - public ActionResult InitStuMajor() + public ActionResult InitStuSelectLesson(string keyvalue) { - return Success("初始化成功!"); + openLessonPlanOfElectiveIBLL.InitStuSelectLesson(keyvalue); + return Success("操作成功!"); } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml index 7fe801d6b..df2d59172 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.cshtml @@ -37,7 +37,7 @@
@* 新增*@  管理选课专业 - @* 初始化学生选课记录*@ + @* 初始化学生选课记录*@  设置人数  异动
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index 7aa1b0f41..81d1e9311 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -173,7 +173,7 @@ var bootstrap = function ($, learun) { }); //初始化学生选课记录 - $('#lr_stuMajor').on('click', function () { + $('#lr_initStuSelectLesson').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { //选课专业 @@ -183,7 +183,7 @@ var bootstrap = function ($, learun) { } learun.layerConfirm('是否确认初始化学生选课记录!', function (res) { if (res) { - learun.postForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/InitStuMajor', { keyValue: keyValue }, function () { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/InitStuSelectLesson', { keyValue: keyValue }, function () { refreshGirdData(); }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs index 40c7f19fd..cda5ed42b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs @@ -230,6 +230,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void InitStuSelectLesson(string keyvalue) + { + try + { + openLessonPlanOfElectiveService.InitStuSelectLesson(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/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs index 85d78ac9c..ee3178329 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs @@ -69,6 +69,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DoElectiveChange(OpenLessonPlanOfElectiveChangeEntity entity); + + void InitStuSelectLesson(string keyvalue); #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index a57f4a014..43d2a0eb2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -510,6 +510,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化学生选课情况 + /// + /// + public void InitStuSelectLesson(string keyvalue) + { + try + { + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } }