/// <summary> /// Получить нерасходуемые ресурсы /// </summary> /// <param name="ro"></param> /// <returns></returns> static public IEnumerable <UsedResource> GetLinkedUsedNonConsumableResources(ReferenceObject ro, bool IsOnlyPlanned) { List <ReferenceObject> resources = ro.GetObjects(ProjectManagementWork.PM_link_UsedResources_GUID) .Where(res => (res.Class == References.Class_NonConsumableResources)).ToList(); List <UsedResource> NonConsumableResources = new List <UsedResource>(); //Console.WriteLine("IsOnlyPlanned " + IsOnlyPlanned); foreach (var res in resources) { UsedResource usedResource = new UsedResource(res); if (IsOnlyPlanned) { if (usedResource.IsPlanned) { NonConsumableResources.Add(usedResource); } } else { NonConsumableResources.Add(usedResource); } } return(NonConsumableResources); }
/// <summary> /// Все пользователи имеющие доступ (участники + доп.доступ) /// </summary> /// <returns></returns> public IEnumerable <ReferenceObject> GetUsersForAccess() { List <ReferenceObject> result = new List <ReferenceObject>(); result.AddRange(this.SignedTo); ReferenceObject performer = ReferenceObject.GetObject(RCC_link_Performer_GUID); if (performer != null) { result.Add(performer); } result.AddRange(ReferenceObject.GetObjects(RCC_link_ExtraAccess_GUID)); return(result.Distinct().ToList()); }
public IEnumerable <ReferenceObject> GetAllLinkedFiles() { FileType fileType = (new FileReference(ReferenceObject.Reference.Connection)).Classes.FileBase; return(ReferenceObject.GetObjects(RCC_link_Documents_GUID).Where(d => d.Class.IsInherit(fileType))); }
List <ReferenceObject> СписокЛюдейИзДополнительногоДоступа() { return(ReferenceObject.GetObjects(RCC_link_ExtraAccess_GUID)); }