起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 209|回复: 13

怎么把新功能做的和计划中心一样可以设置管理权限?**

[复制链接]
发表于 2008-10-8 16:45:21 | 显示全部楼层 |阅读模式
如题。
回复

使用道具 举报

发表于 2008-10-8 16:49:55 | 显示全部楼层
参考业务模型\协同系统\计划\计划中心资源\计划常用过滤和业务模型\协同系统\计划\计划中心资源里的 GetFilter
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-9 08:38:16 | 显示全部楼层
TStringUtils在那个包里?帮助没找到
回复 支持 反对

使用道具 举报

发表于 2008-10-9 08:52:38 | 显示全部楼层
NameSpace: Business.System
--------------------------------------------------------------------------------
StringUtils = class(System.Object)
public
  static function Copy(S: string; Index: Longint; Count: Longint): string;
  static function CopyAnsi(S: string; Index: Longint; Count: Longint): string;
  static procedure Delete(S: string; Index: Longint; Count: Longint);
  static procedure DeleteAnsi(S: string; Index: Longint; Count: Longint);
  static procedure Insert(Source: string; S: string; Index: Longint);
  static procedure InsertAnsi(Source: string; S: string; Index: Longint);
  static function Length(S: string): Longint;
  static function LengthAnsi(S: string): Longint;
  static function Pos(SubStr: string; S: string): Longint;
  static function PosAnsi(SubStr: string; S: string): Longint;
  static function PosIgnoreCase(SubStr: string; S: string): Longint;
  static function PosIgnoreCaseAnsi(SubStr: string; S: string): Longint;
end;
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-9 08:58:27 | 显示全部楼层
1、[U]TStringUtils.GetRootURLs[/U] (DeptURLs, lRootURLs);
2、管理权限在那个表中?
回复 支持 反对

使用道具 举报

发表于 2008-10-9 09:08:23 | 显示全部楼层
1、TStringUtils.GetRootURLs (DeptURLs, lRootURLs);
TStringUtils在业务模型\系统空间\系统运行库\系统函数库中
回复 支持 反对

使用道具 举报

发表于 2008-10-9 09:26:10 | 显示全部楼层
2、管理权限在那个表中?
楼主你要做什么呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-9 09:36:21 | 显示全部楼层
我想根据管理权限赋予用户查看相应数据,
回复 支持 反对

使用道具 举报

发表于 2008-10-9 09:47:13 | 显示全部楼层
那你看业务模型\协同系统\计划\计划中心资源\计划常用过滤中的那个部门,他就是根据当前登陆用户所拥有的管理权限,列出所有的下属的。
回复 支持 反对

使用道具 举报

发表于 2008-10-9 10:04:36 | 显示全部楼层
提供一个代码给你,可以根据人员成员参数获得其所拥有的管理权限的函数
function TMainForm.GetSubordinations(APersonMember: TOrgUnit): TStrings;
var
  lOrgUnit : TOrgUnit;
  lOrgSubordinationItems : TOrgSubordinationItems;
  i : integer;
  ResultUrls : TStrings;
begin
  ResultUrls := TStringList.Create;
  lOrgSubordinationItems := TOrgSubordinationItems.Create;//定义TOrgSubordinationItems对象,里面存储一个下属列表
  try
    OrgSys.OrgSystem.GetAllSubordinationItems(APersonMember, lOrgSubordinationItems);
    if lOrgSubordinationItems.Count > 0 then
      for i := 0 to lOrgSubordinationItems.Count-1 do
        begin
          lOrgUnit := OrgSys.OrgSystem.FindUnit(lOrgSubordinationItems.DeptID,
            lOrgSubordinationItems.PositionID, lOrgSubordinationItems.PersonID);
          ResultUrls.Add(lOrgUnit.BizUrl.URL);
        end
    else
      ResultUrls.Add(APersonMember.BizUrl.URL);
  finally
    lOrgSubordinationItems.Free;
    Result := ResultUrls;
  end;
end;
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-23 03:04 , Processed in 0.055217 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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