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 GetAllCustomerGroup() { bool IsAnyCustomerEnabled = false; //if (EngineID == 2) //{ // // IsAnyCustomerEnabled = (SystemCacheData.GetSystemOption_CPE_ByOptionId(125) == "1" ? true : false); // if (IsAnyCustomerEnabled) // IsAnyCustomerEnabled = m_offer.IsAnyCustomerAllowedForOffer(OfferID); //} AllGroups = m_CustGroup.GetCustomerGroups(); if (!IsAnyCustomerEnabled) { var CustGroup = SystemCacheData.GetAnyCustomerGroup(); var selectedgroup = AllGroups.Where(p => p.CustomerGroupID == CustGroup.CustomerGroupID).SingleOrDefault(); AllGroups.Remove(selectedgroup); } //if CAM is Not installed, remove CAM specific groups - refer to AMS-14578 if (EngineID != 6) { var camgroup = AllGroups.Where(p => p.CustomerGroupID == SystemCacheData.GetAllCAMCardHolderGroup().CustomerGroupID).SingleOrDefault(); AllGroups.Remove(camgroup); } else { //do CMS engine specific things } List <CustomerGroup> lstCustomerGroupwithPhrases = AllGroups.Where(p => p.PhraseID != null).ToList(); foreach (CustomerGroup cgroup in lstCustomerGroupwithPhrases) { cgroup.Name = PhraseLib.Lookup((Int32)cgroup.PhraseID, LanguageID).Replace("'", "'"); } }