private void FillData() { string reportingListIDs = string.Empty; Guid siteId = SPContext.Current.Site.ID; SPWeb spweb = null; var rd = new ReportData(siteId); var daoEPMData = new EPMData(siteId); LoadLists(rd.GetListMappings()); using (var spSite = new SPSite(siteId)) { if (reportingV2Enabled) { spweb = SPContext.Current.Web; } else { spweb = spSite.OpenWeb(); } } string defaultLists = daoEPMData.DefaultLists(spweb); string _DefaultLists = CoreFunctions.getConfigSetting(spweb, "EPMLiveFixLists").Replace("\r\n", ","); var dtReportData = new DataTable(); using (var spSite = new SPSite(siteId)) { SPListCollection lists = spweb.Lists; foreach (SPList list in lists) { if ((!list.Hidden && IsReportingList(list.Title)) || defaultLists.Contains(list.Title) || _DefaultLists.Contains(list.Title)) { reportingListIDs += "'" + list.ID + "',"; } } if (!string.IsNullOrEmpty(reportingListIDs)) { reportingListIDs = reportingListIDs.Substring(0, reportingListIDs.Length - 1); } DataView mappings = rd.GetListMappings(reportingListIDs).DefaultView; GridView1.DataSource = mappings; GridView1.DataBind(); rd.Dispose(); } }