起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 170|回复: 6

【结贴】如何取得组织机构说明?**

[复制链接]
发表于 2009-4-14 10:25:30 | 显示全部楼层 |阅读模式
如下图:有什么函数可以取得当前登录部门的说明。

1.gif

15.52 KB, 下载次数: 116

回复

使用道具 举报

发表于 2009-4-14 10:51:15 | 显示全部楼层
procedure TMainForm.Button4Click(Sender: TObject);
var
  lOrgUnit: Org.TOrgUnit;
  lBizURL: TBizURL;
  lDept : Org.TDept;
  lCommon :string;
begin
  lBizURL :=  TBizURL.Create;
  try
  lBizURL.URL := 'Org:\ROOT\HHM.OGN\DA0.DPT';
  lOrgUnit := Org.OrgSys.OrgSystem.FindUnit(lBizURL);
  lCommon := lOrgUnit.Attribute.ItemValues[1];
//  lCommon := lOrgUnit.Attribute.CommaText;

  jsDialogs.ShowMsg(lCommon,'');

  finally
    lBizURL.Free;
  end;
end;
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-20 11:57:26 | 显示全部楼层
lCommon := lOrgUnit.Attribute.ItemValues[1];
该值取出来的是 名称, 不是说明 。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-20 11:58:35 | 显示全部楼层
且 lOrgUnit.Attribute.ItemValues[2];  lOrgUnit.Attribute.ItemValues[3];
lOrgUnit.Attribute.ItemValues[4];  lOrgUnit.Attribute.ItemValues[5];  lOrgUnit.Attribute.ItemValues[6];  
都是32位的字符串
回复 支持 反对

使用道具 举报

发表于 2009-4-20 13:04:39 | 显示全部楼层
lOrgUnit.Attribute.CommaText是全部的属性值,要不你就从这个串里面截取下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-20 13:07:49 | 显示全部楼层
可以了 lOrgUnit.Attribute.ItemValues[0];  是说明的值
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-20 13:38:46 | 显示全部楼层
结贴
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-22 10:48 , Processed in 0.042753 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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