Example #1
0
        public QualificationApplicationResponse CreateEspd2_1_1ExtendedResponse(QualificationApplicationRequest request, EconomicOperatorParty economicOperator, IdentifierType identifier, Guid uuid, string espdReferenceUrl)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }
            if (identifier == null)
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            var documentReferences = request.AdditionalDocumentReferences?.ToArray() ?? new AdditionalDocumentReference[0];
            var response           = new QualificationApplicationResponse()
            {
                ID   = identifier,
                UUID = new EuComGrowId(uuid),
                QualificationApplicationTypeCode = request.QualificationApplicationTypeCode,
                ContractFolderID             = request.ContractFolderID,
                IssueDate                    = DateTime.UtcNow.Date,
                IssueTime                    = DateTime.UtcNow,
                ContractingParty             = request.ContractingParty,
                EconomicOperatorParty        = economicOperator,
                ProcurementProject           = request.ProcurementProject,
                ProcurementProjectLots       = request.ProcurementProjectLots,
                WeightingTypeCode            = request.WeightingTypeCode,
                WeightScoringMethodologyNote = request.WeightScoringMethodologyNote,
                ProcedureCode                = request.ProcedureCode,
                AdditionalDocumentReferences = documentReferences.Union(new [] { MapReferenceToEspdRequest(request, espdReferenceUrl) }).ToArray(),
                PreviousVersionID            = request.PreviousVersionID,
                EconomicOperatorGroupName    = new CodeType(),
                CopyIndicator                = false,
                UBLVersionID                 = request.UBLVersionID,
                VersionID                    = request.VersionID,
                Evidences                    = new Evidence[0],
                TenderingCriteria            = request.TenderingCriteria,
                TenderingCriterionResponses  = new TenderingCriterionResponse[] {},
            };

            var procurementHasLots = request.IsProcurementDividedIntoLots;

            if (!procurementHasLots)
            {
                PrePopulateNoLotResponses(response);
            }

            return(response);
        }
Example #2
0
 public AdditionalDocumentReference MapReferenceToEspdRequest(QualificationApplicationRequest request, string espdRequestUrl)
 {
     return(new AdditionalDocumentReference
     {
         ID = request.ID,
         UUID = request.UUID,
         DocumentTypeCode = new EuComGrowCodeType("ESPD_REQUEST")
         {
             ListID = "DocRefContentType"
         },
         IssueDate = request.IssueDate,
         IssueTime = request.IssueTime,
         Attachment = new Attachment
         {
             ExternalReference = new ExternalReference
             {
                 URI = new IdentifierType(espdRequestUrl)
             }
         },
     });
 }