Esempio n. 1
0
        /// <summary>
        /// Determines whether or not a tolling event is an extension for a post election audit report.
        /// </summary>
        /// <param name="evt">The <see cref="ITollingEvent"/> to analyze.</param>
        /// <param name="report">The post election audit report to compare against.</param>
        /// <returns>true if the tolling event is an extension for the post election audit report specified; otherwise, false.</returns>
        public static bool IsExtensionFor(this ITollingEvent evt, AuditReportBase report)
        {
            // check basic properties
            if (report == null || evt == null || !evt.IsExtension || evt.TollingLetter == null)
            {
                return(false);
            }

            // check tolling source and, where applicable, reference event number
            switch (report.AuditReportType)
            {
            case AuditReportType.InitialDocumentationRequest:
                return(evt.TollingLetter.HasIdrScope);

            case AuditReportType.IdrInadequateResponse:
            case AuditReportType.IdrAdditionalInadequateResponse:
                IdrInadequateEvent idrInadequate = report as IdrInadequateEvent;
                return(idrInadequate != null && idrInadequate.TollingEventNumber == evt.ReferenceEventNumber && evt.TollingLetter.HasIdrInadequateScope);

            case AuditReportType.DraftAuditReport:
                return(evt.TollingLetter.HasDarScope);

            case AuditReportType.DarInadequateResponse:
            case AuditReportType.DarAdditionalInadequateResponse:
                DarInadequateEvent darInadequate = report as DarInadequateEvent;
                return(darInadequate != null && darInadequate.TollingEventNumber == evt.ReferenceEventNumber && evt.TollingLetter.HasDarInadequateScope);

            default:
                return(false);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a due date for a response to an Initial Documentation Request.
 /// </summary>
 /// <param name="deadline">The due date for the response.</param>
 /// <param name="source">The corresponding initial documentation request source.</param>
 /// <exception cref="ArgumentNullException"><paramref name="source"/> is null or has a null statement.</exception>
 /// <exception cref="ArgumentException"><paramref name="source"/> has not been sent.</exception>
 public IdrResponseDeadline(DateTime deadline, AuditReportBase source)
     : base(deadline, CPCalendarItemType.IdrResponseDeadline)
 {
     if (source == null)
     {
         throw new ArgumentNullException("source", "Source Initial Documentation Request cannot be null.");
     }
     this.ReviewSentDate = source.SentDate;
     this.Title          = Properties.CPCalendarItemResources.IdrRDTitle;
     this.Description    = Properties.CPCalendarItemResources.IdrRDDescription;
 }