private void HandleSelectedForSpecialGroup()
    {
        var group = IncludedGroup.Where(p => p.CustomerGroupID == SystemCacheData.GetAnyCardHolderGroup().CustomerGroupID || p.CustomerGroupID == SystemCacheData.GetAnyCustomerGroup().CustomerGroupID).SingleOrDefault();

        if (group != null)
        {
            IncludedGroup.Clear();
            IncludedGroup.Add(group);
            select1.Enabled = false;
        }
        else
        {
            select1.Enabled = true;
        }
    }
    protected void select2_Click(object sender, EventArgs e)
    {
        if (lstAvailable.SelectedItem != null)
        {
            foreach (int i in lstAvailable.GetSelectedIndices())
            {
                if (AvailableFilteredCustomerGroup[i].CustomerGroupID == SystemCacheData.GetAnyCardHolderGroup().CustomerGroupID || AvailableFilteredCustomerGroup[i].CustomerGroupID == SystemCacheData.GetAnyCustomerGroup().CustomerGroupID || AvailableFilteredCustomerGroup[i].CustomerGroupID == SystemCacheData.GetNewCardHolderGroup().CustomerGroupID)
                {
                    infobar.InnerText = AvailableFilteredCustomerGroup[i].Name + " " + PhraseLib.Lookup("offer-eligibility-validateexlgroup", LanguageID).Replace("'", "'");
                    infobar.Visible   = true;
                    break;
                }
                ExcludedGroup.Add(AvailableFilteredCustomerGroup[i]);
            }

            SetAvailableData();
        }
        SetButtons();
    }
    protected void lst_DataBinding(object sender, EventArgs e)
    {
        ListBox lst     = (ListBox)sender;
        int     Counter = 0;

        for (Counter = 0; Counter < lst.Items.Count; Counter++)
        {
            ListItem lstItem = lst.Items[Counter];
            if (Counter > 4)
            {
                break;
            }
            if (lstItem.Value.ConvertToLong() == SystemCacheData.GetAnyCustomerGroup().CustomerGroupID ||
                lstItem.Value.ConvertToLong() == SystemCacheData.GetAllCAMCardHolderGroup().CustomerGroupID ||
                lstItem.Value.ConvertToLong() == SystemCacheData.GetNewCardHolderGroup().CustomerGroupID ||
                lstItem.Value.ConvertToLong() == SystemCacheData.GetAnyCardHolderGroup().CustomerGroupID)
            {
                lstItem.Attributes.Add("style", "color:brown;font-weight:bold;");
            }
        }
    }
    private void SetButtons()
    {
        if (lstSelected.Items.Count == 0)
        {
            select1.Enabled = true;
        }
        if (lstSelected.Items.Count > 0)
        {
            deselect1.Enabled = true;
            select2.Enabled   = true;
        }
        else
        {
            deselect1.Enabled = false;
            select2.Enabled   = false;
        }

        if (lstExcluded.Items.Count > 0)
        {
            deselect2.Enabled = true;
        }
        else
        {
            deselect2.Enabled = false;
        }

        if (lstSelected.Items.Count == 1 && (lstSelected.Items[0].Value.ConvertToLong() == SystemCacheData.GetAnyCardHolderGroup().CustomerGroupID || lstSelected.Items[0].Value.ConvertToLong() == SystemCacheData.GetAnyCustomerGroup().CustomerGroupID))
        {
            select1.Enabled = false;
        }
    }