private void FillAllProducts(int catalogId, int languageId)
{
List<Product> allProducts = ProductManager.GetProducts(CMSContext.PortalID, languageId);
List<Product> catalogProducts = ProductManager.GetProductsByCatalogID(catalogId, CMSContext.PortalID, languageId);
if (catalogProducts != null && catalogProducts.Count > 0)
if (allProducts != null && allProducts.Count > 0)
{
List<int> catalogProductsIds = catalogProducts.Select(cp => cp.ID).ToList();
allProducts = allProducts.Where(ap => !catalogProductsIds.Contains(ap.ID)).ToList();
}
gvAllProducts.DataSource = allProducts;
gvAllProducts.DataBind();
}
#endregion