使用CSOM设置任务前驱 [英] Set task predecessor using CSOM

查看:92
本文介绍了使用CSOM设置任务前驱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


是否可以使用CSOM更新/设置任务前任的值?如果有,你可以给我一个输入吗。


我查看了CSOM API,了解了如何阅读Predecessor值,但不知道如何设置它。


谢谢。

解决方案

使用它来实现它TaskLinkCreationInformation类。


========下面是一段代码===============


TaskLinkCreationInformation taskLink = new TaskLinkCreationInformation();
$
taskLink.Id = new Guid();

taskLink.StartId = prevTaskGuid;

taskLink.EndId = currentTaskGuid;

taskLink.DependencyType = DependencyType.FinishStart;

_drft.TaskLinks.Add(taskLink);


Hi,

Is it possible to update/set value to the Task predecessor using CSOM? If yes, can you please provide me a piece of input.

I've looked into the CSOM API, came to know how to read the Predecessor value but don't know how to set it.

Thanks.

解决方案

Achieved it using TaskLinkCreationInformation Class.

======== Below is the piece of code ===============

TaskLinkCreationInformation taskLink = new TaskLinkCreationInformation();
taskLink.Id = new Guid();
taskLink.StartId = prevTaskGuid;
taskLink.EndId = currentTaskGuid;
taskLink.DependencyType = DependencyType.FinishStart;
_drft.TaskLinks.Add(taskLink);


这篇关于使用CSOM设置任务前驱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆