protected void lbChangeCategoryNews_Click(object sender, EventArgs e) { if ((_selectionFilter != null) && (_selectionFilter.Values != null)) { if (!_inverseSelection) { foreach (var id in _selectionFilter.Values) { NewsService.ChangeCategoryNews(SQLDataHelper.GetInt(id), SQLDataHelper.GetInt(ddlChangeCategoryNews.SelectedValue)); } } else { var itemsIds = _paging.ItemsIds <int>("NewsID as ID"); foreach (var id in itemsIds.Where(nId => !_selectionFilter.Values.Contains(nId.ToString(CultureInfo.InvariantCulture)))) { NewsService.ChangeCategoryNews(SQLDataHelper.GetInt(id), SQLDataHelper.GetInt(ddlChangeCategoryNews.SelectedValue)); } } } }