コード例 #1
0
 /// <summary>
 /// 当类型变化时触发 
 /// </summary>
 /// <param name="nowType"></param>
 /// <param name="bindIdList"></param>
 private void TypeChanged(string nowType, bool bindIdList)
 {
     this.ddl_Type.SelectedValue = nowType;
     if (nowType == Type_Group) {//选择的是预设组
         this.NowSettingType = ERightType.Group;
         BindGroupList(bindIdList);
     } else if (nowType == Type_Admin) {//选择的是管理员
         this.NowSettingType = ERightType.Admin;
         BindAdminList(bindIdList);
     }
     ReloadRoles();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack) {
                AdminPageStatic.RoleChecked(this);

                this.NowSettingType = ERightType.Unknown;

                NowAddToIdList = new List<MR_PageInfo>();

                //绑定一级目录
                BindMenu();

                this.AdminIdList = Request.QueryString["adminid"].GetString(string.Empty);
                this.GroupIdList = Request.QueryString["groupid"].GetString(string.Empty);
                if (!string.IsNullOrEmpty(this.AdminIdList)) {//如果有传入管理员列表,批量分配权限
                    TypeChanged(Type_Admin, true);
                } else if (!string.IsNullOrEmpty(this.GroupIdList)) {
                    TypeChanged(Type_Group, true);
                }
            }
        }