标签:style blog class code java color
SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite oSite = new SPSite(siteUrl)) { foreach (SPWeb oWeb in oSite.AllWebs) { foreach (SPList oList in oWeb.Lists) { if (oList.Title != "Organizations") continue; var sb = new StringBuilder(); sb.AppendLine(oList.Title); foreach (SPListItem oItem in oList.Items) { if (oItem.Versions.Cast<SPListItemVersion>().FirstOrDefault(v => v.Level == SPFileLevel.Published) != null) { foreach (SPField fd in oItem.Fields) { object value = oItem[fd.Id]; sb.AppendFormat("[{0}]={1}\t;", fd.Title ,value ?? string.Empty); } } sb.AppendLine(); } Debug.Print(sb.ToString()); return; } } } });
share point 读取 List数据,布布扣,bubuko.com
标签:style blog class code java color
原文地址:http://www.cnblogs.com/nanfei/p/3709310.html