Ejemplo n.º 1
0
        private void SiteMenu_Modules()
        {
            #region Module Login

            // e2Shop
            Modules.ModuleMgr myModuleMgr = new Modules.ModuleMgr();

            if (myModuleMgr.Chk_Module("A72F077B-FF47-4887-B9D7-71EC7DA2246D"))
            {
                // Add other Product
                RadMenu_SiteAdminMenu.DataBind();

                RadMenuItem homeMenuItem = RadMenu_SiteAdminMenu.Items.FindItemByText("Home");

                if (homeMenuItem != null)
                {
                    RadMenuItem e2shopMenuItem = new RadMenuItem();
                    e2shopMenuItem.NavigateUrl = "~/App_AdminCP/ShopAdmin/Default.aspx";
                    e2shopMenuItem.Text        = "e2Shop";

                    homeMenuItem.Items.Add(e2shopMenuItem);
                }
            }

            #endregion
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                switch (Request["LoginMsg"])
                {
                case "invalid":
                    lbl_ErrorText.Text = "The user does not have permission";
                    break;

                case "logout":
                    lbl_ErrorText.Text = "You have logged out.";
                    break;

                case "sessionexpire":
                    lbl_ErrorText.Text = "Session has been expired, please relog in.";
                    break;

                default:
                    Control_Init();
                    break;
                }

                #region Module Login

                // Module Login
                droplist_Module.Items.Clear();

                // e2CMS
                ListItem e2CMS = new ListItem();
                e2CMS.Text  = "Website Admin Panel";
                e2CMS.Value = "e2CMS";
                droplist_Module.Items.Add(e2CMS);

                // e2Shop
                Modules.ModuleMgr myModuleMgr = new Modules.ModuleMgr();

                if (myModuleMgr.Chk_Module("A72F077B-FF47-4887-B9D7-71EC7DA2246D"))
                {
                    ListItem e2Shop = new ListItem();
                    e2Shop.Text  = "e2Shop Admin Panel";
                    e2Shop.Value = "e2Shop";
                    droplist_Module.Items.Add(e2Shop);
                }

                #endregion
            }
        }
Ejemplo n.º 3
0
    private void Page_Init()
    {
        #region Add Control Manager Windows
        // Create CodeBlock
        RadScriptBlock myCodeBlock = new RadScriptBlock();

        // Create Script Tag
        HtmlGenericControl myCodeBlock_ScriptTag = new HtmlGenericControl("Script");
        myCodeBlock_ScriptTag.Attributes.Add("type", "text/javascript");
        myCodeBlock_ScriptTag.InnerHtml = Nexus.Core.Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_PageEditor_PoPWindow");
        myCodeBlock.Controls.Add(myCodeBlock_ScriptTag);

        // Create Window Manager
        RadWindowManager myWindowManager = new RadWindowManager();
        myWindowManager.ID = "RadWindowManager_ControlManager";

        // Create RadWindow
        RadWindow myRadWindow = new RadWindow();
        myRadWindow.ID                    = "RadWindow_ControlManager";
        myRadWindow.Title                 = "Module Control Manager";
        myRadWindow.ReloadOnShow          = true;
        myRadWindow.ShowContentDuringLoad = false;
        myRadWindow.Modal                 = true;
        myRadWindow.Animation             = WindowAnimation.Fade;
        myRadWindow.AutoSize              = true;
        myRadWindow.Behaviors             = WindowBehaviors.Maximize | WindowBehaviors.Close;
        myRadWindow.InitialBehaviors      = WindowBehaviors.Resize;
        //myRadWindow.DestroyOnClose = true;
        myRadWindow.KeepInScreenBounds = true;
        myRadWindow.VisibleStatusbar   = false;

        myWindowManager.Windows.Add(myRadWindow);

        // Create AjaxManager
        RadAjaxManager myRadAjaxManager = new RadAjaxManager();
        myRadAjaxManager.ID           = "ctl00_RadAjaxManager_ControlManger";
        myRadAjaxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxManager_AjaxRequest);

        // Add to Place Holder
        PlaceHolder_Editor.Controls.Add(myCodeBlock);
        PlaceHolder_Editor.Controls.Add(myWindowManager);
        PlaceHolder_Editor.Controls.Add(myRadAjaxManager);

        #endregion

        #region Add Page Update refresh panel

        // Create Hidden Update_Panel
        UpdatePanel myUpdatePanel = new UpdatePanel();
        myUpdatePanel.ID = "UpdatePanel_Refresh";

        // Create myRadAjaxManager Postback Trigger
        PostBackTrigger RadAjaxTrigger = new PostBackTrigger();
        RadAjaxTrigger.ControlID = myRadAjaxManager.ID;
        myUpdatePanel.Triggers.Add(RadAjaxTrigger);

        // Add inLine Controls back
        PlaceHolder_Editor.Controls.Add(myUpdatePanel);

        #endregion

        _page_controlid = Request.QueryString["Page_ControlID"];
        _editmode       = Request.QueryString["EditMode"];

        // Check EditMode
        if (_editmode == "PageAdvancedMode" ||
            _editmode == "PageDesignMode" ||
            _editmode == "TemplateAdvancedMode" ||
            _editmode == "TemplateDesignMode")
        {
            // Do nothing
        }
        else
        {
            // Display errors
            return;
        }

        if (_page_controlid != null)
        {
            ControlCPMgr myControlCPMgr = new ControlCPMgr();

            // Load Component Information
            Nexus.Core.Modules.ModuleMgr myModuleMgr = new Nexus.Core.Modules.ModuleMgr();

            switch (_editmode)
            {
            case "PageAdvancedMode":
                // Load Advance Mode UI
                myControlCPMgr.Load_ControlEditor_PageAdvancedMode(this.Page, _page_controlid);
                // Load Component Info
                PageMgr      myPageMgr      = new PageMgr();
                Page_Control myPage_Control = myPageMgr.Get_Page_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myPage_Control.ComponentID);
                break;

            case "PageDesignMode":
                // Load Design Mode UI
                myControlCPMgr.Load_ControlEditor_PageDesignMode(this.Page, _page_controlid);
                // Load Component Info
                PageEditorMgr     myPageEditorMgr     = new PageEditorMgr();
                Page_Lock_Control myPage_Lock_Control = myPageEditorMgr.Get_Page_Lock_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myPage_Lock_Control.ComponentID);
                break;

            case "TemplateAdvancedMode":
                // Load Advance Mode UI
                myControlCPMgr.Load_ControlEditor_TemplateAdvancedMode(this.Page, _page_controlid);
                // Load Component Info
                MasterPageMgr      myMasterPageMgr      = new MasterPageMgr();
                MasterPage_Control myMasterPage_Control = myMasterPageMgr.Get_MasterPage_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myMasterPage_Control.ComponentID);
                break;

            case "TemplateDesignMode":
                // Load Design Mode UI
                myControlCPMgr.Load_ControlEditor_TemplateDesignMode(this.Page, _page_controlid);
                // Load Component Info
                MasterPageEditorMgr     myMasterPageEditorMgr     = new MasterPageEditorMgr();
                MasterPage_Lock_Control myMasterPage_Lock_Control = myMasterPageEditorMgr.Get_MasterPage_Lock_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myMasterPage_Lock_Control.ComponentID);
                break;
            }
        }
        else
        {
            // Display errors
        }
    }
Ejemplo n.º 4
0
    private void Page_Init()
    {
        _page_controlid = Request.QueryString["Page_ControlID"];
        _editmode       = Request.QueryString["EditMode"];

        // Check EditMode
        if (_editmode == "PageAdvancedMode" ||
            _editmode == "PageDesignMode" ||
            _editmode == "TemplateAdvancedMode" ||
            _editmode == "TemplateDesignMode")
        {
            // Do nothing
        }
        else
        {
            // Display errors
            return;
        }

        if (_page_controlid != null)
        {
            ControlCPMgr myControlCPMgr = new ControlCPMgr();

            // Load Component Information
            Nexus.Core.Modules.ModuleMgr myModuleMgr = new Nexus.Core.Modules.ModuleMgr();

            switch (_editmode)
            {
            case "PageAdvancedMode":
                // Load Advance Mode UI
                myControlCPMgr.Load_ControlEditor_PageAdvancedMode(this.Page, _page_controlid);
                // Load Component Info
                PageMgr      myPageMgr      = new PageMgr();
                Page_Control myPage_Control = myPageMgr.Get_Page_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myPage_Control.ComponentID);
                break;

            case "PageDesignMode":
                // Load Design Mode UI
                myControlCPMgr.Load_ControlEditor_PageDesignMode(this.Page, _page_controlid);
                // Load Component Info
                PageEditorMgr     myPageEditorMgr     = new PageEditorMgr();
                Page_Lock_Control myPage_Lock_Control = myPageEditorMgr.Get_Page_Lock_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myPage_Lock_Control.ComponentID);
                break;

            case "TemplateAdvancedMode":
                // Load Advance Mode UI
                myControlCPMgr.Load_ControlEditor_TemplateAdvancedMode(this.Page, _page_controlid);
                // Load Component Info
                MasterPageMgr      myMasterPageMgr      = new MasterPageMgr();
                MasterPage_Control myMasterPage_Control = myMasterPageMgr.Get_MasterPage_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myMasterPage_Control.ComponentID);
                break;

            case "TemplateDesignMode":
                // Load Design Mode UI
                myControlCPMgr.Load_ControlEditor_TemplateDesignMode(this.Page, _page_controlid);
                // Load Component Info
                MasterPageEditorMgr     myMasterPageEditorMgr     = new MasterPageEditorMgr();
                MasterPage_Lock_Control myMasterPage_Lock_Control = myMasterPageEditorMgr.Get_MasterPage_Lock_Control(_page_controlid);
                myComponenet = myModuleMgr.Get_Component(myMasterPage_Lock_Control.ComponentID);
                break;
            }
        }
        else
        {
            // Display errors
        }
    }