Resource.GetTimephasedData
Contents
[
Hide
]GetTimephasedData(DateTime, DateTime, TimephasedDataType)
Returns an instance of the TimephasedDataCollection
class for this object with the TimephasedData
values within given start and end dates of specified TimephasedDataType
.
public TimephasedDataCollection GetTimephasedData(DateTime start, DateTime end,
TimephasedDataType timephasedType)
Parameter | Type | Description |
---|---|---|
start | DateTime | The start date for the time phased data. |
end | DateTime | The end date for the time phased data. |
timephasedType | TimephasedDataType | The type of time phased data (TimephasedDataType ). |
Return Value
List of TimephasedData
.
Examples
Shows how to read timephased data of work/cost resources.
var project = new Project(DataDir + "ResourceTimephasedData.mpp");
// Get the Resource by its ID
var resource = project.Resources.GetByUid(1);
// Print Timephased data of ResourceWork
Console.WriteLine("Timephased data of ResourceWork");
foreach (var td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate)))
{
Console.Write("Start: " + td.Start.ToShortDateString());
Console.WriteLine(" Work: " + td.Value);
}
// Print Timephased data of ResourceCost
Console.WriteLine("Timephased data of ResourceCost");
foreach (var td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate), TimephasedDataType.ResourceCost))
{
Console.Write("Start: " + td.Start.ToShortDateString());
Console.WriteLine(" Cost: " + td.Value);
}
See Also
- class TimephasedDataCollection
- enum TimephasedDataType
- class Resource
- namespace Aspose.Tasks
- assembly Aspose.Tasks
GetTimephasedData(DateTime, DateTime)
Returns TimephasedDataCollection
for this object with TimephasedData
values within given start and end dates.
public TimephasedDataCollection GetTimephasedData(DateTime start, DateTime end)
Parameter | Type | Description |
---|---|---|
start | DateTime | The start date for the time phased data. |
end | DateTime | The end date for the time phased data. |
Return Value
List of TimephasedData
.
Examples
Shows how to read timephased data of work/cost resources.
var project = new Project(DataDir + "ResourceTimephasedData.mpp");
// Get the Resource by its ID
var resource = project.Resources.GetByUid(1);
// Print Timephased data of ResourceWork
Console.WriteLine("Timephased data of ResourceWork");
foreach (var td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate)))
{
Console.Write("Start: " + td.Start.ToShortDateString());
Console.WriteLine(" Work: " + td.Value);
}
// Print Timephased data of ResourceCost
Console.WriteLine("Timephased data of ResourceCost");
foreach (var td in resource.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate), TimephasedDataType.ResourceCost))
{
Console.Write("Start: " + td.Start.ToShortDateString());
Console.WriteLine(" Cost: " + td.Value);
}
See Also
- class TimephasedDataCollection
- class Resource
- namespace Aspose.Tasks
- assembly Aspose.Tasks