Exemplo n.º 1
0
    public override void RenderPage()
    {
        try
        {
            UserRule objUserRule = new UserRule();

            List <string> ModuleTypeIDList = objUserRule.GetUserModuleTypeID(UserID);
            if (ModuleTypeIDList.Count() == 0)
            {
                MessageDialog("没有此用户类型绑定的模块类型", "SuperUserList.aspx");
                return;
            }
            else if (ModuleTypeIDList.Count() > 1)
            {
                MessageDialog("此用户有多个模块类型绑定请到具体授权组授权查看", "SuperUserList.aspx");
                return;
            }
            XmlDataSource.Data = objPowerRule.GetPowerTreexXmlText(ModuleTypeIDList.FirstOrDefault(), CurrentUser.IsSuper);
            if (UserID.IsNoNull())
            {
                // 取得角色权限
                tvwPower.SetSelectValue(objUserRule.GetUserAllKeyPower(UserID), false);
            }
            tvwPower.DataBind();
        }
        catch
        {
        }
    }