public AuditFinding Update(long id, AuditFinding entity) { CommonHelper.ValidateArgumentNotNull(entity, nameof(entity)); Helper.ValidateTodayIsAllowedUpdateDate(entity.AuditYear, entity.AuditMonth, InputAllowedInDays); var existing = AuditFindingService.Get(id); if (!IsAdmin()) { Helper.ValidateStatusIsDraft(existing.Status); } // populate audit fields PopulateAuditFields(entity, existing); entity.Id = id; return AuditFindingService.Update(entity); }
public AuditFinding Get(long id) { return AuditFindingService.Get(id); }