@@ -38,11 +38,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 导入 | |||||
/// 导入/清空数据 | |||||
/// </summary> | /// </summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult FormImport() | |||||
public ActionResult FormYearSemester() | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
@@ -104,6 +104,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
exam_ExamLessonIBLL.DeleteEntity(keyValue); | exam_ExamLessonIBLL.DeleteEntity(keyValue); | ||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 导入开课计划 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester); | |||||
return Success("导入" + res + "条数据!"); | |||||
} | |||||
/// <summary> | |||||
/// 按条件清空数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); | |||||
return Success("清空" + res + "条数据!"); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
@@ -116,6 +139,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | ||||
//判断课程编号有无重复 | |||||
var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo); | |||||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
return Fail("课程编号重复!"); | |||||
} | |||||
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId) | |||||
{ | |||||
return Fail("课程编号重复!"); | |||||
} | |||||
exam_ExamLessonIBLL.SaveEntity(keyValue, entity); | exam_ExamLessonIBLL.SaveEntity(keyValue, entity); | ||||
if (string.IsNullOrEmpty(keyValue)) | if (string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
@@ -30,7 +30,7 @@ var bootstrap = function ($, learun) { | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
$('#ELEnabled').lrRadioCheckbox({ | $('#ELEnabled').lrRadioCheckbox({ | ||||
type: 'radio', | type: 'radio', | ||||
code: 'YesOrNoBit', | code: 'YesOrNoBit', | ||||
@@ -41,7 +41,7 @@ var bootstrap = function ($, learun) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
@@ -1,71 +0,0 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200, | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ELEnabled').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -12,4 +12,4 @@ | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | <div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormImport.js") | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamLesson/FormYearSemester.js") |
@@ -0,0 +1,83 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var type = request('type'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
//page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200, | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
//if (!!keyValue) { | |||||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/GetFormData?keyValue=' + keyValue, function (data) { | |||||
// for (var id in data) { | |||||
// if (!!data[id].length && data[id].length > 0) { | |||||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
// } | |||||
// else { | |||||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
// } | |||||
// } | |||||
// }); | |||||
//} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||||
Semester: $('#Semester').lrselectGet() | |||||
}; | |||||
//从开课计划导入 | |||||
if (type == 1) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/Import', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} else if (type == 2) { | |||||
//按条件清空数据 | |||||
learun.layerConfirm('是否确认清空!', function (res) { | |||||
if (res) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/DeleteWhere', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -45,6 +45,7 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | <a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | ||||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -50,6 +50,10 @@ var bootstrap = function ($, learun) { | |||||
// 编辑 | // 编辑 | ||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ELId'); | var keyValue = $('#gridtable').jfGridValue('ELId'); | ||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return false; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
@@ -69,7 +73,7 @@ var bootstrap = function ($, learun) { | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form_import', | id: 'form_import', | ||||
title: '导入', | title: '导入', | ||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormImport', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=1', | |||||
width: 500, | width: 500, | ||||
height: 300, | height: 300, | ||||
btn: ['一键导入', '关闭'], | btn: ['一键导入', '关闭'], | ||||
@@ -78,6 +82,21 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
// 按条件清空数据 | |||||
$('#lr_emptyWhere').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form_empty', | |||||
title: '清空数据', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/FormYearSemester?type=2', | |||||
width: 500, | |||||
height: 300, | |||||
btn: ['清空', '关闭'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ELId'); | var keyValue = $('#gridtable').jfGridValue('ELId'); | ||||
@@ -140,7 +159,7 @@ var bootstrap = function ($, learun) { | |||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | ||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | { label: "学期", name: "Semester", width: 100, align: "left" }, | ||||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, | ||||
{ label: "课程名称", name: "LessonName", width: 100, align: "left" }, | |||||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||||
//{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | //{ label: "排序号", name: "ELOrder", width: 100, align: "left" }, | ||||
{ | { | ||||
label: "是否启用", name: "ELEnabled", width: 100, align: "left", | label: "是否启用", name: "ELEnabled", width: 100, align: "left", | ||||
@@ -152,8 +171,7 @@ var bootstrap = function ($, learun) { | |||||
mainId: 'ELId', | mainId: 'ELId', | ||||
isMultiselect: true, | isMultiselect: true, | ||||
isPage: true, | isPage: true, | ||||
sidx: 'ELOrder', | |||||
sord: 'ASC' | |||||
sidx: 'AcademicYearNo desc,Semester desc,ELOrder asc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -991,7 +991,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" /> | ||||
@@ -7613,7 +7613,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -67,6 +67,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamLessonService.GetEntityByLessonNo(lessonNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -143,6 +162,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public int Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamLessonService.Import(AcademicYearNo, Semester); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamLessonService.DeleteWhere(AcademicYearNo, Semester); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); | Exam_ExamLessonEntity GetExam_ExamLessonEntity(string keyValue); | ||||
Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -48,6 +49,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity(string keyValue, Exam_ExamLessonEntity entity); | void SaveEntity(string keyValue, Exam_ExamLessonEntity entity); | ||||
int Import(string AcademicYearNo, string Semester); | |||||
int DeleteWhere(string AcademicYearNo, string Semester); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -104,6 +104,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取Exam_ExamLesson表实体数据 | |||||
/// </summary> | |||||
/// <param name="lessonNo"></param> | |||||
/// <returns></returns> | |||||
public Exam_ExamLessonEntity GetEntityByLessonNo(string lessonNo) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamLessonEntity>(x => x.LessonNo == lessonNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -116,7 +139,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<Exam_ExamLessonEntity>(t => t.ELId == keyValue); | |||||
if (keyValue.Contains(",")) | |||||
{ | |||||
keyValue = string.Join("','", keyValue.Split(',')); | |||||
} | |||||
string sql = $"delete Exam_ExamLesson where ELId in ('{keyValue}')"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -194,6 +223,66 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 导入 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public int Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $@"insert into Exam_ExamLesson([ELId] | |||||
,[AcademicYearNo] | |||||
,[Semester] | |||||
,[LessonName] | |||||
,[LessonNo] | |||||
,[ELOrder] | |||||
,[ELEnabled]) | |||||
select NEWID(),AcademicYearNo,Semester,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||||
"; | |||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 清空数据 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"delete Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||