Пример #1
0
        public MainWindow()
        {
            InitializeComponent();

            usc = null;

            using (var context = new ActiveRosterDBEntities())
            {
                teams = context.tbl_Team.ToList();
                ListViewMenu.ItemsSource = teams;
            }
        }
Пример #2
0
        private void ListViewMenu_SelectionChanged(object sender, RoutedEventArgs e)
        {
            if (ListViewMenu.SelectedItem != null)
            {
                tbl_Team team = (tbl_Team)ListViewMenu.SelectedItem;

                usc = null;
                GridMain.Children.Clear();

                usc = new UserControlTeam(team.Id);
                GridMain.Children.Add(usc);
            }
        }