diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs index 2c1def844..2fb9f24e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoFreshController.cs @@ -440,17 +440,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers List stuInfoFreshEmergePeopleList = strstuInfoFreshEmergePeopleList.ToObject>(); List stuInfoFreshFamilyList = strstuInfoFreshFamilyList.ToObject>(); var kshList = stuInfoFreshIBLL.Getksh(entity.ksh); - if (!string.IsNullOrEmpty(keyValue)) + if (string.IsNullOrEmpty(keyValue)) { - kshList.Where(x => x.ID == keyValue); - if (kshList.Count() > 0) + if (kshList != null) { return Fail("保存失败,考生号不可重复"); } } else { - return Fail("保存失败,考生号不可重复"); + if (kshList != null && kshList.ID != keyValue) + { + return Fail("保存失败,考生号不可重复"); + } } stuInfoFreshIBLL.SaveEntity(keyValue, entity, stuInfoFreshEmergePeopleList, stuInfoFreshFamilyList); return Success("保存成功!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js index 5bfa2a096..bfbc1353a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Scholarshipxj/Indexzxj.js @@ -68,6 +68,7 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + var State = $('#gridtable').jfGridValue('State'); if (State != 0) { learun.alert.warning("当前项不可进行删除!"); return false; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs index fdc7b57af..09eb1f7cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs @@ -253,7 +253,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - public IEnumerable Getksh(string ksh) + public StuInfoFreshEntity Getksh(string ksh) { try { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index 422191242..3f3698ee3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs @@ -75,7 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetStuInfoFreshListByClassNo(string classNo); - IEnumerable Getksh(string ksh); + StuInfoFreshEntity Getksh(string ksh); /// /// 获取分配宿舍列表 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs index 4fed1b52f..5afca2256 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs @@ -597,11 +597,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 分页参数 /// /// - public IEnumerable Getksh(string ksh) + public StuInfoFreshEntity Getksh(string ksh) { try { - return this.BaseRepository("CollegeMIS").FindList(x => x.ksh == ksh); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.ksh == ksh); } catch (Exception ex) {