Esempio n. 1
0
        protected void btn_Normal_Move_Click(object sender, EventArgs e)
        {
            if (!DataEval.IsEmptyQuery(_pageindexid))
            {
                PageMgr myPageMgr = new PageMgr();

                PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

                switch (droplist_Normal_Folders.SelectedValue)
                {
                case "1":
                    // move to active folder
                    if (myPageIndex.Page_CategoryID == "2")
                    {
                        e2Data[] UpdateData_Active =
                        {
                            new e2Data("PageIndexID",     _pageindexid),
                            new e2Data("Page_CategoryID", "1")
                        };

                        myPageMgr.Edit_PageIndex(UpdateData_Active);
                    }
                    else
                    {
                        SiteMenu mySiteMenu = new SiteMenu();
                        mySiteMenu.Reset_Menu_RootOrder();

                        int Count_Child = myPageMgr.Count_Child_PageIndex("-1", "1,2") + 1;

                        e2Data[] UpdateData_Active =
                        {
                            new e2Data("PageIndexID",        _pageindexid),
                            new e2Data("Parent_PageIndexID", "-1"),
                            new e2Data("Page_CategoryID",    "1"),
                            new e2Data("SortOrder",          Count_Child.ToString())
                        };

                        myPageMgr.Edit_PageIndex(UpdateData_Active);
                    }
                    break;

                default:
                    e2Data[] UpdateData_Default =
                    {
                        new e2Data("PageIndexID",     _pageindexid),
                        new e2Data("Page_CategoryID", droplist_Normal_Folders.SelectedValue)
                    };

                    myPageMgr.Edit_PageIndex(UpdateData_Default);
                    break;
                }

                OnClick(sender, e);
            }
        }
Esempio n. 2
0
        private bool Chk_PageIndexID()
        {
            PageMgr myPageMgr = new PageMgr();

            if (myPageMgr.Count_Child_PageIndex(_pageindexid, "1,2") > 0)
            {
                Tools.AlertMessage.Show_Alert(this.Page, "<h4>Selected page has child(s) page. <br/> Please move them before apply this action.</h4>", "Action failed!");
                return(false);
            }

            if (Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomepageID") == _pageindexid)
            {
                Tools.AlertMessage.Show_Alert(this.Page, "<h4>Selected page has been set Homepage. <br/> Please reset your homepage before apply this action.</h4>", "Action failed!");
                return(false);
            }

            return(true);
        }