Aspose.Tasks.Examples.CSharp.WorkingWithResources.GetResourceOvertime.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public  static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);

            // ExStart:GetResourceOvertime
            // Create project instance
            Project project1 = new Project(dataDir + "ResourceOvertime.mpp");

            // Display overtime related parameters for all resources
            foreach (Resource res in project1.Resources)
            {
                if (res.Get(Rsc.Name) != null)
                {
                    Console.WriteLine(res.Get(Rsc.OvertimeCost));
                    Console.WriteLine(res.Get(Rsc.OvertimeWork).ToString());
                    Console.WriteLine(res.Get(Rsc.OvertimeRateFormat).ToString());
                }
            }
            // ExEnd:GetResourceOvertime
        }
    }
GetResourceOvertime