摘要: 如果一个列表中有一个字段类型为用户或用户组,并且设置为用户,允许多值的话,那么用代码进行更新的时候就必须将这个字段的值赋成SPFieldUserValueCollection类型,以下代码即为从PeopleEditor控件中取出多个用户并返回一个SPFieldUserValueCollection类型的值: 1 /// 2 /// 从人员选取器中获取多用户并返回SPFieldUserValueCollection类型 3 /// 4 /// 人员选取器 5 /// ToString:user1ID;#user1Name;#u... 阅读全文
posted @ 2013-11-13 11:47 TwinStudio 阅读(239) 评论(0) 推荐(0) 编辑
摘要: /// /// 提升权限创建用户组 /// /// 用户组的名字 public void CreateGroup(string groupname) { SPSecurity.RunWithElevatedPrivileges(delegate() { try { using (SPSite mySite = new SPSite(SPContext.Current.Site.ID... 阅读全文
posted @ 2013-11-13 11:36 TwinStudio 阅读(209) 评论(0) 推荐(0) 编辑