Exemplo n.º 1
0
    protected void rbtn_IsTemplate_Inherited_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (rbtn_IsTemplate_Inherited.SelectedValue == "0")
        {
            Panel_Template.Enabled = true;
        }
        else
        {
            Panel_Template.Enabled = false;

            // Load Pages Template
            //PageEditorMgr myPageEditorMgr = new PageEditorMgr();
            //Page_Lock_Template myPage_Lock_Template = myPageEditorMgr.Get_Page_Lock_Template(myPage_Loading_Info.Page_LockID);

            // Load Pages Template
            Page_PropertyMgr  myPropertyMgr         = new Page_PropertyMgr();
            Page_Loading_Info myParent_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(myPage_Loading_Info.Parent_PageIndexID);

            // Look for Template
            RadComboBox_Template.SelectedValue = myParent_Loading_Info.MasterPageIndexID;

            // Active New Template
            btn_SwitchTemplate_Click(sender, e);
        }
    }
Exemplo n.º 2
0
    private void Page_Controls()
    {
        // Check _pageindexid
        string _pageindexid = Request["PageIndexID"];

        if (DataEval.IsEmptyQuery(_pageindexid))
        {
            // URLrewrite
            Response.Redirect("Pages.aspx");
            return;
        }

        btn_Cancel.CommandArgument  = _pageindexid;
        btn_Publish.CommandArgument = _pageindexid;

        iframe_PageEditor_Design.Attributes["src"] = string.Format("Pages/Design.aspx?PageIndexID={0}&PageLink=Disable", _pageindexid);

        // Load Pages Template
        Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

        myPage_Loading_Info = myPropertyMgr.Get_Page_Lock_Loading_Info(_pageindexid);

        // Page Template
        DataFill_Template();
    }
Exemplo n.º 3
0
        protected void btn_UpdatePage_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

                e2Data[] UpdateData_Property =
                {
                    new e2Data("PageIndexID",         _pageindexid),
                    new e2Data("IsPrivacy_Inherited", rbtn_IsPrivacy_Inherited.SelectedValue),
                    new e2Data("IsSSL",               rbtn_IsSSL.SelectedValue)
                };

                myPropertyMgr.Edit_Page_Property(UpdateData_Property);

                if (rbtn_IsPrivacy_Inherited.SelectedValue == "1")
                {
                    Remove_Privacy(_pageindexid);
                }
                else
                {
                    Edit_Privacy(_pageindexid);
                }


                // Refresh Page
                Panel_Updated.Visible = true;
                Control_FillData();
            }
        }
Exemplo n.º 4
0
        private void Load_Internal_Page(string PageIndexID)
        {
            Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();
            Page_IntLink     myPage_IntLink     = myPage_PropertyMgr.Get_Page_IntLink(PageIndexID);

            Response.Redirect(Nexus.Core.Tools.URLParse.Update_Arg(Request.Url.ToString(), "PageIndexID", myPage_IntLink.PagePointerID));
        }
Exemplo n.º 5
0
        private void Load_External_Page(string PageIndexID)
        {
            Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();
            Page_ExtLink     myPage_ExtLink     = myPage_PropertyMgr.Get_Page_ExtLink(PageIndexID);

            Response.Redirect(myPage_ExtLink.Page_URL);
        }
Exemplo n.º 6
0
        private void Edit_ExtLink(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            if (!tbx_LinkURL.Text.Trim().StartsWith("http://"))
            {
                tbx_LinkURL.Text = "http://" + tbx_LinkURL.Text.Trim();
            }

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID", PageIndexID),
                new e2Data("Page_URL",    tbx_LinkURL.Text),
                new e2Data("Page_Target", RadComboBox_LinkTarget.Text)
            };

            if (myPropertyMgr.Chk_Page_ExtLink(PageIndexID))
            {
                myPropertyMgr.Edit_Page_ExtLink(UpdateData);
            }
            else
            {
                myPropertyMgr.Add_Page_ExtLink(UpdateData);
            }
        }
Exemplo n.º 7
0
        protected void btn_Normal_Delete_Click(object sender, EventArgs e)
        {
            if (!DataEval.IsEmptyQuery(_pageindexid))
            {
                PageMgr          myPageMgr          = new PageMgr();
                Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();

                PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

                switch (myPageIndex.Page_Type)
                {
                case Page_Type.Normal_Page:
                    myPageMgr.Delete_PageIndex(_pageindexid);
                    break;

                case Page_Type.Category:
                    myPageMgr.Delete_PageIndex(_pageindexid);
                    break;

                case Page_Type.Internal_Page_Pointer:
                    myPage_PropertyMgr.Remove_Page_IntLink(_pageindexid);
                    myPageMgr.Remove_PageIndex(_pageindexid);
                    break;

                case Page_Type.External_Link:
                    myPage_PropertyMgr.Remove_Page_ExtLink(_pageindexid);
                    myPageMgr.Remove_PageIndex(_pageindexid);
                    break;
                }

                OnDeletePageClick(sender, e);
            }
        }
Exemplo n.º 8
0
        private void Remove_Attribute(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            if (myPropertyMgr.Chk_Page_Attribute(PageIndexID))
            {
                myPropertyMgr.Remove_Page_Attribute(PageIndexID);
            }
        }
Exemplo n.º 9
0
        private void DataFill_IntLink()
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            Page_IntLink myPage_IntLink = myPropertyMgr.Get_Page_IntLink(_pageindexid);

            tbx_LinkURL.Text            = myPage_IntLink.Page_URL;
            RadComboBox_LinkTarget.Text = myPage_IntLink.Page_Target;
        }
Exemplo n.º 10
0
        private void DataFill_Template()
        {
            Page_PropertyMgr  myPropertyMgr       = new Page_PropertyMgr();
            Page_Loading_Info myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_parent_pageindexid);

            // Look for Template
            droplist_Template.SelectedValue = myPage_Loading_Info.MasterPageIndexID;
            FormView_Template.PageIndex     = droplist_Template.SelectedIndex;
            FormView_Template.DataBind();
        }
Exemplo n.º 11
0
        private void DataFill_Attribute()
        {
            Page_PropertyMgr  myPropertyMgr       = new Page_PropertyMgr();
            Page_Loading_Info myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_parent_pageindexid);

            // Look for PageAtrribute
            tbx_Page_Title.Text       = myPage_Loading_Info.Page_Title;
            tbx_Page_Keyword.Text     = myPage_Loading_Info.Page_Keyword;
            tbx_Page_Description.Text = myPage_Loading_Info.Page_Description;
        }
Exemplo n.º 12
0
        protected void btn_UpdatePage_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

                // Page Attribute
                e2Data[] UpdateData_Attribute =
                {
                    new e2Data("PageIndexID",      _pageindexid),
                    new e2Data("Page_Title",       tbx_Page_Title.Text),
                    new e2Data("Page_Keyword",     tbx_Page_Keyword.Text),
                    new e2Data("Page_Description", tbx_Page_Description.Text)
                };

                myPropertyMgr.Edit_Page_Attribute(UpdateData_Attribute);

                Thread.Sleep(100);

                // Page Template
                e2Data[] UpdateData_Template =
                {
                    new e2Data("PageIndexID",       _pageindexid),
                    new e2Data("MasterPageIndexID", droplist_Template.SelectedValue)                                // Get from Select Template list
                };

                myPropertyMgr.Edit_Page_Template(UpdateData_Template);

                Thread.Sleep(100);

                // Page Properties
                e2Data[] UpdateData_Property =
                {
                    new e2Data("PageIndexID", _pageindexid),
                    new e2Data("IsSSL",       rbtn_IsSSL.SelectedValue)
                };

                myPropertyMgr.Edit_Page_Property(UpdateData_Property);

                Thread.Sleep(100);

                // Page Privacy
                Security.Pages.PrivacyMgr myPrivacyMgr = new Security.Pages.PrivacyMgr();

                e2Data[] UpdateData_PrivacyURL =
                {
                    new e2Data("PageIndexID", _pageindexid),
                    new e2Data("ReturnURL",   tbx_ReturnURL.Text)
                };

                myPrivacyMgr.Edit_Page_PrivacyURL(UpdateData_PrivacyURL);

                Panel_Updated.Visible = true;
            }
        }
Exemplo n.º 13
0
        private void Add_Template(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID",       PageIndexID),
                new e2Data("MasterPageIndexID", droplist_Template.SelectedValue)
            };

            myPropertyMgr.Add_Page_Template(UpdateData);
        }
Exemplo n.º 14
0
        private void Add_IntLink(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID", PageIndexID),
                new e2Data("Page_URL",    tbx_LinkURL.Text.Trim()),
                new e2Data("Page_Target", RadComboBox_LinkTarget.Text)
            };

            myPropertyMgr.Add_Page_ExtLink(UpdateData);
        }
Exemplo n.º 15
0
        private void Add_Attribute(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID",      PageIndexID),
                new e2Data("Page_Title",       tbx_Page_Title.Text),
                new e2Data("Page_Keyword",     tbx_Page_Keyword.Text),
                new e2Data("Page_Description", tbx_Page_Description.Text)
            };

            myPropertyMgr.Add_Page_Attribute(UpdateData);
        }
Exemplo n.º 16
0
        private void Edit_Property(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID",           PageIndexID),
                new e2Data("IsOnMenu",              rbtn_IsOnMenu.SelectedValue),
                new e2Data("IsOnNavigator",         rbtn_IsOnNavigator.SelectedValue),
                new e2Data("IsAttribute_Inherited", rbtn_IsAttribute_Inherited.SelectedValue),
                new e2Data("IsTemplate_Inherited",  rbtn_IsTemplate_Inherited.SelectedValue)
            };

            myPropertyMgr.Edit_Page_Property(UpdateData);
        }
Exemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Page_Controls();
        }
        else
        {
            // Check _pageindexid
            string _pageindexid = Request["PageIndexID"];

            // Load Pages Template
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();
            myPage_Loading_Info = myPropertyMgr.Get_Page_Lock_Loading_Info(_pageindexid);
        }
    }
Exemplo n.º 18
0
        private void Add_ExtLink(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            //if (!tbx_LinkURL.Text.Trim().StartsWith("http://"))
            //{
            //    tbx_LinkURL.Text = "http://" + tbx_LinkURL.Text.Trim();
            //}

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID", PageIndexID),
                new e2Data("Page_URL",    tbx_LinkURL.Text),
                new e2Data("Page_Target", RadComboBox_LinkTarget.Text)
            };

            myPropertyMgr.Add_Page_ExtLink(UpdateData);
        }
Exemplo n.º 19
0
        private void DataFill_Attribute(Page_Property myPage_Property)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Head Content
            if (myPage_Property.IsAttribute_Inherited)
            {
                rbtn_IsAttribute_Inherited.SelectedValue = "1";
            }
            else
            {
                rbtn_IsAttribute_Inherited.SelectedValue = "0";
                Panel_HeadContent.Visible = true;

                Page_Attribute myPage_Attribute = myPropertyMgr.Get_Page_Attribute(_pageindexid);
                tbx_Page_Title.Text       = myPage_Attribute.Page_Title;
                tbx_Page_Keyword.Text     = myPage_Attribute.Page_Keyword;
                tbx_Page_Description.Text = myPage_Attribute.Page_Description;
            }
        }
Exemplo n.º 20
0
        // Inherited Page Atrribute Changed
        protected void rbtn_IsAttribute_Inherited_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (rbtn_IsAttribute_Inherited.SelectedValue == "0")
            {
                Panel_PageAttribute.Enabled = true;
            }
            else
            {
                Panel_PageAttribute.Enabled = false;

                //Load Page Attribute

                Page_PropertyMgr  myPropertyMgr       = new Page_PropertyMgr();
                Page_Loading_Info myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_pageindexid);

                tbx_Page_Title.Text       = myPage_Loading_Info.Page_Title;
                tbx_Page_Keyword.Text     = myPage_Loading_Info.Page_Keyword;
                tbx_Page_Description.Text = myPage_Loading_Info.Page_Description;
            }
        }
Exemplo n.º 21
0
        private void Edit_Template(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID",       PageIndexID),
                new e2Data("MasterPageIndexID", droplist_Template.SelectedValue)                       // Get from Select Template list
            };

            if (myPropertyMgr.Chk_Page_Template(PageIndexID))
            {
                myPropertyMgr.Edit_Page_Template(UpdateData);
            }
            else
            {
                myPropertyMgr.Add_Page_Template(UpdateData);
            }
        }
Exemplo n.º 22
0
        // Inherited Page Template Changed
        protected void rbtn_IsTemplate_Inherited_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (rbtn_IsTemplate_Inherited.SelectedValue == "0")
            {
                Panel_Template.Enabled = true;
            }
            else
            {
                Panel_Template.Enabled = false;

                // Load Pages Template
                Page_PropertyMgr  myPropertyMgr         = new Page_PropertyMgr();
                Page_Loading_Info myPage_Loading_Info   = myPropertyMgr.Get_Page_Loading_Info(_pageindexid);
                Page_Loading_Info myParent_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(myPage_Loading_Info.Parent_PageIndexID);

                // Look for Template
                droplist_Template.SelectedValue = myParent_Loading_Info.MasterPageIndexID;
                FormView_Template.PageIndex     = droplist_Template.SelectedIndex;
                FormView_Template.DataBind();
            }
        }
Exemplo n.º 23
0
        private void Edit_IntLink(string PageIndexID)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Page Index
            e2Data[] UpdateData =
            {
                new e2Data("PageIndexID",   PageIndexID),
                new e2Data("PagePointerID", tbx_LinkURL.Text.Trim()),
                new e2Data("Page_Target",   RadComboBox_LinkTarget.Text)
            };

            if (myPropertyMgr.Chk_Page_IntLink(PageIndexID))
            {
                myPropertyMgr.Edit_Page_IntLink(UpdateData);
            }
            else
            {
                myPropertyMgr.Add_Page_IntLink(UpdateData);
            }
        }
Exemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Page_Controls();

            // Software Version
            lbl_Version.Text = string.Format("ver. {0}", Nexus.Core.Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_Version"));

        }
        else
        {
            // Check _pageindexid
            string _pageindexid = Request["PageIndexID"];

            // Load Pages Template
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();
            myPage_Loading_Info = myPropertyMgr.Get_Page_Lock_Loading_Info(_pageindexid);
        }


    }
Exemplo n.º 25
0
        private void DataFill_Attribute(Page_Property myPage_Property)
        {
            // Head Content
            if (myPage_Property.IsAttribute_Inherited)
            {
                rbtn_IsAttribute_Inherited.SelectedValue = "1";
                Panel_PageAttribute.Enabled = false;
            }
            else
            {
                rbtn_IsAttribute_Inherited.SelectedValue = "0";
                Panel_PageAttribute.Enabled = true;
            }

            //Load Page Attribute

            Page_PropertyMgr  myPropertyMgr       = new Page_PropertyMgr();
            Page_Loading_Info myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_pageindexid);

            tbx_Page_Title.Text       = myPage_Loading_Info.Page_Title;
            tbx_Page_Keyword.Text     = myPage_Loading_Info.Page_Keyword;
            tbx_Page_Description.Text = myPage_Loading_Info.Page_Description;
        }
Exemplo n.º 26
0
        private void DataFill_Template(Page_Property myPage_Property)
        {
            Page_PropertyMgr myPropertyMgr = new Page_PropertyMgr();

            // Template
            if (myPage_Property.IsTemplate_Inherited)
            {
                rbtn_IsTemplate_Inherited.SelectedValue = "1";
            }
            else
            {
                rbtn_IsTemplate_Inherited.SelectedValue = "0";
                Panel_Template.Enabled = true;
            }

            // Load Pages Template
            Page_Loading_Info myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(_pageindexid);

            // Look for Template
            droplist_Template.SelectedValue = myPage_Loading_Info.MasterPageIndexID;
            FormView_Template.PageIndex     = droplist_Template.SelectedIndex;
            FormView_Template.DataBind();
        }
Exemplo n.º 27
0
        public void Control_FillData()
        {
            #region Set Default Setting

            Panel_Updated.Visible = false;

            #region Step 2 General

            // Page URL
            tbx_LinkURL.Text            = "";
            RadComboBox_LinkTarget.Text = "";
            Panel_PageLink.Visible      = false;

            // Page General
            tbx_MenuName.Text                = "";
            rbtn_IsOnMenu.SelectedValue      = "1";
            rbtn_IsOnNavigator.SelectedValue = "1";

            rbtn_IsAttribute_Inherited.SelectedValue = "1";

            // Head Content
            tbx_Page_Title.Text         = "";
            tbx_Page_Keyword.Text       = "";
            tbx_Page_Description.Text   = "";
            Panel_PageAttribute.Visible = false;
            #endregion

            #region Step 2 More Options

            // Template
            rbtn_IsTemplate_Inherited.SelectedValue = "1";
            Panel_Template.Enabled = false;

            // URL rewrite
            tbx_Page_Name.Text = "";

            // Security
            rbtn_IsPrivacy_Inherited.SelectedValue = "1";
            rbtn_IsSSL.SelectedValue = "0";

            #endregion

            #endregion


            PageMgr   myPageMgr   = new PageMgr();
            PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

            // Page General
            tbx_MenuName.Text = myPageIndex.Page_Name;

            // Page
            Page_PropertyMgr myPropertyMgr   = new Page_PropertyMgr();
            Page_Property    myPage_Property = myPropertyMgr.Get_Page_Property(_pageindexid);

            rbtn_IsOnMenu.SelectedValue      = DataEval.Convert_BoolToString(myPage_Property.IsOnMenu);
            rbtn_IsOnNavigator.SelectedValue = DataEval.Convert_BoolToString(myPage_Property.IsOnNavigator);


            switch (myPageIndex.Page_Type)
            {
            case Page_Type.Normal_Page:
                Panel_PageLink.Visible        = false;
                Panel_HeadContent.Visible     = true;
                Panel_Page_Templates.Visible  = true;
                Panel_Page_URLs.Visible       = true;
                Panel_Page_Securities.Visible = true;

                DataFill_Attribute(myPage_Property);
                DataFill_Template(myPage_Property);
                DataFill_PageURLs(myPage_Property);
                DataFill_Security(myPage_Property);

                break;

            case Page_Type.Category:
                Panel_PageLink.Visible        = false;
                Panel_HeadContent.Visible     = true;
                Panel_Page_Templates.Visible  = true;
                Panel_Page_URLs.Visible       = true;
                Panel_Page_Securities.Visible = true;

                DataFill_Attribute(myPage_Property);
                DataFill_Template(myPage_Property);
                DataFill_PageURLs(myPage_Property);
                DataFill_Security(myPage_Property);

                break;

            case Page_Type.Internal_Page_Pointer:
                Panel_PageLink.Visible        = true;
                Panel_HeadContent.Visible     = false;
                Panel_Page_Templates.Visible  = false;
                Panel_Page_URLs.Visible       = true;
                Panel_Page_Securities.Visible = true;

                DataFill_IntLink();
                DataFill_PageURLs(myPage_Property);
                DataFill_Security(myPage_Property);

                break;

            case Page_Type.External_Link:
                Panel_PageLink.Visible        = true;
                Panel_HeadContent.Visible     = false;
                Panel_Page_Templates.Visible  = false;
                Panel_Page_URLs.Visible       = true;
                Panel_Page_Securities.Visible = true;

                DataFill_ExtLink();
                DataFill_PageURLs(myPage_Property);
                DataFill_Security(myPage_Property);

                break;
            }
        }
Exemplo n.º 28
0
        private void Refresh()
        {
            PageMgr          myPageMgr          = new PageMgr();
            Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();
            PageIndex        myPageIndex        = myPageMgr.Get_PageIndex(_pageindexid);

            switch (myPageIndex.Page_Type)
            {
            case Page_Type.Normal_Page:
                iframe_PageEditor_Basic.Attributes["src"]    = string.Format("Pages/Default.aspx?PageIndexID={0}&PageLink=Disable", myPageIndex.PageIndexID);
                iframe_PageEditor_Advanced.Attributes["src"] = string.Format("Pages/Advanced.aspx?PageIndexID={0}&PageLink=Disable", myPageIndex.PageIndexID);

                // Button operating
                btn_DesignMode.CommandArgument = myPageIndex.PageIndexID;
                btn_DesignMode.Visible         = true;

                // Property
                btn_Preview.Visible = true;
                btn_Modify.Visible  = true;

                break;

            case Page_Type.Category:
                iframe_PageEditor_Basic.Attributes["src"]    = string.Format("Pages/Category.aspx?PageIndexID={0}&PageLink=Disable", myPageIndex.PageIndexID);
                iframe_PageEditor_Advanced.Attributes["src"] = string.Format("Pages/Category.aspx?PageIndexID={0}&PageLink=Disable", myPageIndex.PageIndexID);

                // Button operating
                btn_DesignMode.CommandArgument = null;
                btn_DesignMode.Visible         = false;

                // Property
                btn_Preview.Visible = false;
                btn_Modify.Visible  = false;

                break;

            case Page_Type.Internal_Page_Pointer:
                Page_IntLink myPage_IntLink = myPage_PropertyMgr.Get_Page_IntLink(PageIndexID);

                iframe_PageEditor_Basic.Attributes["src"]    = string.Format("Pages/Default.aspx?PageIndexID={0}&PageLink=Disable", myPage_IntLink.PagePointerID);
                iframe_PageEditor_Advanced.Attributes["src"] = string.Format("Pages/Default.aspx?PageIndexID={0}&PageLink=Disable", myPage_IntLink.PagePointerID);

                // Button operating
                btn_DesignMode.CommandArgument = null;
                btn_DesignMode.Visible         = false;

                // Property
                btn_Preview.Visible = false;
                btn_Modify.Visible  = false;

                break;

            case Page_Type.External_Link:
                Page_ExtLink myPage_ExtLink = myPage_PropertyMgr.Get_Page_ExtLink(PageIndexID);

                iframe_PageEditor_Basic.Attributes["src"]    = string.Format(myPage_ExtLink.Page_URL);
                iframe_PageEditor_Advanced.Attributes["src"] = string.Format(myPage_ExtLink.Page_URL);

                // Button operating
                btn_DesignMode.CommandArgument = null;
                btn_DesignMode.Visible         = false;

                // Property
                btn_Preview.Visible = false;
                btn_Modify.Visible  = false;

                break;

            default:
                iframe_PageEditor_Basic.Attributes["src"]    = string.Format("/Homepage.aspx?PageIndexID={0}ThisIsDefault", myPageIndex.PageIndexID);
                iframe_PageEditor_Advanced.Attributes["src"] = string.Format("/Homepage.aspx?PageIndexID={0}ThisIsDefault", myPageIndex.PageIndexID);

                // Button operating
                btn_DesignMode.CommandArgument = null;
                btn_DesignMode.Visible         = false;

                // Property
                btn_Preview.Visible = false;
                btn_Modify.Visible  = false;

                break;
            }

            // Page Property
            //PageProperty_Show.PageIndexID = _pageindexid;
            // Page Privacy
            //PagePrivacy_Show.PageIndexID = _pageindexid;
        }
Exemplo n.º 29
0
        public void Control_FillData()
        {
            #region Set Default Setting

            #region Security

            // Security
            rbtn_IsPrivacy_Inherited.SelectedValue = "1";
            rbtn_IsSSL.SelectedValue = "0";
            tbx_ReturnURL.Text       = "";

            #endregion

            #region Permission

            // Load Usergroup list
            List <Security.Users.UserGroups> myUserGroups = Security.Users.UserMgr.sGet_Usergroups();

            droplist_UserGroup.DataSource     = myUserGroups;
            droplist_UserGroup.DataTextField  = "UserGroup_Name";
            droplist_UserGroup.DataValueField = "UserGroupID";
            droplist_UserGroup.DataBind();

            droplist_UserGroup.SelectedValue = StringEnum.GetStringValue(Security.Users.UserGroup.RegisteredUser);

            // Set Add User Role Error Message to null
            lbl_AddRolesError.Text = "";

            Panel_Privacy.Visible = false;

            #endregion

            #endregion

            // Page
            Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();
            Page_Property    myPage_Property    = myPage_PropertyMgr.Get_Page_Property(_pageindexid);

            // Security
            rbtn_IsPrivacy_Inherited.SelectedValue = DataEval.Convert_BoolToString(myPage_Property.IsPrivacy_Inherited);
            rbtn_IsSSL.SelectedValue = DataEval.Convert_BoolToString(myPage_Property.IsSSL);

            Security.Pages.PrivacyMgr myPrivacyMgr = new Security.Pages.PrivacyMgr();

            if (myPage_Property.IsPrivacy_Inherited)
            {
                string _inherited_pageindexid = myPrivacyMgr.Get_Inherited_Privacy_PageIndexID(_pageindexid);
                Security.Pages.Page_PrivacyURL myPage_PrivacyURL = myPrivacyMgr.Get_Page_PrivacyURL(_inherited_pageindexid);
                tbx_ReturnURL.Text    = myPage_PrivacyURL.ReturnURL;
                tbx_ReturnURL.Enabled = false;

                // Bind Permission Grid
                GridView_Permissions.DataSource = myPrivacyMgr.Get_Page_Privacy_FullList(_inherited_pageindexid);
                GridView_Permissions.DataBind();
                Panel_Page_Permissions.Enabled = false;
            }
            else
            {
                Security.Pages.Page_PrivacyURL myPage_PrivacyURL = myPrivacyMgr.Get_Page_PrivacyURL(_pageindexid);
                tbx_ReturnURL.Text    = myPage_PrivacyURL.ReturnURL;
                tbx_ReturnURL.Enabled = true;

                // Bind Permission Grid
                GridView_Permissions.DataSource = myPrivacyMgr.Get_Page_Privacy_FullList(_pageindexid);
                GridView_Permissions.DataBind();
                Panel_Page_Permissions.Enabled = true;
            }
        }
Exemplo n.º 30
0
        private void Control_Init()
        {
            Panel_Updated.Visible = false;

            // Home Switch
            rbtn_HomeSwitch.SelectedValue = Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch");

            // Website Properties
            Page_PropertyMgr myPage_PropertyMgr = new Page_PropertyMgr();
            Page_Attribute   myPage_Attribute   = myPage_PropertyMgr.Get_Page_Attribute(_pageindexid);

            tbx_Page_Title.Text       = myPage_Attribute.Page_Title;
            tbx_Page_Keyword.Text     = myPage_Attribute.Page_Keyword;
            tbx_Page_Description.Text = myPage_Attribute.Page_Description;

            Page_Template myPage_Template = myPage_PropertyMgr.Get_Page_Template(_pageindexid);

            // Look for Template
            droplist_Template.SelectedValue = myPage_Template.MasterPageIndexID;
            droplist_Template.DataBind();
            FormView_Template.PageIndex = droplist_Template.SelectedIndex;
            FormView_Template.DataBind();

            #region Security

            // Load Usergroup list
            List <Security.Users.UserGroups> myUserGroups = Security.Users.UserMgr.sGet_Usergroups();

            droplist_UserGroup.DataSource     = myUserGroups;
            droplist_UserGroup.DataTextField  = "UserGroup_Name";
            droplist_UserGroup.DataValueField = "UserGroupID";
            droplist_UserGroup.DataBind();

            droplist_UserGroup.SelectedValue = StringEnum.GetStringValue(Security.Users.UserGroup.RegisteredUser);

            // Set Add User Role Error Message to null
            lbl_AddRolesError.Text = "";

            Panel_Privacy.Visible = false;

            Page_Property myPage_Property = myPage_PropertyMgr.Get_Page_Property(_pageindexid);

            rbtn_IsSSL.SelectedValue = DataEval.Convert_BoolToString(myPage_Property.IsSSL);

            Security.Pages.PrivacyMgr myPrivacyMgr = new Security.Pages.PrivacyMgr();

            Security.Pages.Page_PrivacyURL myPage_PrivacyURL = myPrivacyMgr.Get_Page_PrivacyURL(_pageindexid);
            tbx_ReturnURL.Text = myPage_PrivacyURL.ReturnURL;

            // Bind Permission Grid
            GridView_Permissions.DataSource = myPrivacyMgr.Get_Page_Privacy_FullList(_pageindexid);
            GridView_Permissions.DataBind();
            Panel_Page_Permissions.Enabled = true;


            #endregion

            #region MetaTags

            tbx_ScriptURL.Text          = "";
            tbx_UpdateScriptURL.Text    = "";
            Panel_Update_Script.Visible = false;

            tbx_CSSURL.Text          = "";
            tbx_UpdateCSSURL.Text    = "";
            Panel_Update_CSS.Visible = false;

            // Script
            PageMgr myPageMgr = new PageMgr();


            GridView_Scripts.DataSource = myPageMgr.Get_Page_MetaTags(_pageindexid, Meta_Type.JavaScript);
            GridView_Scripts.DataBind();

            // CSS
            GridView_CSS.DataSource = myPageMgr.Get_Page_MetaTags(_pageindexid, Meta_Type.StyleSheet);
            GridView_CSS.DataBind();

            #endregion
        }