如何使用 PSI 2007 获取资源使用情况视图

发布于 2024-10-24 16:27:15 字数 231 浏览 5 评论 0原文

如果我使用了不正确的术语或概念,请原谅。似乎我对 MS Project、Project Server 和 PSI 速成课程感到迷茫...

Project Professional 提供了资源使用情况视图,其中列出了给定资源、分配给它们的任务以及计划工作量某一天。

Project Server 中是否提供此信息?我如何使用 PSI 读取它?

谢谢。

  • 贾森

Please excuse me if I use incorrect terms or concepts. Seems I am in the mist of a crash course on MS Project, Project Server, and the PSI...

Project Professional provides the Resource Usage view that lists a given Resource, the Tasks they have been assigned to, and the amount of scheduled Work for a given day.

Is this information available in Project Server and how would I read it using the PSI?

Thanks.

  • Jason

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等风来 2024-10-31 16:27:15

如果您刚刚开始使用 PSI,我强烈建议您下载并 使用属于 项目 2007 SDK

我没有对资源做太多工作,但快速浏览一下后..这是我的处理方法:

  1. 参考 Project.asmx 服务(例如:http://servername/pwa/_vti_bin/psi/Project.asmx)
  2. 使用ReadProjectEntities 方法检索 DataSet 并向其传递 TaskAssignmentProjectEntityType代码> 和<代码>资源。

定义一些实体类型:

public const int ENT_TYPE_TASK = 2;
public const int ENT_TYPE_RESOURCE = 4;
public const int ENT_TYPE_ASSIGNMENT = 8;

然后您可以读取数据:

int entity = ENT_TYPE_TASK | ENT_TYPE_ASSIGNMENT | ENT_TYPE_RESOURCE;
ProjectDataSet dataSet = project.ReadProjectEntities(projectUid, entity, DataStoreEnum.PublishedStore);
// do stuff with these tables...
//dataSet.Task
//dataSet.Assignment
//dataSet.ProjectResource

ReadProjectEntities 很好,因为您只能读取您需要的项目部分...如果您需要的不仅仅是任务表,那么您可以使用逻辑 OR 来获取额外的 ProjectEntityType

至于分配的工作,看起来也在分配表中,但我认为你必须做一些计算。

If you're just getting started with PSI, I'd strongly recommend downloading and using the ProjTool app that is part of the Project 2007 SDK.

I haven't done too much work with Resources, but after taking a quick look.. here is how I'd approach it:

  1. Reference the Project.asmx service (ex: http://servername/pwa/_vti_bin/psi/Project.asmx)
  2. Use the ReadProjectEntities method to retrieve a DataSet and pass it a ProjectEntityType of Task, Assignment and Resource.

Define some entity types:

public const int ENT_TYPE_TASK = 2;
public const int ENT_TYPE_RESOURCE = 4;
public const int ENT_TYPE_ASSIGNMENT = 8;

Then you can read the data:

int entity = ENT_TYPE_TASK | ENT_TYPE_ASSIGNMENT | ENT_TYPE_RESOURCE;
ProjectDataSet dataSet = project.ReadProjectEntities(projectUid, entity, DataStoreEnum.PublishedStore);
// do stuff with these tables...
//dataSet.Task
//dataSet.Assignment
//dataSet.ProjectResource

ReadProjectEntities is nice because you can read only the part of the project you need... if you need more than the Task table then you can use a logical OR to get additional ProjectEntityTypes.

As for the assigned work, it looks like that is also in the Assignment table, but I think you'll have to do some calculating.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文