起步软件技术论坛-X3

 找回密码
 立即注册
搜索
12
返回列表 发新帖
楼主: xhsoft

多人处理问题**

[复制链接]
 楼主| 发表于 2009-2-6 13:57:42 | 显示全部楼层
代码取的呀
回复 支持 反对

使用道具 举报

发表于 2009-2-6 14:06:57 | 显示全部楼层
把窗体的完整代码贴出来看看。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-6 14:56:38 | 显示全部楼层
procedure TTZ.FlowBroker1CreateFlowOutFlowTasks(Sender: TObject; Command: TFlowOutCommand);
var
  lFlowTask:TFlowTask;
  lOrgURL: TOrgURL;
  lStr:string;
  zxz,dl:string;
begin
   lFlowTask := Command.FlowTasks.FindFlowTask('CKTZ');
   //根据任务环节查找任务
  if lFlowTask <> nil then
    lFlowTask.Executors.Clear;  //删除缺省执行者
   dsbjs.DataSet.Open;
  dsbjs.DataSet.First;
  while not dsbjs.DataSet.Eof do
  begin
    dsbjs.DataSet.Edit;
    zxz := dsbjs.DataSet.FieldByName('jsz').AsString;
    dsbjs.DataSet.Post;
    //lStr:= zxz;
    if lFlowTask <> nil then
    begin
      lOrgURL := TOrgURL.Create('','',zxz); //部门、岗位、人员创建组织单元
      lFlowTask.Executors.Add(lOrgURL);//添加执行者
    end;
    dsbjs.DataSet.Next;
  end;
end;
回复 支持 反对

使用道具 举报

发表于 2009-2-6 15:07:56 | 显示全部楼层
lOrgURL := TOrgURL.Create('','',zxz);
这是给的人员
dsbjs.DataSet这个数据集中有重复的值。你sql中加一个distinct然后再试试。
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-28 02:45 , Processed in 0.038558 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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