起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 858|回复: 0

代码获取当前环境数据策略

[复制链接]
发表于 2009-6-22 14:12:00 | 显示全部楼层 |阅读模式
var
  lBizUrl: TBizUrl;
  lMessage: TGetBizObjectPoliciesMessage;
  lBizObjectPolicy: TBizObjectPolicy;
  I: Integer;
begin
  lBizUrl := TBizUrl.Create;
  //lBizURL.URL := GetComponentModule(Owner).BizURL.URL + FileUtils.PathDelim + dsbTreeData.DataSetID + cDataSetExt;
  lBizURL.URL := 'Biz:\OPERATION\ZJKHGXSWGL\WorkUnitInfo.Info\TREEDATA.DataSet';
  lMessage := TGetBizObjectPoliciesMessage.Create(lBizURL);
  try
    lMessage.PolicyKinds.Add(cPolicySememicData);
    lMessage.PolicyKinds.Add(cPolicyDataSet);
    Context.BroadcastToParent(lMessage);
    Context.SendMessage(lMessage);
    for I := 0 to lMessage.Policies.Count - 1 do
    begin
      lBizObjectPolicy := TBizObjectPolicy(lMessage.Policies[I]);
      if (lBizObjectPolicy is TDataSetPolicy) then
        jsdialogs.ShowMsg((lBizObjectPolicy as TDataSetPolicy).BizRange.Text, '');
    end;
  finally
    lMessage.Free;
  end;
end;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2024-12-22 19:48 , Processed in 0.040887 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表