public static DataTable GetSharedFilesByPage(int siteId, int pageId) { DataTable dataTable = new DataTable(); dataTable.Columns.Add("ItemID", typeof(int)); dataTable.Columns.Add("ModuleID", typeof(int)); dataTable.Columns.Add("ModuleTitle", typeof(string)); dataTable.Columns.Add("FriendlyName", typeof(string)); dataTable.Columns.Add("ViewRoles", typeof(string)); dataTable.Columns.Add("Description", typeof(string)); using (IDataReader reader = DBSharedFiles.GetSharedFilesByPage(siteId, pageId)) { while (reader.Read()) { DataRow row = dataTable.NewRow(); row["ItemID"] = reader["ItemID"]; row["ModuleID"] = reader["ModuleID"]; row["ModuleTitle"] = reader["ModuleTitle"]; row["FriendlyName"] = reader["FriendlyName"]; row["ViewRoles"] = reader["ViewRoles"]; row["Description"] = reader["Description"]; dataTable.Rows.Add(row); } } return(dataTable); }