Exemple #1
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;
            }
        }
        private void Edit_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)
            };

            if (myPropertyMgr.Chk_Page_Attribute(PageIndexID))
            {
                myPropertyMgr.Edit_Page_Attribute(UpdateData);
            }
            else
            {
                myPropertyMgr.Add_Page_Attribute(UpdateData);
            }
        }