36、动态表单插件,权限校验原创
金蝶云社区-林荫大道cc身份
林荫大道cc
9人赞赏了该文章 4329次浏览 未经作者许可,禁止转载编辑于2020年07月11日 16:54:49
封面

引用:

Kingdee.BOS.Core.dll

Kingdee.BOS.ServiceHelper.dll


使用

using Kingdee.BOS.Core.Permission;

using Kingdee.BOS.ServiceHelper;




使用上一节35代码



1、修改上一节,双击事件 EntityRowDoubleClick 的代码,设置是否有权限


PermissionAuthResult iResult = PermissionServiceHelper.FuncPermissionAuth

 (this.Context, new BusinessObject() { Id = "SAL_OUTSTOCK" }, PermissionConst.View);
 
 
if (!iResult.Passed)
{
    this.View.ShowMessage("没有销售出库单的查看权限,不能查询");
    
    return;
}


image.png



2、最终效果,当用户没有销售出库单的权限时候,提示报错


image.png


image.png


总目录链接

https://vip.kingdee.com/article/64993872014591232


赞 9