Beispiel #1
0
        private void BindProduct()
        {
            DisplayPage.DataBind();
            Product product = ProductDataSource.Load(PageHelper.GetProductId());

            SelectItem(DisplayPage, product.WebpageId.ToString());
            EditItemLink.Text                 = product.Name;
            EditItemLink.NavigateUrl          = Page.ResolveUrl(string.Format("~/Admin/Products/EditProduct.aspx?ProductId={0}", product.Id));
            MangeDisplayPagesLink.NavigateUrl = Page.ResolveUrl("~/Admin/Website/ContentPages/ProductPages/Default.aspx");
        }
Beispiel #2
0
        private void BindCategory()
        {
            DisplayPage.DataBind();
            Category category  = CategoryDataSource.Load(PageHelper.GetCategoryId());
            int      webpageId = category.Webpage != null ? category.Webpage.Id : 0;

            SelectItem(DisplayPage, webpageId.ToString());
            EditItemLink.Text                 = category.Name;
            EditItemLink.NavigateUrl          = Page.ResolveUrl(string.Format("~/Admin/Catalog/EditCategory.aspx?CategoryId={0}", category.Id));
            MangeDisplayPagesLink.NavigateUrl = Page.ResolveUrl("~/Admin/Website/ContentPages/CategoryPages/Default.aspx");
        }
        protected void BindDisplayPage()
        {
            DisplayPage.DataSource = WebpageDataSource.LoadForWebpageType(WebpageType.CategoryDisplay);
            DisplayPage.DataBind();

            if (!Page.IsPostBack)
            {
                Webpage webpage = _Category.Webpage;
                if (webpage != null)
                {
                    ListItem selectedItem = DisplayPage.Items.FindByValue(webpage.Id.ToString());
                    if (selectedItem != null)
                    {
                        DisplayPage.SelectedIndex = DisplayPage.Items.IndexOf(selectedItem);
                    }
                }
            }
        }
Beispiel #4
0
 protected void BindDisplayPage()
 {
     DisplayPage.DataSource = WebpageDataSource.LoadForWebpageType(WebpageType.CategoryDisplay);
     DisplayPage.DataBind();
 }