Exemplo n.º 1
0
 public void Associate()
 {
     foreach (EntityViewModel e in SelectedMasterEntities)
     {
         if (e.Id != this.Id && ChildEntityList.Where(c => c.Id == e.Id).Any() == false)
         {
             ChildEntityList.Add(e);
         }
     }
     SelectedMasterEntities.Clear();
 }
Exemplo n.º 2
0
 public void Disassociate()
 {
     foreach (EntityViewModel e in SelectedChildEntities)
     {
         EntityViewModel rem = ChildEntityList.Where(le => le.Id == e.Id).FirstOrDefault();
         if (rem != null)
         {
             RemovalPendingChildEntities.Add(rem);
             ChildEntityList.Remove(rem);
         }
     }
     SelectedChildEntities.Clear();
 }
Exemplo n.º 3
0
        public void LoadNextChildrenSet(IEnumerable <CFEntity> src)
        {
            if (ChildCount == 0)
            {
                ChildCount = src.Count();
            }

            IEnumerable <CFEntity> elements = src.Skip(ChildOffset).Take(PageSize);

            foreach (CFEntity e in elements)
            {
                ChildEntityList.Add(new EntityViewModel(e));
            }
        }