Exemplo n.º 1
0
 private IEnumerable <TenderingCriterionResponse> PrePopulateNoLotResponses(TenderingCriterionPropertyGroup propertyGroup)
 {
     foreach (var lotProp in propertyGroup.TenderingCriterionProperties.Where(p => p.TypeCode.Equals(CriterionElementType.Question) && p.ValueDataTypeCode.Equals(ResponseDataTypeCode.LotIdentifier)))
     {
         yield return(new TenderingCriterionResponse()
         {
             ID = EuComGrowId.Random(),
             ResponseValue = new ResponseValue[] {
                 new ResponseValue()
                 {
                     ResponseID = new IdentifierType("0")
                 }
             },
             ValidatedCriterionPropertyID = lotProp.ID,
         });
     }
     if (propertyGroup.SubsidiaryTenderingCriterionPropertyGroups != null)
     {
         var subEvidences = propertyGroup.SubsidiaryTenderingCriterionPropertyGroups.SelectMany(PrePopulateNoLotResponses);
         foreach (var evidence in subEvidences)
         {
             yield return(evidence);
         }
     }
 }
Exemplo n.º 2
0
        private void TranslateCriterionPropertyGroup(TenderingCriterionPropertyGroup propertyGroup)
        {
            if (propertyGroup.Description != null && propertyGroup.Description.Length > 0)
            {
                propertyGroup.Description = Translate(propertyGroup.Description);
            }

            foreach (var property in propertyGroup.TenderingCriterionProperties)
            {
                TranslateProperty(property);
            }

            if (propertyGroup.SubsidiaryTenderingCriterionPropertyGroups != null)
            {
                foreach (var subPropertyGroup in propertyGroup.SubsidiaryTenderingCriterionPropertyGroups)
                {
                    TranslateCriterionPropertyGroup(subPropertyGroup);
                }
            }
        }
 private static void AssertPropertyGroup(TenderingCriterionPropertyGroup groupSubSubSubGroup, string expectedId, string expectedPropertyGroupTypeCode)
 {
     AssertEuComGrowId(groupSubSubSubGroup.ID, expectedId);
     AssertEuComGrowCode(groupSubSubSubGroup.PropertyGroupTypeCode, expectedPropertyGroupTypeCode, "PropertyGroupType");
 }
 public static IEnumerable <TenderingCriterionPropertyGroup> DescendantGroups(this TenderingCriterionPropertyGroup tenderingCriterionPropertyGroup)
 {
     return(tenderingCriterionPropertyGroup?.SubsidiaryTenderingCriterionPropertyGroups?
            .Union(tenderingCriterionPropertyGroup?.SubsidiaryTenderingCriterionPropertyGroups?.SelectMany(g => g.DescendantGroups())) ??
            Enumerable.Empty <TenderingCriterionPropertyGroup>());
 }