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.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                        Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(hidden_ItemID.Value);

                        // Remove from Database
                        myRichTextMgr.Remove_RichText_Content(hidden_ItemID.Value);

                        // Remove Item from Category
                        CategoryMgr myCategoryMgr = new CategoryMgr();
                        myCategoryMgr.Delete_ComponentInCategory_Item(myRichText.CategoryID, "A2E21E10-FF09-4D3F-9D70-DF9376FCF8B7");
                    }
                }

                Control_Init();
            }
        }
        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.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                        Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(hidden_ItemID.Value);

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

                            myRichTextMgr.Edit_RichText_Content(UpdateData);

                            // Switch Category
                            CategoryMgr myCategoryMgr = new CategoryMgr();
                            myCategoryMgr.Move_ComponentInCategory_Item(myRichText.CategoryID, CategoryTree_MoveTo.Selected_CategoryID, "A2E21E10-FF09-4D3F-9D70-DF9376FCF8B7");
                        }
                    }
                }

                Control_Init();
            }
        }
示例#3
0
        private void Control_Init()
        {
            if (_isshared)
            {
                Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(_contentid);

                Literal_TextContent.Text = myRichText.RichText_Content;
            }
            else
            {
                Literal_TextContent.Text = _richtext_content;
            }
        }
示例#4
0
        private void Control_Init()
        {
            if (!DataEval.IsEmptyQuery(Request["ItemID"]))
            {
                Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(Request["ItemID"]);

                tbx_DisplayName.Text                  = myRichText.Display_Name;
                RadEditor_TextContent.Content         = myRichText.RichText_Content;
                CategoryTree_Menu.Selected_CategoryID = myRichText.CategoryID;

                _itemid                        = myRichText.RichTextID;
                ViewState["ItemID"]            = _itemid;
                _source_categoryid             = myRichText.CategoryID;
                ViewState["Source_CategoryID"] = _source_categoryid;
            }
            else
            {
                btn_Update.Enabled = false;
            }
        }
示例#5
0
        private void Control_Init()
        {
            #region Form Default setting

            File_Images();
            File_Media();

            RadEditor_TextContent.Content   = "";
            RadEditor_TextContent.ToolsFile = "~/App_Data/Editor/BasicTools.xml";
            #endregion

            if (!DataEval.IsEmptyQuery(_richtextid))
            {
                if (_isshared)
                {
                    Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                    Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(_contentid);

                    RadEditor_TextContent.Content = myRichText.RichText_Content;
                }
                else
                {
                    RadEditor_TextContent.Content = _richtext_content;
                }
            }
            else
            {
                if (_isshared)
                {
                    Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                    Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(_contentid);

                    RadEditor_TextContent.Content = myRichText.RichText_Content;
                }
            }

            Reset_Buttons();

            MultiView_Editor.SetActiveView(View_Editor);
        }
示例#6
0
        private void Control_Init()
        {
            if (DataEval.IsEmptyQuery(_richtextid))
            {
                MultiView_Content.SetActiveView(View_New);
            }
            else
            {
                MultiView_Content.SetActiveView(View_Show);

                if (_isshared)
                {
                    Lib.RichTextMgr myRichTextMgr = new Lib.RichTextMgr();
                    Lib.RichText    myRichText    = myRichTextMgr.Get_RichText_Content(_contentid);

                    Literal_TextContent.Text = myRichText.RichText_Content;
                }
                else
                {
                    Literal_TextContent.Text = _richtext_content;
                }
            }
        }