Example #1
0
        public AdmWinBarn()
        {
            InitializeComponent();

            DbOperations db = new DbOperations();
            List <Barn>  bs = db.GetAllBarn();

            listBarn.ItemsSource = bs;
        }
Example #2
0
        private void btnAddBarn_Click(object sender, RoutedEventArgs e)
        {
            DbOperations db = new DbOperations();

            db.AddNewBarn(txtBfornamn.Text, txtBefternamn.Text, txtBlokal.Text, int.Parse(txtBavd.Text)); // LĂ€gger till nytt barn

            listBarn.ItemsSource = null;
            List <Barn> bs = db.GetAllBarn(); // refreshar barnlistan

            listBarn.ItemsSource = bs;
            MessageBox.Show("VĂ„rdnadshavare registrerad!");
        }
Example #3
0
        public AdmWinKoppla()
        {
            InitializeComponent();

            DbOperations db = new DbOperations();

            List <Vardnadshavare> vs = db.GetAllVardnadshavare();

            comboVH.ItemsSource = vs;

            List <Barn> bs = db.GetAllBarn();

            comboBarn.ItemsSource = bs;
        }