Advertisement
M0n5t3r

Untitled

Jan 5th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.91 KB | None | 0 0
  1. prestatiess = data.getPrestaties(Properties.Settings.Default.id);
  2.             Console.WriteLine(prestatiess.Count);
  3.             if (prestatiess.Count > 0)
  4.             {
  5.                 foreach(prestatieClass prestaties in prestatiess)
  6.                 {
  7.                     counter++;
  8.                     if (counter == 1)
  9.                     {
  10.                         string feestnaam = data.KrijgFeestNaam(prestaties.Feest_ID);
  11.                         Console.WriteLine(feestnaam);
  12.                         listBox1.Items.Add("Feestnaam: " + feestnaam);
  13.                         listBox1.Items.Add("Aantal hakken: " + prestaties.Aantal_hakken);
  14.                         listBox1.Items.Add("Datum: "+ prestaties.datum.ToString("dd/MM/yyyy"));
  15.                     }
  16.                     if (counter == 2)
  17.                     {
  18.                         string feestnaam = data.KrijgFeestNaam(prestaties.Feest_ID);
  19.                         Console.WriteLine(feestnaam);
  20.                         listBox2.Items.Add("Feestnaam: " + feestnaam);
  21.                         listBox2.Items.Add("Aantal hakken: " + prestaties.Aantal_hakken);
  22.                         listBox2.Items.Add("Datum: " + prestaties.datum.ToString("dd/MM/yyyy"));
  23.                     }
  24.                     if (counter == 3)
  25.                     {
  26.                         string feestnaam = data.KrijgFeestNaam(prestaties.Feest_ID);
  27.                         Console.WriteLine(feestnaam);
  28.                         listBox3.Items.Add("Feestnaam: " + feestnaam);
  29.                         listBox3.Items.Add("Aantal hakken: " + prestaties.Aantal_hakken);
  30.                         listBox3.Items.Add("Datum: " + prestaties.datum.ToString("dd/MM/yyyy"));
  31.                     }
  32.                     Console.WriteLine(prestaties.Aantal_hakken);
  33.                 }
  34.             } else
  35.             {
  36.                 listBox1.Items.Add("Nog geen prestaties gevonden");
  37.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement