Sharepoint Webpart 自定义属性
2020-11-15 15:08
标签:style blog http java color os Sharepoint Webpart 自定义属性,搜素材,soscw.com Sharepoint Webpart 自定义属性 标签:style blog http java color os 原文地址:http://www.cnblogs.com/batter152/p/3698632.htmlnamespace Webpart.Staffing.ViewAll
{
[ToolboxItemAttribute(false)]
public partial class ViewAll : WebPart
{
public ViewAll()
{
}
private string _listName;
[Personalizable(true)]
[WebBrowsable(true)]
[Category("Customize")]
[WebDisplayName("List Name")]
public string ListName
{
set { _listName = value; }
get { return _listName; }
}
private DataTable GetItems()
{
SPListItemCollection collJD = null;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(SPContext.Current.Web.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists.TryGetList(string.IsNullOrEmpty(_listName) ? HRConstant.listJDReferral : _listName);
SPQuery query = new SPQuery();
//query.Query=string.Format("
下一篇:php从零单排-00