Skip to content

Commit 7161af2

Browse files
Updated assignment examples
1 parent 8ff624d commit 7161af2

File tree

2 files changed

+5
-14
lines changed
  • content/english/java/resource-assignments

2 files changed

+5
-14
lines changed

content/english/java/resource-assignments/assignment-budget/_index.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,7 @@ In your Java file, import the required classes:
3535
```java
3636
import com.aspose.tasks.*;
3737
```
38-
## Assignment Budget Management
39-
Let's break down the provided example into multiple steps and explore each one in detail:
40-
```java
41-
// The path to the documents directory.
42-
String dataDir = "Your Data Directory";
43-
Project prj = new Project(dataDir + "project.mpp");
44-
for (ResourceAssignment ra : prj.getResourceAssignments()) {
45-
System.out.println(ra.get(Asn.BUDGET_COST));
46-
System.out.println(ra.get(Asn.BUDGET_WORK).toString());
47-
}
48-
```
38+
4939
## Step 1: Define Data Directory
5040
Set the path to the directory containing your project file.
5141
```java

content/english/java/resource-assignments/deal-with-variances/_index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ First, import the necessary packages to work with Aspose.Tasks:
2020
import com.aspose.tasks.Asn;
2121
import com.aspose.tasks.Project;
2222
import com.aspose.tasks.ResourceAssignment;
23-
// The path to the documents directory.
24-
String dataDir = "Your Data Directory";
25-
Project project = new Project(dataDir + "ResourceAssignmentVariance.mpp");
23+
2624
```
2725
## Step 1: Iterate through Resource Assignments
2826
To deal with variances, we need to iterate through resource assignments in the project. This is achieved using a simple loop:
2927
```java
28+
// The path to the documents directory.
29+
String dataDir = "Your Data Directory";
30+
Project project = new Project(dataDir + "ResourceAssignmentVariance.mpp");
3031
for (ResourceAssignment ra : project.getResourceAssignments()) {
3132
// Perform operations on each resource assignment
3233
}

0 commit comments

Comments
 (0)