When I add new Task like:
Task task = taskCollection.add();
When I add new Task like:
Task task = taskCollection.add();
Hi,
Project project = <span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new Project();
System.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Before adding a
task to collection total resource assignments count =” + project.getResourceAssignments().getCount());
Task task1 = project.getRootTask().getChildren().add(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Task 1”);
Task task2 = project.getRootTask().getChildren().add(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Task 2”);
System.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“After adding a
task to collection total resource assignments count =” + project.getResourceAssignments().getCount());
<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:navy”>while(project.getResourceAssignments().getCount()>
<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:blue”>0)
{
ResourceAssignment asgn =
project.getResourceAssignments().toList().get(<span style=“font-size:
9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:blue”>0);
asgn.delete();
}
System.<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:#660E7A”>out.println(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“After deleting all
, total resource assignments count =” + project.getResourceAssignments().getCount());