Sharepoint Webpart 自定义属性
2020-11-15 15:08
阅读:882
标签:style blog http java color os

namespace 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("",positionTitle,location,positionLevel,department); query.Query = string.Format(" {0} {1} {2} {3} "); query.ViewFields = " Open "; collJD = list.GetItems(query); } } }); } } }

Sharepoint Webpart 自定义属性,搜素材,soscw.com
Sharepoint Webpart 自定义属性
标签:style blog http java color os
原文地址:http://www.cnblogs.com/batter152/p/3698632.html
下一篇:php从零单排-00
评论
亲,登录后才可以留言!