protected void Page_Load(object sender, System.EventArgs e)
        {
            try
            {
                Controller = new BBStoreController();

                if (Request["adminmode"] != null)
                {
                    pnlBack.Visible = false;
                }


                if (!IsPostBack)
                {
                    List <FeatureListItemInfo> featureListItems = Controller.GetFeatureListItemsByListId(FeatureListId, CurrentLanguage, false);
                    featureListItems.Insert(0, new FeatureListItemInfo()
                    {
                        FeatureListItem = "<Add new>", FeatureListItemId = -1
                    });
                    lstFeatureListItems.DataSource     = featureListItems;
                    lstFeatureListItems.DataTextField  = "FeatureListItem";
                    lstFeatureListItems.DataValueField = "FeatureListItemId";
                    lstFeatureListItems.DataBind();


                    cmdDelete.Attributes.Add("onClick", "javascript:return confirm('" + Localization.GetString("DeleteConfirm.Text", this.LocalResourceFile) + "');");
                    lblFLIDetailsCaption.Text = Localization.GetString("lblFLIDetailsCaption.Text", this.LocalResourceFile);
                }
            }
            catch (Exception exc)
            {
                //Module failed to load
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
Beispiel #2
0
        private void UpdateList(string language)
        {
            List <FeatureListItemInfo> lst = Controller.GetFeatureListItemsByListId(FeatureListId, language, false);

            pnlFeatureListItems.Visible = (lst.Count > 0);
            string html = "<ul>";

            foreach (FeatureListItemInfo featureListItem in lst)
            {
                html += "<li>" + featureListItem.FeatureListItem.Trim() + "</li>";
            }
            html += "</ul>";
            ltrListItems.Text = html;
        }