Retrieve a Task's Budget Work and Cost Values in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Retrieve a Task’s Budget Work and Cost Values
To Retrieve a Task’s Budget Work and Cost Values using Aspose.Tasks Java for Ruby, simply invoke GetBudgetWorkAndCostValue module. Here you can see example code.
Ruby Code
1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2project_summary = project.getRootTask()
3tsk = Rjb::import('com.aspose.tasks.Tsk')
4rsc = Rjb::import('com.aspose.tasks.Rsc')
5puts "Project Budget Work = " + project_summary.get(tsk.BUDGET_WORK).to_string
6puts "Project Budget Cost = " + project_summary.get(tsk.BUDGET_COST).to_string
7resource = project.getResources().getByUid(1)
8puts "Resource BudgetWork = " + resource.get(rsc.BUDGET_WORK).to_string
9resource = project.getResources().getByUid(2)
10puts "Resource BudgetCost = " + resource.get(rsc.BUDGET_COST).to_string
Download Running Code
Download Retrieve a Task’s Budget Work and Cost Values (Aspose.Tasks) from any of the below mentioned social coding sites: