In fact, Aspose.Tasks take care of parent and child tasks relationship by taking into count of the duration and start date of the child tasks. That is, if you try to update the duration and start date of the parent task, it will not work But, if you try to update the duration and start date of the child task, it will automatically update the parent task. In simple words, parent task is a function of child tasks.
For your scenario, say task6 is parent and task7 is child, then follwoing code will have no effect on duration and start and end dates.
task6.Start =
DateTime.Parse("26-Jun-2009 08:00:00 AM");
TimeSpan t = new TimeSpan(0, 8,0 , 0);
task6.Duration = t;
However, following code will serve the purpose,
task7.Start = DateTime.Parse("26-Jun-2009 08:00:00 AM");
TimeSpan t = new TimeSpan(0, 8,0 , 0);
task7.Duration = t
Conclusion:
If we attempt to write Parent Task with Start Date : 26-Jun-2009,Duration : 8 Hours and Child Task with Start Date : 27-Jun-2009, Duration : 8 Hours in a project file using Aspose.Tasks, we will get the following results:
Parent Task Start Date : 27-Jun-2009, End Date : 27-June-2009
Child Task Start Date : 27-Jun-2009, End Date : 27-June-2009
Regards,
Muhammad Sabir
Muhammad Sabir
Support Assistant Manager
Aspose Sialkot Team
http://www.aspose.comAspose - Your File Format Experts
Keep in touch! We're on
Twitter and
Facebook