コード例 #1
0
        /// <summary>
        /// Get the Projects associated with this Agreement
        /// </summary>
        /// <param name="agreement"></param>
        /// <returns></returns>
        public static List <Project> GetAssociatedProjects(this Agreement agreement)
        {
            var costAuthorities = agreement.GetReclamationCostAuthorities();
            var projects        = costAuthorities.SelectMany(x => x.GetAssociatedProjects()).Distinct().ToList();

            return(projects);
        }
コード例 #2
0
        public static bool AgreementHasCostAuthorityAssociations(this Agreement agreement)
        {
            bool hasCostAuthorityAssociations = agreement.GetReclamationCostAuthorities().Any();

            return(hasCostAuthorityAssociations);
        }
コード例 #3
0
        /// <summary>
        /// Convenience accessor for Reclamation Cost Authorities.
        /// </summary>
        public static string GetReclamationWorkBreakdownStructuresAsCommaDelimitedString(this Agreement agreement)
        {
            var costAuthorities = agreement.GetReclamationCostAuthorities();

            return(string.Join(", ", costAuthorities.Select(ca => ca.CostAuthorityWorkBreakdownStructure)));
        }