Esempio n. 1
0
        private void Load_Normal_Page(string PageIndexID)
        {
            // Check Properties

            // Check Security
            if (!Security.Users.UserStatus.Validate_PageAuth_View(this.Page))
            {
                Security.Pages.PrivacyMgr myPrivacyMgr           = new Security.Pages.PrivacyMgr();
                string _inherited_pageindexid                    = myPrivacyMgr.Get_Inherited_Privacy_PageIndexID(PageIndexID);
                Security.Pages.Page_PrivacyURL myPage_PrivacyURL = myPrivacyMgr.Get_Page_PrivacyURL(_inherited_pageindexid);
                Response.Redirect(myPage_PrivacyURL.ReturnURL);
            }

            // Load Pages Template
            Nexus.Core.Pages.Page_PropertyMgr myPropertyMgr = new Nexus.Core.Pages.Page_PropertyMgr();
            myPage_Loading_Info = myPropertyMgr.Get_Page_Loading_Info(PageIndexID);

            // Get MasterPageID
            //_master_pageindexid = myPage_Loading_Info.MasterPageIndexID;

            //this.StyleSheetTheme = myPage_Loading_Info.Theme;
            this.Theme          = myPage_Loading_Info.Theme;
            this.MasterPageFile = myPage_Loading_Info.MasterPage_URL;

            this.Title = myPage_Loading_Info.Page_Title;
        }
Esempio n. 2
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;
            }
        }
Esempio n. 3
0
        protected void rbtn_IsPrivacy_Inherited_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (rbtn_IsPrivacy_Inherited.SelectedValue == "0")
            {
                tbx_ReturnURL.Enabled = true;
            }
            else
            {
                tbx_ReturnURL.Enabled = false;

                Security.Pages.PrivacyMgr      myPrivacyMgr      = new Security.Pages.PrivacyMgr();
                Security.Pages.Page_PrivacyURL myPage_PrivacyURL = myPrivacyMgr.Get_Page_PrivacyURL(myPrivacyMgr.Get_Inherited_Privacy_PageIndexID(_pageindexid));

                tbx_ReturnURL.Text = myPage_PrivacyURL.ReturnURL;
            }
        }