Esempio n. 1
0
        internal void LoadListItem <TEntity>(int fieldLookupValue, EntityListItemsCollection <TEntity> entityListItemsCollection)
            where TEntity : class, ITrackEntityState, ITrackOriginalValues, INotifyPropertyChanged, INotifyPropertyChanging, new()
        {
            ListItemCollection m_ListItemCollection = GetListItemCollection(entityListItemsCollection.MyList, CommonDefinition.GetCAMLSelectedID(fieldLookupValue, CommonDefinition.FieldID, CommonDefinition.CAMLTypeNumber));

            foreach (ListItem _listItemx in m_ListItemCollection)
            {
                entityListItemsCollection.Add(_listItemx);
            }
        }
Esempio n. 2
0
        private IEntityListItemsCollection GetOrCreateListEntry <TEntity>(string listName)
            where TEntity : class, ITrackEntityState, ITrackOriginalValues, INotifyPropertyChanged, INotifyPropertyChanging, new()
        {
            IEntityListItemsCollection _nwLst = null;

            if (!m_AllLists.TryGetValue(listName, out _nwLst))
            {
                List _list = m_RootWeb.Lists.GetByTitle(listName);
                m_ClientContext.Load(_list);
                // Execute the prepared commands against the target ClientContext
                ExecuteQuery(this, new ProgressChangedEventArgs(1, String.Format("Loading list = {0}", listName)));
                _nwLst = new EntityListItemsCollection <TEntity>(this, _list);
                m_AllLists.Add(listName, _nwLst);
            }
            else
            {
                _nwLst = m_AllLists[listName];
            }
            return(_nwLst);
        }
Esempio n. 3
0
 internal EntityList(DataContext dataContext, EntityListItemsCollection <TEntity> itemsCollection)
 {
     this.Query = CamlQuery.CreateAllItemsQuery();
     this.m_AllItemsCollection = itemsCollection;
     this.m_DataContext        = dataContext;
 }