예제 #1
0
        /*using (Repos rep = new Repos())
         * {
         *  TempList1 = rep.Leerlingen();
         *  foreach (Leerling l in TempList1)
         *  {
         *      Leerlingen.Add(l.Naam);
         *  }
         * }
         * using (Repos rep = new Repos())
         * {
         *  TempList2 = rep.Vakken();
         *  foreach (Vak v in TempList2)
         *  {
         *      Vakken.Add(v.Naam);
         *  }
         * }
         * using (Repos rep = new Repos())
         * {
         *  TempList3 = rep.Testen();
         *  foreach (Test t in TempList3)
         *  {
         *      Testen.Add(t.TestNaam);
         *  }
         * }
         * Cb1.ItemsSource = Klassen;
         * Cb2.ItemsSource = Leerlingen;
         * Cb3.ItemsSource = Vakken;
         * Cb4.ItemsSource = Testen;
         * }*/

        private void UitvoerenPunt_Click(object sender, RoutedEventArgs e)
        {
            using (Repos rep = new Repos())
            {
                int       result;
                Resultaat resultaat = new Resultaat()
                {
                    Result = Int32.Parse(Resultaat1.Text)                                    /*, Leerling = rep.VindLeerling(TempList1[Cb2.SelectedIndex])*/
                };

                rep.ToevoegenR(resultaat, /* (TempList[Cb1.SelectedIndex]) , (TempList1[Cb2.SelectedIndex]), (TempList2[Cb3.SelectedIndex]) ,*/ TempList3[Cb4.SelectedIndex]);
            }

            MessageBox.Show("Resultaat toegevoegd.");
        }