|
|
@@ -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<NewsEntity>(a => a.F_ProgressId == parameterProcessId); |
|
|
|
if (null != newEntity) |
|
|
|
{ |
|
|
|
newEntity.F_Status = "2"; |
|
|
|
} |
|
|
|
|
|
|
|
this.BaseRepository().Update(newEntity); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
var newEntity = this.BaseRepository() |
|
|
|
.FindEntity<NewsEntity>(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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|