Пример #1
0
        public bool ContainsDepartment(int id)
        {
            bool result = false;

            if (SubDepartmentTemplates != null && SubDepartmentTemplates.Count > 0)
            {
                result = SubDepartmentTemplates.Any(x => x.SubDepartmentTemplate.ContainsDepartment(id));
            }
            return(result);
        }
Пример #2
0
        public bool ContainsDepartment(int id, bool state = false)
        {
            bool result = state;

            if (!state && SubDepartmentTemplates != null && SubDepartmentTemplates.Count > 0)
            {
                result = SubDepartmentTemplates.Any(x => x.SubDepartmentTemplateId == id || x.SubDepartmentTemplate.ContainsDepartment(id, state));
            }
            return(result);
        }