Пример #1
0
        public AuditResult Run2()
        {
            AuditResult result = new AuditResult();

            result.Status  = AuditStatusEnum.OK;
            result.Message = null;

            foreach (Audit audit in this)
            {
                audit.ActionRequired = false;
                audit.Message        = new StringBuilder();
                audit.Run();

                if (audit.Status == AuditStatusEnum.Failure)
                {
                    result.Status   = AuditStatusEnum.Failure;
                    result.Message += audit.Message;
                    break;
                }
                else if (audit.Status == AuditStatusEnum.Warning)
                {
                    result.Status   = AuditStatusEnum.Warning;
                    result.Message += audit.Message;
                    break;
                }
            }

            return(result);
        }
 public override AuditResult IsOkToFinalize(AccessionOrder accessionOrder)
 {
     YellowstonePathology.Business.Audit.Model.AuditResult result = new AuditResult();
     if (this.Final == true)
     {
         result.Status = AuditStatusEnum.Failure;
         result.Message = "This case cannot be finalized because it is already finalized.";
     }
     else
     {
         YellowstonePathology.Business.Audit.Model.ComprehensiveColonCancerProfileFinalAudit comprehensiveColonCancerProfileFinalAudit = new ComprehensiveColonCancerProfileFinalAudit(accessionOrder);
         comprehensiveColonCancerProfileFinalAudit.Run();
         result.Status = comprehensiveColonCancerProfileFinalAudit.Status;
         result.Message = comprehensiveColonCancerProfileFinalAudit.Message.ToString();
     }
     return result;
 }