/// <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); }
public static bool AgreementHasCostAuthorityAssociations(this Agreement agreement) { bool hasCostAuthorityAssociations = agreement.GetReclamationCostAuthorities().Any(); return(hasCostAuthorityAssociations); }
/// <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))); }