Przeglądaj źródła

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

西昌缴费二期
zhangli 2 lat temu
rodzic
commit
1a860d5ef1
1 zmienionych plików z 7 dodań i 2 usunięć
  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 Wyświetl plik

@@ -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("保存成功!");
}


Ładowanie…
Anuluj
Zapisz