mpFx: Simon Demo

by on January 28, 2009

Simon from Australia needed an example of how to use mpFx to create projects, resources, tasks, and assignments.  Here it is: http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=mpFx&DownloadId=4636 . Here is the source: 1: using System; 2: using System.Web.Services.Protocols; 3: using Mcs.Epm.MicrosoftProject.mpFx; 4: using Mcs.Epm.MicrosoftProject.mpFx.ProjectsWebService; 5: using Mcs.Epm.MicrosoftProject.mpFx.ResourcesWebService; 6: using Microsoft.Office.Project.Server.Library; 7: using DataStoreEnum=Mcs.Epm.MicrosoftProject.mpFx.ProjectsWebService.DataStoreEnum; 8: using Resource = Microsoft.Office.Project.Server.Library.Resource; 9:   10: namespace EntityCreationDemo 11: { 12: class Program 13: { 14: static void Main( string [] args) 15: { 16: try 17: { 18: using (ProjectServer projectServer = new ProjectServer( "http://projectserver/pwa" , DataStoreEnum.WorkingStore, null )) 19: { 20: string errorMessage; 21:   22: Guid projectGuid = Guid.NewGuid(); 23: 24: // Create the project 25: using (ProjectDataSet projectDataSet = EntityFactory.NewProject( "Simon Test" , projectGuid)) 26: { 27: projectServer.Projects.Create(projectDataSet, false , true ); 28: } 29:   30: // This is actually a bug of omission. I should be updating the underlying project collection on creation.

See the original post here:
mpFx: Simon Demo

Leave your comment

Required.

Required. Not published.

If you have one.