This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
ClientContext clientContext = new ClientContext(site); | |
clientContext.Credentials = new NetworkCredential(user, pass, domain); | |
Web oWebsite = clientContext.Web; | |
clientContext.Load(oWebsite); | |
clientContext.ExecuteQuery(); | |
Utils.CheckUserResults results = new Utils.CheckUserResults(); | |
JavaScriptSerializer json = new JavaScriptSerializer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InsertUser() | |
{ | |
if (projectItem["xyz"] != null) | |
{ | |
SPFieldUser userField = (SPFieldUser)projectItem.Fields.GetField("xyz"); | |
SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(projectItem["fmMTSRep"].ToString()); | |
foreach (SPFieldUserValue userFieldValue in userFieldValueCollection) | |
{ | |
this.Users.Add(userFieldValue.User) | |
} |