+
新增
管理选课专业
设置人数
异动
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 470213e9a..de816bfd6 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
@@ -48,6 +48,21 @@ var bootstrap = function ($, learun) {
}
});
+ //新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'formadd',
+ title: '新增',
+ url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormElective',
+ width: 700,
+ height: 500,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+
+ });
+
//设置人数
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
@@ -226,7 +241,7 @@ var bootstrap = function ($, learun) {
{ label: "已报人数(预)", name: "StuNumOfApplyPre", width: 80, align: "left" },
{ label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" },
{
- label: "是否已选专业", name: "IsElectiveMajor", width: 100, align: "left", formatter: function (cellvalue,row) {
+ label: "是否已选专业", name: "IsElectiveMajor", width: 100, align: "left", formatter: function (cellvalue, row) {
if (!!row.ElectiveMajorList && row.ElectiveMajorList.length > 0) {
return "
是";
} else {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 1221cf0c7..c6bcf0abe 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -1031,6 +1031,7 @@
+
@@ -7835,6 +7836,7 @@
+
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 1341890bd..40c7f19fd 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
@@ -141,6 +141,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
+
+ public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity)
+ {
+ try
+ {
+ openLessonPlanOfElectiveService.AddForm(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
#region 扩展数据
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 4909a120f..85d78ac9c 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
@@ -50,6 +50,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
///
void SaveEntity(string keyValue, OpenLessonPlanOfElectiveEntity entity);
+ void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity);
#endregion
#region 扩展数据
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 6e76ce297..a57f4a014 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
@@ -261,6 +261,64 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+ ///
+ /// 添加选修课程、合班记录
+ ///
+ ///
+ ///
+ public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity)
+ {
+ var db = this.BaseRepository("CollegeMIS");
+ try
+ {
+ db.BeginTrans();
+ var lesson = db.FindEntity(x => x.CheckMark == true && x.LessonNo == entity.LessonNo);
+ entity.StudyScore = lesson.StudyScore;
+ entity.Create();
+ db.Insert(entity);
+ //添加选修合班记录
+ ElectiveMergeEntity emEntity = new ElectiveMergeEntity();
+ emEntity.Create();
+ emEntity.AcademicYearNo = entity.AcademicYearNo;
+ emEntity.Semester = entity.Semester;
+ emEntity.LessonId = lesson.LessonId;
+ emEntity.LessonNo = entity.LessonNo;
+ emEntity.LessonName = entity.LessonName;
+ emEntity.F_SchoolId = LoginUserInfo.Get().companyId;
+ db.Insert(emEntity);
+
+ var lessonSection = entity.LessonSection.Split(',');
+ for (int i = 0; i < lessonSection.Length; i++)
+ {
+ //合班明细
+ ElectiveMergeItemEntity emItemEntity = new ElectiveMergeItemEntity();
+ emItemEntity.Create();
+ emItemEntity.EmId = emEntity.EMId;
+ emItemEntity.OLPOEId = entity.Id;
+ emItemEntity.LessonSection = lessonSection[i];
+ emItemEntity.LessonTime = entity.LessonTime.Split(',')[i];
+ emItemEntity.EmpNo = entity.EmpNo;
+ emItemEntity.EmpName = entity.EmpName;
+ emItemEntity.ClassRoomNo = entity.ClassRoomNo;
+ emItemEntity.ClassRoomName = entity.ClassRoomName;
+ db.Insert(emItemEntity);
+ }
+
+ db.Commit();
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion