can someone provide an example of how to get resource login name by using SCOM?
here is what i have so far and the error i am getting.
projContext = new ProjectContext(pwaPath);
CustomFieldCollection customFields = projContext.CustomFields;
EnterpriseResourceCollection resources = projContext.EnterpriseResources;
projContext.Load(projContext.EnterpriseResources);
projContext.ExecuteQuery();
projContext.Load(projContext.CustomFields);
projContext.ExecuteQuery();
foreach (EnterpriseResource rs in projContext.EnterpriseResources)
{
foreach (DataRow row in OracleTable.Rows)
{
if (rs.User.LoginName == row["user_nm"].ToString()) //BREAKING HERE
{
if (rs.ResourceType.ToString() == "Work")
{
}
}
}
tatiana