public bool UpdateBatchProcess(BatchProcessEntity batchProcessEntity) { _context.Configuration.AutoDetectChangesEnabled = false; try { var proc = _context.TB_C_PROCESS.FirstOrDefault(x => x.PROCESS_ID == batchProcessEntity.ProcessId); if (proc != null) { proc.STATUS = batchProcessEntity.Status; proc.START_TIME = batchProcessEntity.StartTime; proc.END_TIME = batchProcessEntity.EndTime; proc.PROCESS_TIME = batchProcessEntity.ProcessTime; proc.DETAIL = batchProcessEntity.Detail; SetEntryStateModified(proc); this.Save(); } else { Logger.ErrorFormat("PROCESS_ID: {0} does not exist", batchProcessEntity.ProcessId); } return(true); } catch (Exception ex) { Logger.Error("Exception occur:\n", ex); } finally { _context.Configuration.AutoDetectChangesEnabled = true; } return(false); }
public bool UpdateBatchProcess(BatchProcessEntity batchProcessEntity) { _auditLogDataAccess = new AuditLogDataAccess(_context); return(_auditLogDataAccess.UpdateBatchProcess(batchProcessEntity)); }