コード例 #1
0
 internal static WorkItemVerificationResult VerifyDocumentsAgreement(WorkItem leadTask)
 {
     string visionAgreementState = leadTask.VisionAgreementState();
     string hlaAgeementState = leadTask.HlaAgreementState();
     if (visionAgreementState == DocumentAgreementState.No || visionAgreementState == DocumentAgreementState.Waiting)
     {
         return new WorkItemVerificationResult
         {
             Result = VerificationResult.Error,
             Messages = new List<string>(1) { Messages.BadVisionAgreemntState(visionAgreementState) },
             AddidtionalData = visionAgreementState,
         };
     }
     if (hlaAgeementState == DocumentAgreementState.No || hlaAgeementState == DocumentAgreementState.Waiting)
     {
         return new WorkItemVerificationResult
         {
             Result = VerificationResult.Error,
             Messages = new List<string>(1) { Messages.BadHlaAgreemntState(hlaAgeementState) },
             AddidtionalData = hlaAgeementState,
         };
     }
     return new WorkItemVerificationResult { Result = VerificationResult.Ok };
 }