CollabOnUserManager.AddRemoveUser Method
Adds or removes a user based on the action value.
Namespace: OBA.Server.Taskflow.UI
Assembly: OBA.Server.Taskflow (in OBA.Server.Taskflow.dll)
Syntax
'Declaration
Public Sub AddRemoveUser ( _
loginName As String, _
email As String, _
name As String, _
action As CollabOnUserAction _
)
'Usage
Dim instance As CollabOnUserManager
Dim loginName As String
Dim email As String
Dim name As String
Dim action As CollabOnUserAction
instance.AddRemoveUser(loginName, email, _
name, action)
public void AddRemoveUser(
string loginName,
string email,
string name,
CollabOnUserAction action
)
Parameters
loginName
Type: System.StringA string specifying the login name.
email
Type: System.StringA string specifying the email address.
name
Type: System.StringA string specifying the user's name.
action
Type: OBA.Server.Taskflow.UI.CollabOnUserActionAn object of type CollabOnUserAction.
Examples
The following code example shows how to use AddUser to add a user to a Taskflow.
void m_AddButton_Click(object sender, EventArgs e)
{
PickerEntity entity = (PickerEntity)m_PplEditor.ResolvedEntities[0];
Hashtable data = entity.EntityData;
string loginName = entity.Key;
string email = data["Email"].ToString();
string name = entity.DisplayText;
CollabOnUserManager collabUser = new CollabOnUserManager();
collabUser.AddRemoveUser(loginName, email, name, CollabOnUserAction.AddUser);
}
The following code example shows how to use RemoveUser to remove a user from a Taskflow.
void m_RemoveButton_Click(object sender, EventArgs e)
{
PickerEntity entity = (PickerEntity)m_PplEditor.ResolvedEntities[0];
Hashtable data = entity.EntityData;
string loginName = entity.Key;
string email = data["Email"].ToString();
string name = entity.DisplayText;
CollabOnUserManager collabUser = new CollabOnUserManager();
collabUser.AddRemoveUser(loginName, email, name, CollabOnUserAction.RemoveUser);
}