//报告绑定 public void BindReport() { try { page = 0; int AcademicMeetingID = Convert.ToInt32(Request.QueryString["id"].ToString()); List <Common.Entities.ScienceReport> scienceReportlist = BLLReport.FindPaged(AcademicMeetingID, Convert.ToInt32(Session["SecrecyLevel"])); var res = scienceReportlist.Skip(Grid_ReportInfo.PageIndex * Grid_ReportInfo.PageSize).Take(Grid_ReportInfo.PageSize).ToList(); Grid_ReportInfo.RecordCount = scienceReportlist.Count(); Grid_ReportInfo.DataSource = res; Grid_ReportInfo.DataBind(); btnDeleteReport.Enabled = false; } catch (Exception ex) { publicMethod.SaveError(ex, this.Request); } }
//按报告所属部门搜索报告信息 public void FindByAgency() { try { page = 1; Grid_ReportInfo.PageIndex = 0; int agencyID = BLLAgency.SelectAgencyID(DropDownList_Agency.SelectedText); int AcademicMeetingID = Convert.ToInt32(Request.QueryString["id"].ToString()); List <Common.Entities.ScienceReport> list = BLLReport.FindPaged(AcademicMeetingID, Convert.ToInt32(Session["SecrecyLevel"])); list = list.Where(p => p.AgencyID == agencyID).ToList(); var res = list.Skip(Grid_ReportInfo.PageIndex * Grid_ReportInfo.PageSize).Take(Grid_ReportInfo.PageSize).ToList(); Grid_ReportInfo.RecordCount = list.Count(); Grid_ReportInfo.DataSource = res; Grid_ReportInfo.DataBind(); btnDeleteReport.Enabled = false; } catch (Exception ex) { publicMethod.SaveError(ex, this.Request); } }