protected void lbChangeParent_Click(object sender, EventArgs e) { if ((_selectionFilter != null) && (_selectionFilter.Values != null)) { if (!_inverseSelection) { foreach (var id in _selectionFilter.Values) { StaticPageService.ChangeParentPage(SQLDataHelper.GetInt(id), SQLDataHelper.GetInt(ddlParentPages.SelectedValue)); } } else { var itemsIds = _paging.ItemsIds <int>("StaticPageID as ID"); foreach (int id in itemsIds.Where(cId => !_selectionFilter.Values.Contains(cId.ToString()))) { StaticPageService.ChangeParentPage(SQLDataHelper.GetInt(id), SQLDataHelper.GetInt(ddlParentPages.SelectedValue)); } } } }