Sha256: 9254046375bcb798e49a6020d39575e1e0e9868cc106a4bcf7640eb92d63967c

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

module Asposetasksjava
  module GetBudgetWorkAndCostValue
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate project object
        project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp')

        project_summary = project.getRootTask()

        tsk = Rjb::import('com.aspose.tasks.Tsk')
        rsc = Rjb::import('com.aspose.tasks.Rsc')

		puts "Project Budget Work = " + project_summary.get(tsk.BUDGET_WORK).to_string
		puts "Project Budget Cost = " + project_summary.get(tsk.BUDGET_COST).to_string

		# Get resource by Uid
		resource = project.getResources().getByUid(1)

		# Display resource budget work
		puts "Resource BudgetWork = " + resource.get(rsc.BUDGET_WORK).to_string

		# Get next resource by Uid
		resource = project.getResources().getByUid(2)

		# Display resource budget cost
		puts "Resource BudgetCost = " + resource.get(rsc.BUDGET_COST).to_string
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Tasks/getbudgetworkandcostvalue.rb