Пример #1
0
        public bool HasChildren(SafetyCriticalAssetModel item)
        {
            bool result = false;

            IQueryable qry = Assets.Dataset.Where(string.Format("Parent={0}", item.Id));

            result = (qry.Count() > 0) ? true : false;

            return(result);
        }
Пример #2
0
        public List <SafetyCriticalAssetModel> GetItems(SafetyCriticalAssetModel parent)
        {
            List <SafetyCriticalAssetModel> items = new List <SafetyCriticalAssetModel>();
            IQueryable qry = Assets.Dataset.Where(string.Format("Parent={0}", parent.Id));

            qry = TopLevelAssets.Take(20);

            foreach (SafetyCriticalAssetModel item in qry)
            {
                items.Add(item);
            }
            return(items);
        }