C# Class CreateUpdateProjectSample.CreateUpdateProjectSample

Exibir arquivo Open project: OfficeDev/Project-Samples

Public Properties

Property Type Description
pwaInstanceUrl string

Public Methods

Method Description
CreateProjectWithTaskAndAssignment ( ) : void

Create a new project with one local resource, one enterprise resource, one task and one assignment

ReadAndUpdateProject ( ) : void

Read and update the project, this method need a project named "New Project" with a task "New task" and assign to a local resource named "New local resource" already created. Basically please run CreateProjectWithTaskAndAssignment() before running this to avoid exceptions

UpdateCustomFieldValues ( ) : void

Read and Update Project/Task/Resource custom field values, this method need a project named "New Project" with a task "New task" and assign to a local resource named "New local resource" already created. Basically please run CreateProjectWithTaskAndAssignment() before running this to avoid exceptions

Private Methods

Method Description
CreateCustomFields ( ) : void

Create Project/Task/Resource custom fields. Field type will be TEXT.

CreateSimpleLookupTable ( ) : Microsoft.ProjectServer.Client.LookupTable

Create a simple lookup table with 3 text value choose (one/two/three)

GetContext ( string url ) : Microsoft.ProjectServer.Client.ProjectContext

Get csom ProjectContext by letting user type in username and password

GetProjectByName ( string name, Microsoft.ProjectServer.Client context ) : Microsoft.ProjectServer.Client.PublishedProject

Get Publish project by name

GetRandomLookupEntries ( Microsoft.ProjectServer.Client cf ) : Microsoft.ProjectServer.Client.LookupEntry
JobStateLog ( Microsoft.ProjectServer.Client jobState, string jobDescription ) : void

Log to Console the job state for queued jobs

Main ( string args ) : void

Method Details

CreateProjectWithTaskAndAssignment() public static method

Create a new project with one local resource, one enterprise resource, one task and one assignment
public static CreateProjectWithTaskAndAssignment ( ) : void
return void

ReadAndUpdateProject() public static method

Read and update the project, this method need a project named "New Project" with a task "New task" and assign to a local resource named "New local resource" already created. Basically please run CreateProjectWithTaskAndAssignment() before running this to avoid exceptions
public static ReadAndUpdateProject ( ) : void
return void

UpdateCustomFieldValues() public static method

Read and Update Project/Task/Resource custom field values, this method need a project named "New Project" with a task "New task" and assign to a local resource named "New local resource" already created. Basically please run CreateProjectWithTaskAndAssignment() before running this to avoid exceptions
public static UpdateCustomFieldValues ( ) : void
return void

Property Details

pwaInstanceUrl public_oe static_oe property

public static string pwaInstanceUrl
return string