diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs index 78a9cde53..a25982bb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassInfoController.cs @@ -18,7 +18,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); - + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + #region 视图功能 /// @@ -68,6 +69,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { Pagination paginationobj = pagination.ToObject(); var data = classInfoIBLL.GetPageList(paginationobj, queryJson); + var studata = stuInfoBasicIBLL.GetAllList(); + foreach (var item in data) + { + item.StuNum = studata.Where(o => + o.DeptNo == item.DeptNo && o.MajorNo == item.MajorNo + && o.ClassNo == item.ClassNo && o.Grade == item.Grade + ).Count(); + } var jsonData = new { rows = data, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml index ece15903d..4381b907b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.cshtml @@ -29,7 +29,7 @@
学生人数*
- +
班主任
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js index 222eebbcf..dbb4686dd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassInfo/Form.js @@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { $('#ClassDiredctorNo').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_encode',text: 'f_realname' }); $('#ClassTutorNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#IsSeparate').lrDataItemSelect({ code: 'YesOrNoBit' }); - $('#ClassType').lrDataItemSelect({ code: 'ClassType' }); + $('#ClassType').lrDataItemSelect({ code: 'ClassType' }); }, initData: function () { if (!!keyValue) { @@ -53,6 +53,7 @@ var bootstrap = function ($, learun) { } }); } + $('#StuNum').val('0'); } }; // 保存数据