Esempio n. 1
0
        private void AanmakenLK_Click(object sender, RoutedEventArgs e)
        {
            using (Repos rep = new Repos())
            {
                //rep.ToevoegenLK(new Leerkracht { Naam = NaamLK.Text, Geslacht = ((ComboBoxItem)GeslachtLK.SelectedValue).Content.ToString(), Geboortedatum = (DateTime)GdLK.SelectedDate, Rijksregister = RrLK.Text, Adres = AdresLK.Text, Tel = TelLK.Text });

                rep.ToevoegenG(new Gebruiker()
                {
                    GebruikersNaam = GnLK.Text, Wachtwoord = WwLK.Text, Leerkracht = new Leerkracht()
                    {
                        Naam = NaamLK.Text, Geslacht = ((ComboBoxItem)GeslachtLK.SelectedValue).Content.ToString(), Geboortedatum = (DateTime)GdLK.SelectedDate, Rijksregister = RrLK.Text, Adres = AdresLK.Text, Tel = TelLK.Text
                    }
                });


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