//刷新 protected void btnRefresh_Click(object sender, EventArgs e) { //DropDownList_User.SelectedValue = "0"; DropDownList_User.Reset(); DropDownList_Year.Reset(); //DropDownList_Year.SelectedValue = "0"; btnDelete.Enabled = false; BindData(); }
//数据绑定 public void BindData() { try { DropDownList_User.Reset(); DropDownList_Year.Reset(); //DropDownList_Year.SelectedValue = "0";//年份绑定初始化 //DropDownList_User.SelectedValue = "0";//人员名称绑定初始化 ViewState["page"] = 0; //查找小于等于该用户保密级别的所有会议信息 List <Common.Entities.AcademicMeeting> list = BLLAcademic.FindAll(Convert.ToInt32(Session["SecrecyLevel"])); //分页处理 var res = list.Skip(Grid_MeetingName.PageIndex * Grid_MeetingName.PageSize).Take(Grid_MeetingName.PageSize).ToList(); Grid_MeetingName.RecordCount = list.Count(); this.Grid_MeetingName.DataSource = res; this.Grid_MeetingName.DataBind(); btnDelete.Enabled = false; } catch (Exception ex) { publicMethod.SaveError(ex, this.Request); } }