diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs index 8c7ed29eb..0749d2131 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs @@ -175,30 +175,36 @@ namespace Learun.Application.OA public void ChangeStatusByProcessId(string parameterProcessId, int status) { - if (status == 2) + try { - try - { - var newEntity = this.BaseRepository() - .FindEntity(a => a.F_ProgressId == parameterProcessId); - if (null != newEntity) - { - newEntity.F_Status = "2"; - } - this.BaseRepository().Update(newEntity); - } - catch (Exception ex) + var newEntity = this.BaseRepository() + .FindEntity(a => a.F_ProgressId == parameterProcessId); + if (null != newEntity) { - if (ex is ExceptionEx) + if (status == 2) { - throw; + + newEntity.F_Status = "2"; } else { - throw ExceptionEx.ThrowServiceException(ex); + newEntity.F_Status = "0"; } } + + this.BaseRepository().Update(newEntity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } } } }