SPList UserInfoList = site.SiteUserInfoList;
string useremail = oOpenItem["UserEmailAddress"].ToString();
SPQuery query = new SPQuery();
query.ViewFields = "";
query.Query = "" + assigneeusername + "";
SPListItemCollection UserItems = UserInfoList.GetItems(query);
if (UserItems != null)
{
SPListItem UserItem = UserItems[0];
strDept = UserItem["Department"] == null ? "No Department" : UserItem["Department"].ToString();
}
else
{
myLog.WriteEntry(assigneeusername + "Not Found");
}
}
else
strDept = string.Empty;
SPONSORS:
No comments:
Post a Comment