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(); }
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(); }
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)); } }