MOSS workflow development in two very useful classes

1, Organization
in NameSpace: Microsoft.GroupBoard.EnhancedGroup below, this class need to meet the MOSS "Chinese electronic approval process" functionality used together.
You can bring a SPWeb and department of Chinese name, you can remove all the members of this department, and the department leadership is very convenient.
Usage as:
Organization ORG = new new Organization (workflowProperties.Web, "Technology");
org.Leader returns the type of department heads SPUser information
org.Members returns all members of the department, it is SPUserCollection types
also can go to department Riga users, delete users, really affordable lots to talk about
 
these need to be copied from the GAC (can not be used directly do not know why), here is a download , there are more than N class of useful features, a lot of it out to discover what decompile to see if there is no gold in it.
 
2, Contact
situated Microsoft.Office.Workflow.Utility below, the user can get more information through the user login name, the most useful is to take the current user information in a task (task directly workflowProperties.Web.CurrentUser always be taken out of the system account, do not believe you try)
now you can get with Contact, but this usage e.Identity valid only OnTaskChange processing method.
CON = Contact.FromName Business Card (e.Identity, workflowProperties.Web);
con.DisplayName is the name of the current user

Reproduced in: https: //www.cnblogs.com/baoposhou/archive/2007/08/27/871726.html

Guess you like

Origin blog.csdn.net/weixin_33981932/article/details/93320749