protected void Page_Load(object sender, EventArgs e) { lblMenuCategory.Text = GlobalizationUtility.GetLabelText("UserControl_MenuCategory"); CreateAllItems(lstLeft); CreateRightAccount(lstRight, TopMenuId); btnSelect.Attributes.Add("onclick", "SelectOne('" + lstLeft.ClientID + "','" + lstRight.ClientID + "','" + hdnSelected.ClientID + "')"); btnSelectAll.Attributes.Add("onclick", "SelectAll('" + lstLeft.ClientID + "','" + lstRight.ClientID + "','" + hdnSelected.ClientID + "')"); btnUnselect.Attributes.Add("onclick", "UnSelectOne('" + lstRight.ClientID + "','" + hdnSelected.ClientID + "')"); btnUnselectAll.Attributes.Add("onclick", "UnSelectAll('" + lstRight.ClientID + "','" + hdnSelected.ClientID + "')"); hdnSelected.Value = ""; foreach (ListItem item in lstRight.Items) { hdnSelected.Value = hdnSelected.Value + item.Value + ","; } }
protected override void Render(HtmlTextWriter writer) { if (IsParent) { this.Text = GlobalizationUtility.GetLabelText("ManageGridView_CheckAll"); } if (this.Enabled && this.Visible && !string.IsNullOrEmpty(this.Group)) { if (!string.IsNullOrEmpty(this.BindedValue)) { writer.AddAttribute("value", this.BindedValue); } //writer.AddAttribute("isparent", this.IsParent.ToString()); writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "javascript:zrWebCheckBox_Check(this, '" + this.Group + "','" + this.IsParent.ToString() + "')"); } base.Render(writer); }
protected string GetMessage(string msgId, string param) { return(GlobalizationUtility.GetMessage(msgId, param)); }
protected string GetLabelText(string key) { return(GlobalizationUtility.GetLabelText(key)); }
protected override void OnInit(EventArgs e) { this.Columns[1].HeaderText = GlobalizationUtility.GetLabelText("ManageGridView_ID"); base.OnInit(e); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { /* * string strXmlFile = System.Web.HttpRuntime.AppDomainAppPath + "admin/xmlconfig/pagepart.xml"; * //set properties * XmlDocument doc = new XmlDocument(); * doc.Load(strXmlFile); * XmlNodeList nodes = doc.SelectSingleNode("JohnnyCMS").SelectNodes("Page"); * * string currentPage = GetCurrentPageName(); * for (int ix = 0; ix < nodes.Count; ix++) * { * if (currentPage == nodes[ix].Attributes["AddName"].Value || currentPage == nodes[ix].Attributes["ListName"].Value) * { * lblStatus.Text = " "; * //lblCategory.Text = nodes[ix].ChildNodes[0].InnerText; * lblTitle.Text = nodes[ix].ChildNodes[1].InnerText; * hyperlinkAllList.Text = nodes[ix].ChildNodes[2].InnerText; * hyperlinkAllList.NavigateUrl = nodes[ix].ChildNodes[3].InnerText; * hyperlinkAdd.Text = nodes[ix].ChildNodes[4].InnerText; * hyperlinkAdd.NavigateUrl = nodes[ix].ChildNodes[5].InnerText; * if (nodes[ix].Attributes["Single"].Value == "True") * { * lblSeparator.Visible = false; * hyperlinkAdd.Visible = false; * } * break; * } * }*/ //Get current page string currentPage = GetCurrentPageName(); //Get Page Binding Johnny.CMS.BLL.SystemInfo.PageBinding pagebinding = new Johnny.CMS.BLL.SystemInfo.PageBinding(); IList <Johnny.CMS.OM.SystemInfo.PageBinding> bindinglist = pagebinding.GetList(); Johnny.CMS.BLL.SystemInfo.Menu menu = new Johnny.CMS.BLL.SystemInfo.Menu(); IList <Johnny.CMS.OM.SystemInfo.Menu> menulist = menu.GetList(); foreach (var menuitem in menulist) { if (menuitem.PageLink.Equals(currentPage) || menuitem.PageLink.Contains("/" + currentPage)) { foreach (var bindingitem in bindinglist) { if (menuitem.MenuId == bindingitem.ListMenuId || menuitem.MenuId == bindingitem.AddMenuId) { lblStatus.Text = " "; lblTitle.Text = bindingitem.Title; hyperlinkAllList.Text = GlobalizationUtility.GetLabelText("AdminMaster_List"); //hyperlinkAllList.Text = DataConvert.GetString(GetGlobalResourceObject("globaladmin", "AdminMasterLinkButtonList")); Johnny.CMS.OM.SystemInfo.Menu listmenu = menulist.FirstOrDefault(p => p.MenuId == bindingitem.ListMenuId); hyperlinkAllList.NavigateUrl = listmenu.PageLink; //hyperlinkAdd.Text = "Add"; hyperlinkAdd.Text = GlobalizationUtility.GetLabelText("AdminMaster_Add"); Johnny.CMS.OM.SystemInfo.Menu addmenu = menulist.FirstOrDefault(p => p.MenuId == bindingitem.AddMenuId); hyperlinkAdd.NavigateUrl = addmenu.PageLink; if (bindingitem.ListMenuId == bindingitem.AddMenuId) { hyperlinkAllList.Text = bindingitem.Title; lblSeparator.Visible = false; hyperlinkAdd.Visible = false; } break; } } break; } } } }