protected void PersonRefresh(object sender, StoreRefreshDataEventArgs e) { //需要添加权限判断-判断是否为走动干部进入 //var q = dc.Person.Where(p => p.Posid == Convert.ToInt32(cbb_zhiwu.SelectedItem.Value) && p.Maindeptid == SessionBox.GetUserSession().DeptNumber); var q = from p in dc.Person where p.Posid == Convert.ToInt32(cbb_zhiwu.SelectedItem.Value) && p.Maindeptid == SessionBox.GetUserSession().DeptNumber orderby p.Name ascending select new { p.Personnumber, p.Name }; PersonStore.DataSource = q; PersonStore.DataBind(); cbb_person.Disabled = q.Count() > 0 ? false : true; }