public ActionResult SaveForm(string keyValue, string strEntity) { tc_CredentialsEntity entity = strEntity.ToObject <tc_CredentialsEntity>(); credentialsIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } return(Success("保存成功!")); }
public ActionResult SyncToCredentials(string keyValue) { var entity = personnelTrainIBLL.Gettc_PersonnelTrainEntity(keyValue); if (entity.F_TrainStatus != 5) { return(Fail("未取得证书,不能同步到人才证书库")); } var certEntity = credentialsIBLL.Gettc_CredentialsEntity(keyValue, entity.F_CertType, entity.F_MajorType); if (certEntity != null) { return(Fail("已经同步到人才证书库,无需再次同步!")); } tc_CredentialsEntity info = new tc_CredentialsEntity { F_UserName = entity.F_UserName, F_IDCardNo = entity.F_UserName, F_PersonId = entity.F_PersonId, F_CertType = entity.F_CertType, F_MajorType = entity.F_MajorType, F_Major = entity.F_Major, F_CertOrganization = entity.F_CertOrganization, F_CertDateBegin = entity.F_CertDateBegin, F_CertDateEnd = entity.F_CertDateEnd, F_CertStatus = entity.F_CertStatus, F_CertStyle = entity.F_CertStyle, F_PracticeStyle = 1, //默认无 F_PracticeSealStyle = 1, //默认无 F_CheckInTime = System.DateTime.Now }; credentialsIBLL.SaveEntity("", info); entity.F_TrainStatus = 6; personnelTrainIBLL.SaveEntity(entity.F_PersonnelTrainId, entity); return(Success("同步成功!")); }