public void GenerateTrophyReport(System.IO.Stream stream, int trophyID) { // Raw data needed if (trophyID == -1) { tblTrophiesTableAdapter.Fill(Trophies); tblWinnersTableAdapter.Fill(Winners); } else { tblTrophiesTableAdapter.FillByTrophyID(Trophies, trophyID); tblWinnersTableAdapter.FillByTrophy(Winners, trophyID); } Document doc = CreateDocument(); int pageNumber = 0; foreach (TrophyDataSet.tblTrophiesRow row in Trophies.Select("TRUE", "[fldName] ASC")) { AddTrophyPage(doc, row, ref pageNumber); } doc.Generate(stream); }
public async Task FetchIds() { var result = await Api.Trophies.FetchAsync(Credentials, ids : Trophies.Select(x => x.Id).ToArray()); Assert.That(result.Success); Assert.That(result.Data.Intersect(Trophies, trophyComparer).SequenceEqual(Trophies, trophyComparer)); }