瀏覽代碼

修复岗位管理修改时编号没重复缺提示重复的问题

西昌缴费二期
zhangli 2 年之前
父節點
當前提交
1a860d5ef1
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. +7
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs

+ 7
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/PostController.cs 查看文件

@@ -133,10 +133,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
public ActionResult SaveForm(string keyValue, PostEntity entity)
{
var list = postIBLL.GetList(entity.F_CompanyId);
if (list.Any(a => a.F_EnCode == entity.F_EnCode))
if (string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode))
{
return Fail("岗位编号重复");
return Fail("岗位编号重复!");
}
else if (!string.IsNullOrEmpty(keyValue) && list.Any(a => a.F_EnCode == entity.F_EnCode && a.F_PostId != keyValue))
{
return Fail("岗位编号重复!");
}

postIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}


Loading…
取消
儲存