Example #1
0
        private void Control_Init()
        {
            #region Set Default Setting

            // Master Page
            tbx_MasterPage_Name.Text        = "";
            tbx_MasterPage_Description.Text = "";

            if (droplist_Template.Items.Count > 1)
            {
                droplist_Template.SelectedIndex = 1;
                droplist_Masterpage.DataBind();
                droplist_Theme.DataBind();

                MasterPageMgr myMasterPageMgr = new MasterPageMgr();

                TemplateMgr         myTemplateMgr         = new TemplateMgr();
                Template_MasterPage myTemplate_MasterPage = myTemplateMgr.Get_Template_MasterPage(droplist_Masterpage.SelectedValue);

                ThemeMgr myThemeMgr = new ThemeMgr();
                Theme    myTheme    = myThemeMgr.Get_Theme(droplist_Theme.SelectedValue);

                Image_Masterpage_Preview.ImageUrl = string.Format("/App_Themes/{0}/{1}.jpg", myTheme.Theme_Code, myTemplate_MasterPage.MasterPage_Template_Name.Replace(" ", ""));
            }


            #endregion
        }
Example #2
0
        protected void droplist_Theme_DataBound(object sender, EventArgs e)
        {
            MasterPageMgr myMasterPageMgr = new MasterPageMgr();

            TemplateMgr         myTemplateMgr         = new TemplateMgr();
            Template_MasterPage myTemplate_MasterPage = myTemplateMgr.Get_Template_MasterPage(droplist_Masterpage.SelectedValue);

            ThemeMgr myThemeMgr = new ThemeMgr();
            Theme    myTheme    = myThemeMgr.Get_Theme(droplist_Theme.SelectedValue);

            Image_Masterpage_Preview.ImageUrl = string.Format("/App_Themes/{0}/{1}.jpg", myTheme.Theme_Code, myTemplate_MasterPage.MasterPage_Template_Name.Replace(" ", ""));
        }
Example #3
0
        protected override void OnPreInit(EventArgs e)
        {
            //myPage_Loading_Info = new Nexus.Core.Pages.Page_Loading_Info();

            // Check _pageindexid
            string _masterpageindexid = Request["MasterPageIndexID"];

            if (DataEval.IsEmptyQuery(_masterpageindexid))
            {
                // URLrewrite
                _masterpageindexid = "1";
            }

            // Check MasterPage Exist
            MasterPageMgr myMasterPageMgr = new MasterPageMgr();

            myMasterPageIndex = myMasterPageMgr.Get_MasterPageIndex(_masterpageindexid);

            // Get MasterPage Loading Info
            Nexus.Core.Pages.Page_PropertyMgr myPropertyMgr = new Nexus.Core.Pages.Page_PropertyMgr();
            myPage_Loading_Info = myPropertyMgr.Get_MasterPage_Loading_Info(_masterpageindexid);

            // Get Master PageID
            if (!DataEval.IsEmptyQuery(Request["MasterPageID"]))
            {
                myPage_Loading_Info.MasterPageID = Request["MasterPageID"];
            }

            // Check Properties

            // Check Security

            // Apply Them and MasterPage
            ThemeMgr myThemeMgr = new ThemeMgr();
            Theme    myTheme    = myThemeMgr.Get_Theme(myMasterPageIndex.ThemeID);

            this.Theme = myTheme.Theme_Code;

            TemplateMgr         myTemplateMgr         = new TemplateMgr();
            Template_MasterPage myTemplate_MasterPage = myTemplateMgr.Get_Template_MasterPage(myMasterPageIndex.Template_MasterPageID);

            this.MasterPageFile = myTemplate_MasterPage.MasterPage_URL;

            this.Title = myMasterPageIndex.MasterPage_Name;

            base.OnPreInit(e);
        }
        private void Control_FillData()
        {
            #region Set Default Setting

            Panel_Updated.Visible = false;

            #region Step 2 General

            // Master Page
            tbx_MasterPage_Name.Text        = "";
            tbx_MasterPage_Description.Text = "";
            lbl_Template.Text       = "";
            lbl_Masterpage.Text     = "";
            Hidden_TemplateID.Value = "";
            #endregion

            #endregion

            MasterPageMgr   myMasterPageMgr   = new MasterPageMgr();
            MasterPageIndex myMasterPageIndex = myMasterPageMgr.Get_MasterPageIndex(_masterpageindexid);

            // Master Page
            tbx_MasterPage_Name.Text        = myMasterPageIndex.MasterPage_Name;
            tbx_MasterPage_Description.Text = myMasterPageIndex.MasterPage_Description;

            Hidden_TemplateID.Value = myMasterPageIndex.TemplateID;

            TemplateMgr myTemplateMgr = new TemplateMgr();
            Template    myTemplate    = myTemplateMgr.Get_Template(myMasterPageIndex.TemplateID);
            lbl_Template.Text = myTemplate.Template_Name;

            Template_MasterPage myTemplate_MasterPage = myTemplateMgr.Get_Template_MasterPage(myMasterPageIndex.MasterPageID);
            lbl_Masterpage.Text = myTemplate_MasterPage.MasterPage_Template_Name;

            droplist_Theme.DataBind();
            droplist_Theme.SelectedValue = myMasterPageIndex.ThemeID;

            ThemeMgr myThemeMgr = new ThemeMgr();
            Theme    myTheme    = myThemeMgr.Get_Theme(droplist_Theme.SelectedValue);

            Image_Masterpage_Preview.ImageUrl = string.Format("/App_Themes/{0}/{1}.jpg", myTheme.Theme_Code, myTemplate_MasterPage.MasterPage_Template_Name.Replace(" ", ""));
        }