var custPKId = "";
var strCustomerPKIds = new List<string> { custPKId };
var filterObjectByDataRuleParamenter
= new FilterObjectByDataRuleParamenter(custBusinessInfo, strCustomerPKIds) {
PermissionItemId = PermissionConst.View,
IsLookUp=false,
};
var filterObjectResult = PermissionServiceHelper.FilterObjectByDataRule(this.Context, filterObjectByDataRuleParamenter);
if (filterObjectResult.Contains(custPKId) ==true) //有权;否则反之无权
{
}
else
{
this.View.ShowMessage("你没有查看销售订单客户权限");
return;
}
//打开单据查看实例
BillShowParameter para = new BillShowParameter();
//打开样式
para.OpenStyle.ShowType = ShowType.Default;
//打开销售出库单,扩展前的唯一标识SAL_OUTSTOCK
para.FormId = formid;
//打开的状态,view,查看
para.Status = OperationStatus.VIEW;
//打开哪张单据的FID内码,传递过来,那一行Row;双击哪一行,获取FID,赋值给它
para.PKey = pkValue;
para.ParentPageId = this.View.ParentFormView.PageId;
this.View.ShowForm(para);
}
else
{
this.View.ShowMessage("你没有查看销售订单权限");
return;
}
推荐阅读