|
|
@@ -6,6 +6,7 @@ using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Web; |
|
|
|
using System.Web.Mvc; |
|
|
|
using Learun.Application.Organization; |
|
|
|
|
|
|
|
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
{ |
|
|
@@ -13,6 +14,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
{ |
|
|
|
// GET: EducationalAdministration/EmpInfoEnternal |
|
|
|
DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); |
|
|
|
UserIBLL userIBLL = new UserBLL(); |
|
|
|
EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); |
|
|
|
AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); |
|
|
|
public ActionResult FormAdd() |
|
|
@@ -96,9 +98,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
public ActionResult SaveForm(string keyValue, string strEntity) |
|
|
|
{ |
|
|
|
EmpInfoEntity entity = strEntity.ToObject<EmpInfoEntity>(); |
|
|
|
if (!string.IsNullOrEmpty(entity.EmpNo)) |
|
|
|
{ |
|
|
|
var empentity = empInfoIBLL.GetEmpInfoEntityByEmpNo(entity.EmpNo); |
|
|
|
var userEntity = userIBLL.GetEntityByAccount(entity.EmpNo); |
|
|
|
if (null != empentity || null != userEntity) |
|
|
|
{ |
|
|
|
return Success(new { data = entity, info = "有重复的职工编号" }); |
|
|
|
} |
|
|
|
} |
|
|
|
entity.EmpId = Guid.NewGuid().ToString(); |
|
|
|
empInfoIBLL.SaveEntity(keyValue, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
return Success(new { data = entity, info = "保存成功" }); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|