diff --git a/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs b/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs index 1f136e89..70ab6cfd 100644 --- a/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs +++ b/SGGL/FineUIPro.Web/SysManage/RolePower.aspx.cs @@ -21,10 +21,24 @@ namespace FineUIPro.Web.SysManage this.GetButtonPower(); // 绑定表格 this.BindGrid(); - ConstValue.InitConstValueCheckBoxList(this.ckMenuType, this.rbMenuType.SelectedValue); + this.BindMenuTypes(); } } + private void BindMenuTypes() + { + string groupId = this.rbMenuType.SelectedValue; + string[] menuTypes = groupId == ConstValue.Group_MenuType_S + ? new[] { Const.Menu_Project, Const.Menu_Person, Const.Menu_ZHGL, Const.Menu_SysSet } + : new[] { Const.Menu_ProjectSet, Const.Menu_PPerson, Const.Menu_HJGL, Const.Menu_Help }; + + this.ckMenuType.DataValueField = "ConstValue"; + this.ckMenuType.DataTextField = "ConstText"; + this.ckMenuType.DataSource = menuTypes.Join(ConstValue.drpConstItemList(groupId), + menuType => menuType, item => item.ConstValue, (menuType, item) => item).ToList(); + this.ckMenuType.DataBind(); + } + #region 角色下拉框绑定数据 /// /// 绑定数据 @@ -327,7 +341,7 @@ namespace FineUIPro.Web.SysManage protected void rbMenuType_SelectedIndexChanged(object sender, EventArgs e) { - ConstValue.InitConstValueCheckBoxList(this.ckMenuType, this.rbMenuType.SelectedValue); + this.BindMenuTypes(); this.SelectedIndexChanged(); } }