void ctlFeatureLists_RemoveAllButtonClick(object sender, EventArgs e) { foreach (FeatureListInfo featureList in Controller.GetFeatureLists(PortalId)) { Controller.DeleteProductGroupListItemsByProductGroupAndFeatureList(ProductGroupId, featureList.FeatureListId); } BindFeatureListsData(); }
private void FillFeatureListCombo() { List <FeatureListInfo> lst = Controller.GetFeatureLists(PortalId, CurrentLanguage); ListItemCollection colListItemCollection = new ListItemCollection(); colListItemCollection.Add(new ListItem(Localization.GetString("Edit.Text", this.LocalResourceFile), "-1")); foreach (FeatureListInfo fli in lst) { colListItemCollection.Add(new ListItem(fli.FeatureList, fli.FeatureListId.ToString())); } cboFeatureList.DataSource = colListItemCollection; cboFeatureList.DataTextField = "text"; cboFeatureList.DataValueField = "value"; cboFeatureList.DataBind(); }
protected void Page_Load(object sender, System.EventArgs e) { try { Controller = new BBStoreController(); if (Request["adminmode"] != null) { pnlBack.Visible = false; } if (!IsPostBack) { List <FeatureListInfo> featureLists = Controller.GetFeatureLists(PortalId, CurrentLanguage); featureLists.Insert(0, new FeatureListInfo() { FeatureList = "<Add new>", FeatureListId = -1 }); lstFeatureList.DataSource = featureLists; lstFeatureList.DataTextField = "FeatureList"; lstFeatureList.DataValueField = "FeatureListId"; lstFeatureList.DataBind(); if (Request["featurelist"] != null) { FeatureListId = Convert.ToInt32(Request["featurelist"]); lstFeatureList.SelectedValue = FeatureListId.ToString(); lstFeatureList_SelectedIndexChanged(lstFeatureList, new EventArgs()); } cmdDelete.Attributes.Add("onClick", "javascript:return confirm('" + Localization.GetString("DeleteConfirm.Text", this.LocalResourceFile) + "');"); lblFLDetailsCaption.Text = Localization.GetString("lblFLDetailsCaption.Text", this.LocalResourceFile); lblFLIDetailsCaption.Text = Localization.GetString("lblFLIDetailsCaption.Text", this.LocalResourceFile); } } catch (Exception exc) { //Module failed to load Exceptions.ProcessModuleLoadException(this, exc); } }