Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            return;
        }

        // ===== DEBUG DEBUG DEBUG =====
        //Session["member"] = GetMemberById(2);
        // =============================

        Page.Title = "Forum Index";

        ListViewCategories.DataSource = new BLForum().GetParentForums();
        ListViewCategories.DataBind();

        Layout masterPage = Master as Layout;

        masterPage.GenerateBreadCrumb(null);

        LiteralTotalPosts.Text = new BLPost().CountAll().ToString();

        BLMember blMember = new BLMember();

        LiteralTotalMembers.Text = blMember.CountAll().ToString();
        LiteralNewestMember.Text = blMember.GetNewestMember().Name;
    }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the entry.
        /// </summary>
        protected virtual void LoadEntry()
        {
            // Fill categories
            ListViewCategories.DataSource = ManagerFactory.CategoryManagerInstance.GetCategoriesByEntryID(CurrentEntry.ID);
            ListViewCategories.DataBind();

            //TODO Create edit possibilities for assigning categories on frontend
        }
Exemplo n.º 3
0
        /// <summary>
        /// Loads the entry.
        /// </summary>
        protected virtual void LoadEntry()
        {
            // Create entry of current item
            EntryItem current = new EntryItem(Sitecore.Context.Item);

            // Fill categories
            ListViewCategories.DataSource = ManagerFactory.CategoryManagerInstance.GetCategoriesByEntryID(current.ID);
            ListViewCategories.DataBind();

            //TODO Create edit possibilities for assigning categories on frontend
        }
Exemplo n.º 4
0
 /// <summary>
 /// Load the categories into this control
 /// </summary>
 protected virtual void LoadCategories()
 {
     if (ManagerFactory.CategoryManagerInstance.GetCategories().Length == 0)
     {
         if (PanelCategories != null)
         {
             PanelCategories.Visible = false;
         }
     }
     else
     {
         if (ListViewCategories != null)
         {
             ListViewCategories.DataSource = ManagerFactory.CategoryManagerInstance.GetCategories();
             ListViewCategories.DataBind();
         }
     }
 }