Exemplo n.º 1
0
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            CollegeDialog collegeDialog = new CollegeDialog()
            {
                Title = "Adicionar Universidade"
            };

            if (collegeDialog.ShowDialog() == true)
            {
                colleges.Add(DbContextHelper.AddCollege(_db, collegeDialog.College));
                collegeGrd.SelectedIndex = collegeGrd.Items.Count - 1;
            }
        }