@@ -127,7 +127,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
ScholarshipEntity entity = strEntity.ToObject<ScholarshipEntity>(); | ScholarshipEntity entity = strEntity.ToObject<ScholarshipEntity>(); | ||||
var Lists = scholarshipIBLL.NameOrCode(entity.ItemName, entity.ItemCode, entity.IsValid); | |||||
var Lists = scholarshipIBLL.NameOrCode(entity.ItemName, entity.ItemCode, entity.IsType); | |||||
if (string.IsNullOrEmpty(keyValue)) | if (string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
if (Lists != null) | if (Lists != null) | ||||
@@ -137,7 +137,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (!Lists.Id.Contains(keyValue)) | |||||
if (Lists != null && !Lists.Id.Equals(keyValue)) | |||||
{ | { | ||||
return Fail("添加失败!名称或编码已存在"); | return Fail("添加失败!名称或编码已存在"); | ||||
} | } | ||||
@@ -146,15 +146,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
var LogUserinfo = LoginUserInfo.Get(); | var LogUserinfo = LoginUserInfo.Get(); | ||||
ScholarshipxjEntity entity = strEntity.ToObject<ScholarshipxjEntity>(); | ScholarshipxjEntity entity = strEntity.ToObject<ScholarshipxjEntity>(); | ||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.State = "0"; | |||||
} | |||||
if (entity.State != "0") | if (entity.State != "0") | ||||
{ | { | ||||
entity.AuditPeople = LogUserinfo.userId; | entity.AuditPeople = LogUserinfo.userId; | ||||
entity.AuditTime = DateTime.Today; | entity.AuditTime = DateTime.Today; | ||||
} | } | ||||
scholarshipxjIBLL.SaveEntity(keyValue, entity); | scholarshipxjIBLL.SaveEntity(keyValue, entity); | ||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
#endregion | #endregion | ||||
@@ -42,6 +42,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
@@ -42,6 +42,10 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
@@ -22,7 +22,7 @@ var bootstrap = function ($, learun) { | |||||
$('#StuName').lrGirdSelect({ | $('#StuName').lrGirdSelect({ | ||||
// 字段 | // 字段 | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | ||||
selectWord: 'stuno', | |||||
selectWord: 'stuname', | |||||
value: 'stuname', | value: 'stuname', | ||||
text: 'stuname', | text: 'stuname', | ||||
headData: [ | headData: [ | ||||
@@ -25,7 +25,7 @@ var bootstrap = function ($, learun) { | |||||
$('#StuName').lrGirdSelect({ | $('#StuName').lrGirdSelect({ | ||||
// 字段 | // 字段 | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | ||||
selectWord: 'stuno', | |||||
selectWord: 'stuname', | |||||
value: 'stuname', | value: 'stuname', | ||||
text: 'stuname', | text: 'stuname', | ||||
headData: [ | headData: [ | ||||
@@ -28,7 +28,7 @@ var bootstrap = function ($, learun) { | |||||
$('#StuName').lrGirdSelect({ | $('#StuName').lrGirdSelect({ | ||||
// 字段 | // 字段 | ||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', | ||||
selectWord: 'stuno', | |||||
selectWord: 'stuname', | |||||
value: 'stuname', | value: 'stuname', | ||||
text: 'stuname', | text: 'stuname', | ||||
headData: [ | headData: [ | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2021-09-27 10:33 | |||||
/// 描 述:学金类型 | |||||
/// </summary> | |||||
public class Scholarshipxj : EntityTypeConfiguration<ScholarshipxjEntity> | |||||
{ | |||||
public Scholarshipxj() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("SCHOLARSHIPAUDIT"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -88,6 +88,7 @@ | |||||
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" /> | <Compile Include="EducationalAdministration\PracticeBaseMap.cs" /> | ||||
<Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" /> | <Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" /> | ||||
<Compile Include="EducationalAdministration\R_EnterSchoolMap.cs" /> | <Compile Include="EducationalAdministration\R_EnterSchoolMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Scholarshipxj.cs" /> | |||||
<Compile Include="EducationalAdministration\ScholarshipMap.cs" /> | <Compile Include="EducationalAdministration\ScholarshipMap.cs" /> | ||||
<Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | <Compile Include="EducationalAdministration\ScoreStatisticsMap.cs" /> | ||||
<Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | <Compile Include="EducationalAdministration\StuCancelLeaveManagementMap.cs" /> | ||||
@@ -187,7 +187,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => | return this.BaseRepository("CollegeMIS").FindEntity<ScholarshipEntity>(x => | ||||
(x.ItemCode == ItemCode || x.ItemName == ItemName) && x.IsValid == IsType && x.IsDel == 0); | |||||
(x.ItemCode == ItemCode || x.ItemName == ItemName) && x.IsType == IsType && x.IsDel == 0); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||