Exemple #1
0
        private void Control_Init()
        {
            if (!DataEval.IsEmptyQuery(_htmlid))
            {
                if (_isshared)
                {
                    Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                    Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(_contentid);

                    tbx_TextContent.Text = myHTML.HTML_Content;
                }
                else
                {
                    tbx_TextContent.Text = _html_content;
                }
            }
            else
            {
                if (_isshared)
                {
                    Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                    Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(_contentid);

                    tbx_TextContent.Text = myHTML.HTML_Content;
                }
            }

            Reset_Buttons();
            MultiView_Editor.SetActiveView(View_Editor);
        }
Exemple #2
0
        protected void btn_Delete_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                for (int i = 0; i < ListView_ItemList.Items.Count; i++)
                {
                    CheckBox chk_Selected = (CheckBox)ListView_ItemList.Items[i].FindControl("chk_Selected");
                    if (chk_Selected.Checked)
                    {
                        HiddenField hidden_ItemID = (HiddenField)ListView_ItemList.Items[i].FindControl("Hidden_ItemID");

                        Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                        Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(hidden_ItemID.Value);

                        // Remove from Database
                        myHTMLMgr.Remove_HTML_Content(hidden_ItemID.Value);

                        // Remove Item from Category
                        CategoryMgr myCategoryMgr = new CategoryMgr();
                        myCategoryMgr.Delete_ComponentInCategory_Item(myHTML.CategoryID, "B1CD6348-796C-4E92-8C39-5CEF3D600B7C");
                    }
                }

                Control_Init();
            }
        }
Exemple #3
0
        protected void btn_Move_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                for (int i = 0; i < ListView_ItemList.Items.Count; i++)
                {
                    CheckBox chk_Selected = (CheckBox)ListView_ItemList.Items[i].FindControl("chk_Selected");
                    if (chk_Selected.Checked)
                    {
                        HiddenField hidden_ItemID = (HiddenField)ListView_ItemList.Items[i].FindControl("Hidden_ItemID");

                        Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                        Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(hidden_ItemID.Value);

                        if (myHTML.CategoryID != CategoryTree_MoveTo.Selected_CategoryID)
                        {
                            e2Data[] UpdateData =
                            {
                                new e2Data("HTMLID",     myHTML.HTMLID),
                                new e2Data("CategoryID", CategoryTree_MoveTo.Selected_CategoryID)
                            };

                            myHTMLMgr.Edit_HTML_Content(UpdateData);

                            // Switch Category
                            CategoryMgr myCategoryMgr = new CategoryMgr();
                            myCategoryMgr.Move_ComponentInCategory_Item(myHTML.CategoryID, CategoryTree_MoveTo.Selected_CategoryID, "B1CD6348-796C-4E92-8C39-5CEF3D600B7C");
                        }
                    }
                }

                Control_Init();
            }
        }
Exemple #4
0
        private void Control_Init()
        {
            if (_isshared)
            {
                Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(_contentid);

                Literal_TextContent.Text = myHTML.HTML_Content;
            }
            else
            {
                Literal_TextContent.Text = _html_content;
            }
        }
        private void Control_Init()
        {
            if (!DataEval.IsEmptyQuery(Request["ItemID"]))
            {
                Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(Request["ItemID"]);

                tbx_DisplayName.Text = myHTML.Display_Name;
                tbx_TextContent.Text = myHTML.HTML_Content;
                CategoryTree_Menu.Selected_CategoryID = myHTML.CategoryID;

                _itemid                        = myHTML.HTMLID;
                ViewState["ItemID"]            = _itemid;
                _source_categoryid             = myHTML.CategoryID;
                ViewState["Source_CategoryID"] = _source_categoryid;
            }
            else
            {
                btn_Update.Enabled = false;
            }
        }
        private void Control_Init()
        {
            if (DataEval.IsEmptyQuery(_htmlid))
            {
                MultiView_Content.SetActiveView(View_New);
            }
            else
            {
                MultiView_Content.SetActiveView(View_Show);

                if (_isshared)
                {
                    Lib.HTMLMgr myHTMLMgr = new Lib.HTMLMgr();
                    Lib.HTML    myHTML    = myHTMLMgr.Get_HTML_Content(_contentid);

                    Literal_TextContent.Text = string.Format("<Pre>{0}</Pre>", Server.HtmlEncode(myHTML.HTML_Content));
                }
                else
                {
                    Literal_TextContent.Text = string.Format("<Pre>{0}</Pre>", Server.HtmlEncode(_html_content));
                }
            }
        }