Ejemplo n.º 1
0
        public ProjectBasicsViewData(ProjectFirmaModels.Models.Project project,
                                     bool userHasProjectBudgetManagePermissions, TaxonomyLevel taxonomyLevel, TenantAttribute tenantAttribute)
        {
            Project = project;
            UserHasProjectBudgetManagePermissions = userHasProjectBudgetManagePermissions;
            IsNotTaxonomyLevelLeaf         = !MultiTenantHelpers.IsTaxonomyLevelLeaf();
            IsNotTaxonomyLevelLeafOrBranch = !MultiTenantHelpers.IsTaxonomyLevelBranch() && IsNotTaxonomyLevelLeaf;
            ProjectTaxonomyViewData        = new ProjectTaxonomyViewData(project, taxonomyLevel);
            TenantAttribute = tenantAttribute;

            if (tenantAttribute.EnableSecondaryProjectTaxonomyLeaf)
            {
                SecondaryTaxonomyLeaves = Project.SecondaryProjectTaxonomyLeafs.Select(x => x.TaxonomyLeaf).OrderBy(x => x.GetDisplayName());
            }
        }
Ejemplo n.º 2
0
 public ProjectBasicsViewData(Models.Project project, bool userHasProjectBudgetManagePermissions, TaxonomyLevel taxonomyLevel)
 {
     Project = project;
     UserHasProjectBudgetManagePermissions = userHasProjectBudgetManagePermissions;
     ProjectTaxonomyViewData = new ProjectTaxonomyViewData(project, taxonomyLevel);
 }