예제 #1
0
        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);
        }
예제 #2
0
 public AuditFinding Get(long id)
 {
     return AuditFindingService.Get(id);
 }