private void Control_Init() { // Template MasterPageMgr myMasterPageMgr = new MasterPageMgr(); FormView_Template.DataSource = myMasterPageMgr.Get_Template_MasterPage_DropList(null); FormView_Template.DataBind(); }
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(); }
// 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(); } }
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(); }
private void Control_FillData() { #region Set Default Setting #region Step 1 //Gets your enum names and adds it to a string array Array enumNames = Enum.GetValues(typeof(Pages.Page_Type)); //Creates an ArrayList ArrayList myPageTypes = new ArrayList(); //Loop through your string array and poppulates the ArrayList foreach (Pages.Page_Type myPage_Type in enumNames) { myPageTypes.Add(new { Value = StringEnum.GetStringValue(myPage_Type), Name = StringEnum.GetStringValue(myPage_Type) }); } //Bind the ArrayList to your DropDownList droplist_PageType.DataSource = myPageTypes; droplist_PageType.DataTextField = "Name"; droplist_PageType.DataValueField = "Value"; droplist_PageType.DataBind(); // Set Default value droplist_PageType.SelectedIndex = 0; Panel_PageWizard.Visible = true; #endregion #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.Enabled = false; #endregion #region Step 2 More Options // Template MasterPageMgr myMasterPageMgr = new MasterPageMgr(); droplist_Template.DataSource = myMasterPageMgr.Get_Template_MasterPage_DropList(null); droplist_Template.DataTextField = "MasterPage_Name"; droplist_Template.DataValueField = "MasterPageIndexID"; droplist_Template.DataBind(); FormView_Template.DataSource = myMasterPageMgr.Get_Template_MasterPage_DropList(null); FormView_Template.DataBind(); rbtn_IsTemplate_Inherited.SelectedValue = "1"; Panel_Template.Enabled = false; // URL rewrite tbx_PageName.Text = ""; tbx_PageURL.Text = ""; // Security rbtn_IsPrivacy_Inherited.SelectedValue = "1"; rbtn_IsSSL.SelectedValue = "0"; #endregion // Set Default View MultiView_CreatePage.SetActiveView(View_PageType); #endregion }
protected void droplist_Template_SelectedIndexChanged(object sender, EventArgs e) { FormView_Template.PageIndex = droplist_Template.SelectedIndex; FormView_Template.DataBind(); }
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 }
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.Enabled = false; #endregion #region Step 2 More Options // Template MasterPageMgr myMasterPageMgr = new MasterPageMgr(); droplist_Template.DataSource = myMasterPageMgr.Get_Template_MasterPage_DropList(null); droplist_Template.DataTextField = "MasterPage_Name"; droplist_Template.DataValueField = "MasterPageIndexID"; droplist_Template.DataBind(); FormView_Template.DataSource = myMasterPageMgr.Get_Template_MasterPage_DropList(null); FormView_Template.DataBind(); rbtn_IsTemplate_Inherited.SelectedValue = "1"; Panel_Template.Enabled = false; // URL rewrite tbx_PageName.Text = ""; #endregion #endregion PageMgr myPageMgr = new PageMgr(); PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid); // Page General tbx_MenuName.Text = myPageIndex.Menu_Title; tbx_PageName.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; DataFill_Attribute(myPage_Property); DataFill_Template(myPage_Property); DataFill_PageURLs(); break; case Page_Type.Category: Panel_PageLink.Visible = false; Panel_HeadContent.Visible = true; Panel_Page_Templates.Visible = true; Panel_Page_URLs.Visible = true; DataFill_Attribute(myPage_Property); DataFill_Template(myPage_Property); DataFill_PageURLs(); break; case Page_Type.Internal_Page_Pointer: lbl_LinkURL.Text = "Pointer PageIndexID"; Panel_PageLink.Visible = true; Panel_HeadContent.Visible = false; Panel_Page_Templates.Visible = false; Panel_Page_URLs.Visible = true; DataFill_IntLink(); DataFill_PageURLs(); break; case Page_Type.External_Link: lbl_LinkURL.Text = "Page URL"; Panel_PageLink.Visible = true; Panel_HeadContent.Visible = false; Panel_Page_Templates.Visible = false; Panel_Page_URLs.Visible = true; DataFill_ExtLink(); DataFill_PageURLs(); break; } }