Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

EnsureEnterpriseResources() how to customize

$
0
0

hello forum members,

Did anyone tried to customize EnsureEnterpriseResources() 

to instead of using array of resource names to use array of username? We have resources with the same names and passing just the name instead of a unique usernames creates a problem for those with the same name.

if so, can you provide an example? thank you advance for any suggestion.

privatestatic Guid[] EnsureEnterpriseResources(SvcResource.Resource resourceSvc)
      {string[] resourceNames = newstring[] { "Lertchai Treetawatchaiwong","Bricks","Conference Room A","Rental"};
         PSLibrary.Resource.Type[] resourceTypes = new PSLibrary.Resource.Type[] { PSLibrary.Resource.Type.WorkResource, PSLibrary.Resource.Type.MaterialResource, PSLibrary.Resource.Type.WorkResource, PSLibrary.Resource.Type.CostResources };
         Guid[] resources = new Guid[resourceNames.Length];for (int i = 0; i < resourceNames.Length; i++)
         {
            resources[i] = EnsureEnterpriseResource(resourceSvc, resourceNames[i], resourceTypes[i]);
         }return resources;
      }


tatiana



Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>