Sha256: 13e02626d02c50d0a550fdbc802c763e80985fce230b6f8118116f57b9f2e256

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

module Asposetasksjava
  module StopAndResumeAssignment
    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')

        resource_assignments = project.getResourceAssignments().toList()

        # Parse through all the collected resource assignments
        i = 0
        while i < resource_assignments.size()
          ra = resource_assignments.get(i)
          if ra.get(Rjb::import('com.aspose.tasks.Asn').STOP).toString() == "1/1/2000"
            puts "NA"
          else
             puts ra.get(Rjb::import('com.aspose.tasks.Asn').STOP).toString()
          end

          if ra.get(Rjb::import('com.aspose.tasks.Asn').RESUME).toString() == "1/1/2000"
            puts "NA"
          else
            puts ra.get(Rjb::import('com.aspose.tasks.Asn').RESUME).toString()
          end
          i +=1
        end    
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/ResourceAssignments/stopandresumeassignment.rb