protected void lbUpdateSelected_Click(object sender, EventArgs e)
        {
            SaveLastViewedGroups();

            // Convert to entity objects
            var overviewGroups = ChosenCustomLabelGroups;
            var groups         = new List <ProductGoogleCustomLabelGroupMapping>();

            foreach (var item in overviewGroups)
            {
                groups.Add(new ProductGoogleCustomLabelGroupMapping
                {
                    ProductId    = item.ProductId,
                    CustomLabel1 = item.CustomLabel1,
                    CustomLabel2 = item.CustomLabel2,
                    CustomLabel3 = item.CustomLabel3,
                    CustomLabel4 = item.CustomLabel4,
                    CustomLabel5 = item.CustomLabel5,
                    Value1       = item.Value1,
                    Value2       = item.Value2,
                    Value3       = item.Value3,
                    Value4       = item.Value4,
                    Value5       = item.Value5
                });
            }

            ProductService.SaveProductGoogleCustomLabelGroups(groups);
            enbNotice.Message = "Items were updated successfully";
            ChosenCustomLabelGroups.Clear();
            NotChosenCustomLabelGroups.Clear();
            LoadGroups();
        }
        private void SetChosenGroups(ProductGoogleCustomLabelGroupMappingOverviewModel group, bool chosen)
        {
            if (group != null)
            {
                if (chosen)
                {
                    if (ExistInChosenGroups(group))
                    {
                        ChosenCustomLabelGroups.RemoveAll(delegate(ProductGoogleCustomLabelGroupMappingOverviewModel arg)
                        {
                            return(arg.ProductId == group.ProductId);
                        });
                    }

                    ChosenCustomLabelGroups.Add(group);
                    NotChosenCustomLabelGroups.RemoveAll(delegate(ProductGoogleCustomLabelGroupMappingOverviewModel arg)
                    {
                        return(arg.ProductId == group.ProductId);
                    });
                }
                else
                {
                    ChosenCustomLabelGroups.RemoveAll(delegate(ProductGoogleCustomLabelGroupMappingOverviewModel arg)
                    {
                        return(arg.ProductId == group.ProductId);
                    });

                    if (ExistInNotChosenGroups(group))
                    {
                        NotChosenCustomLabelGroups.RemoveAll(delegate(ProductGoogleCustomLabelGroupMappingOverviewModel arg)
                        {
                            return(arg.ProductId == group.ProductId);
                        });
                    }

                    NotChosenCustomLabelGroups.Add(group);
                }
            }
        }