Managing Resource Overtimes
Contents
[
Hide
Show
]The Resource class exposes a number of properties for managing resource overtime:
- Overtime represents the overtime rate (decimal).
- OvertimeRate represents the overtime rate from the current date, if a rate table exists for the resource (decimal).
- OvertimeRateFormat represents the units used for the overtime rate (RateFormatType).
- OvertimeCost represents the sum of an actual and remaining overtime cost (decimal).
- OvertimeWork represents the amount of overtime work scheduled for a tasks (TimeSpan).
Working with Resource Overtimes
To see overtime cost, overtime rate and overtime work in Microsoft Project:
- On the Resource sheet, select the Insert menu, and then select Column.
- Add the columns.
Getting Resource Overtimes in Aspose.Tasks
The following example shows how to get resource overtimes using Aspose.Tasks.
1Project project = new Project("New Project.mpp");
2
3// Display overtime related parameters for all resources
4foreach (Resource res in project.Resources)
5{
6 if (res.Get(Rsc.Name) != null)
7 {
8 Console.WriteLine(res.Get(Rsc.OvertimeCost));
9 Console.WriteLine(res.Get(Rsc.OvertimeWork).ToString());
10 Console.WriteLine(res.Get(Rsc.OvertimeRateFormat).ToString());
11 }
12}