Ejemplo n.º 1
0
        private string GetRelatedAgreementIDsAsCommaDelimitedString()
        {
            var agreementNumbersList = CostAuthorityAgreementSimplesList
                                       .Select(x => x.AgreementNumber.ToString()).ToList();

            return($" (Agreement Numbers: {string.Join(", ", agreementNumbersList)})");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for building a new simple object with the POCO class
 /// </summary>
 public CostAuthoritySimple(CostAuthority costAuthority)
     : this()
 {
     CostAuthorityID = costAuthority.CostAuthorityID;
     CostAuthorityAgreementSimplesList = costAuthority.AgreementCostAuthorities.Select(x => new AgreementSimple(x.Agreement)).ToList();
     CostAuthorityDisplayName          = $"{costAuthority.CostAuthorityWorkBreakdownStructure} - {costAuthority.AccountStructureDescription}";
     CountOfRelatedAgreements          = CostAuthorityAgreementSimplesList.Count;
     CostAuthorityDropdownDisplayName  =
         $"{costAuthority.CostAuthorityWorkBreakdownStructure} - {costAuthority.AccountStructureDescription}{(CostAuthorityAgreementSimplesList.Any() ? GetRelatedAgreementIDsAsCommaDelimitedString() : "")}";
 }